WordPress / better-code-editing

[✅ Merged into 4.9-alpha] Better Code Editing WordPress plugin
https://wordpress.org/plugins/better-code-editing/
38 stars 16 forks source link

A way to link the customizer code editor with the edit themes/plugins editor #17

Closed paaljoachim closed 7 years ago

paaljoachim commented 7 years ago

At the beginning of a brainstorm...

We have two edit areas. In the edit screen for editing plugins and themes and the Additional CSS in the customizer. I am thinking there should be a way to create a link between these areas. As one can edit CSS in both places. This means the user can add some CSS to the style.css of the theme and some CSS to the CSS area in the customizer.

I got to think about this some more....

westonruter commented 7 years ago

@paaljoachim I suggest that there should be a notice added when opening the theme editor, to have a deep-link to the Additional CSS section in the Customizer.

Such a notice already appears, somewhat, in the plugin editor:

image

Something should be done like when opening the old admin-based header/background admin pages:

image

westonruter commented 7 years ago

@melchoyce could you source some design and language for notices to display on the theme and plugin editors to display persistently on both?

Also, could you provide direction for how we should style the Update File button when there are reported linting errors? Maybe there should be a checkbox to confirm? Or an old-school confirm dialog?

melchoyce commented 7 years ago

@melchoyce could you source some design and language for notices to display on the theme and plugin editors to display persistently on both?

Conveniently enough, I worked on that today :) That conversation is over in https://core.trac.wordpress.org/ticket/31779, though I'd love to merge these two somehow. @helen, would you have any interest in working on these notices in GitHub, or would you prefer to stay on Trac and in SVN?

Also, could you provide direction for how we should style the Update File button when there are reported linting errors? Maybe there should be a checkbox to confirm? Or an old-school confirm dialog?

Does CodeMirror distinguish at all between suggestions and errors? Wondering if we could block people from saving when they have errors, and give them some sort of warning when there are just suggestions.

westonruter commented 7 years ago

@melchoyce

Conveniently enough, I worked on that today :) That conversation is over in https://core.trac.wordpress.org/ticket/31779, though I'd love to merge these two somehow.

Great! I was just going to ask about adding a link to Additional CSS in the Customizer, and I see you've accounted for that.

Does CodeMirror distinguish at all between suggestions and errors? Wondering if we could block people from saving when they have errors, and give them some sort of warning when there are just suggestions.

Yes, I believe we can block just in the case of errors.

westonruter commented 7 years ago

Yes, I believe we can block just in the case of errors.

This has been implemented in #49.

westonruter commented 7 years ago

Closing in favor of https://core.trac.wordpress.org/ticket/31779