-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove all references to WP in markup (more CMS-agnostic)? #9649
Comments
Yes but in my opinion we should keep something in front of the classname in order to avoid having generic classnames. .gut-* ? |
Yep, agree. This discussion also plays into this: #4681 |
Can you provide some more details with examples of those classes and comments? As far as I remember the only place where we use |
Thanks for your reply! Can you provide a more complete list here, @SofiaSousa? |
Didn't know about After a quick search for
|
Did a presentation on Gutenberg on Drupal Europe yesterday (https://www.drupaleurope.org/session/introducing-gutenberg-content-editor-drupal-8). A few people asked if it was possible to remove references to WP in code. Purists :) A lot of interest, however. |
For true block re-use between Drupal and WordPress (what we try to accomplish with https://gutenbergcloud.org), it would be greatly helpful if the wp-* class prefix was not there at all. And I can imagine removing it after 5.0 is out would be very painful. So: Are there any reasons not to replace it with something more CMS agnostic? |
I'm not sure I fully understand the technical problem that removing references to After all it'll be pretty obvious where the interface came from once WP 5.0 is released regardless of what the HTML classes are, and it's not common practice to take JS and PHP libraries and maintain forks that only change the prefixes |
This is true, though it is currently already hard to change, as third-party developers have been trusting Gutenberg based on interface stability in this stage leading up to 5.0.
The answer is a mixture of the difficulty described above — which is enough on its own — and the fact that it is hard to prioritize this sort of change against all the remaining work needed for WordPress core's tight schedule for 5.0. I'd like to label this issue Future and close it, since a solution in Gutenberg core should have to wait.
|
To reuse the same block in different CMSs, we want the markup to reflect just that. Frontend devs care about semantics! We could implement a fix for this in Drupal and Magento plugin for the editor – but that means the block would break in WP. We are really cheering for Gutenberg to become the editor for the open web. If the markup incorrectly indicates it's for WP only, I believe wider adoption will be much harder. This assumption was confirmed when talking to frontend developers on Drupal Europe recently: They find it very hackish to have I respect the tight deadline. However, the alias fix seems to solve all this neatly: If we could use |
@perandre first, thanks for all the work and interest in using the editor for Drupal. I think it's amazing we are having these kind of conversations and opening up ways to collaborate. If we can increase this collaboration the web as a whole will benefit. To make this more productive in the midst of the push for WP 5.0 release, I suggest you to start looking at places where prefixes might be hardcoded and figure out ways to make it optional through editor configuration without necessarily having to opt-out of Eventually we may end up with |
Thanks for cheering us on, @mtias!
For most references to WP (as listed by @SofiaSousa) above: Yes. The only truly urgent part, is HTML classes. Forcing other classes inside Drupal would make it impossible to drop in WP blocks. |
Currently, HTML classes and comments use the term "WP" a lot. No problems with that – if you are using WordPress.
As some might know, we are in the process of porting Gutenberg to Drupal. While this is perhaps not a huge concern for Gutenberg devs, but I think it is worth exploring to not have WP in class names at least. If developers start relying on those classes now, things will break later.
Background: front/drupal-gutenberg#6
The text was updated successfully, but these errors were encountered: