WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.57k stars 4.22k forks source link

Typography settings changes create unexpected revisions #67270

Open afercia opened 1 week ago

afercia commented 1 week ago

Description

As an user, I would expect Global Styles revisions to be created only when I explicitly click the 'Save' button in the Site editor. As in:

It appears that saving a change in the Typography settings > Manage fonts modal dialog triggers a 'global save' and thus creates a styles revision. This is unexpected and arguably useful for users. I would want to restore a revision that includes all my changes and not be forced to restore multiple revisions.

Animated GIF to illustrate:

Image

Step-by-step reproduction instructions

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Please confirm which theme type you used for testing.

matiasbenedetto commented 6 days ago

I think the reason behind this behavior is that the font changes require database updates and filesystem changes in the server in response to user actions (install/uninstall fonts); I remember that when the font library was implemented, delaying these changes until the styles were globally saved while ensuring data coherence seemed more complex and probably not great for user experience either so it was implemented like this.

To reduce the impact of this behavior without complicated changes, maybe we can maintain the auto-save only for install/uninstall operations and disable it for activating/deactivating fonts, as shown in this issue's video.

afercia commented 6 days ago

Thanks for the insight @matiasbenedetto. I do understand the concerns about data coherence, which is a primary concern. On the other hand, I'm not sure the current behavior with the creation of extra, unexpected, revisions is ideal from an user experience perspective. Maybe it could at least be mitigated as you suggested.