Closed jonnywatersbb closed 3 months ago
@jonnywatersbb I think 'jump to' would be tricky to pull off. A simpler solution to solve the same problem may be to contextualise the code preview, so that it only shows relevant config based on what you're currently editing.
I've put together a quick experiment of this approach if you want to try it out
Another alternative would be to prioritise bringing back the block editor preview, since this was removed as a temporary measure in favour of the 'easy' option of introducing a code preview. If the code preview requires significant work to make it useful, we should probably reconsider that decision. That said, I think the contextualised code preview is much more useful so could be a valid stop gap until we have time to re-introduce the block editor preview.
@squarewave17 I did see there was draft PR whilst submitting #83 but only took a cursory look at it since it's still in draft. It looks like a cool idea but I do think it raises too many questions at this stage. Is it finished? What problems does it solve beyond the 'jump to' feature?
@g-elwell Well for example, currently there is no way to set or add colors or fonts. The user still has to go into the theme files to manually edit theme.json.
It's currently at a fully working state, but i'm looking at ways to optimise data as the controls are laggy.
@g-elwell Well for example, currently there is no way to set or add colors or fonts. The user still has to go into the theme files to manually edit theme.json.
Ah ok, that's fine for now because we're just focusing on editing styles
for v1.0.0 and are planning to extend this to include a UI to control settings
in a subsequent release.
The code editor would take the plugin in a different direction, so we'd need to decide whether that functionality actually aligns with our goals for the plugin, and answer questions surrounding how the UX for editing code and things like validation should behave.
I think it would be best to pause that work for now and we can come back to it later to discuss whether we want to include the feature before spending additional time on it.
Closing as this was resolved by #88
What problem does this address?
When using Themer to edit theme.json, it becomes difficult to see exactly where your code change is happening even with the code preview.
What is your proposed solution?
Add a jump to button next to each setting to display the line(s) of code that is being effected by the setting change
Mockup