-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Prevent the saving button from showing when renaming templates #48399
Conversation
Size Change: +547 B (0%) Total Size: 1.34 MB
ℹ️ View Unchanged
|
Flaky tests detected in b79a4b7. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4260821385
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1- Rename a template from the template list page
2- The saving button doesn't show up in the sidebar.
@youknowriad, I think the wasDirty
condition might need some adjustments. After saving the name change, I can still see the Save button in the sidebar.
CleanShot.2023-02-24.at.14.03.49.mp4
b79a4b7
to
c2d33e4
Compare
It turns out my "wasDirty" logic was kind of fragile. I can't think of a way to make it work properly so basically I just reverted that part. I see three options here: 1- Do not show the button at all when we're "saving" changes. I lean towards 1 personally |
I've updated this PR and added the "unsaved changes" count and kept the button saying "Saved" when it should be disabled. This gets us close to the proposed designs by @jameskoster
I'm thinking maybe we should start simple for now. Any thoughts? @jameskoster @jasmussen |
Here's a quick GIF showing the saved state button and its behaviors: I feel like this one is close to being solid, and is most definitely a big step up compared to trunk, so it's pretty key we land this one soon. Would appreciate eyes by @richtabor and @jameskoster |
This looks great and works well, thank you. One tiny detail I'd change; the text and button look a bit tight, could we increase the gap from 8 to 16px? |
I just cherry-picked this PR to the wp/6.2 branch to get it included in the next release: 2ac3cf1 |
closes #48345
What?
This PR prevents the save button form showing in the site editor like confirmed in this issue #48345 but also prevents the "isSaving" button from showing when we trigger a direct save elsewhere (like when renaming templates).
Why?
See reasoning here #48345 (comment)
Testing Instructions
1- Make an edit
2- Trigger a save from the sidebar of the site editor or using
ctrl + s
3- The saving button is visible when the save is in progress.
1- Rename a template from the template list page
2- The saving button doesn't show up in the sidebar.