-
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
Adds a global save button to the site editor #47142
Conversation
Size Change: +85 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
Thanks for the PR. I wanted to connect some dots to #46985 (comment) as I'm not entirely convinced the site hub is the right place for this. What do you think? |
Personally I don't like random save buttons (like in the bottom of the sidebar). I understand the reasoning but there's also two ways to look at it, one of them is: The site editor being a single unit to edit your site and save your changes from a unique place when you're done. I'll let you all discuss this and we'll see what to do. |
65de6f9
to
df12c89
Compare
I'm repurposing this PR to try a new design: I've moved the save button to the bottom of the sidebar. There's still some work to do here though:
For now, this leaves the hub untouched. |
Flaky tests detected in 28ea03b6bd1d00a4df9485b7620f6d8bf49f9d5d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4074318409
|
df12c89
to
28ea03b
Compare
Looks good, here's how it works: I like to think that we can use the save button in-editor most of the time. I.e. you drill into templates, click an edit button next to a template, go into the full editor, save, and go back. But for the higher level actions like sorting the primary navigation, adding pages, in the future: site title/logo changes, style changes, it makes sense to be able to make a lot of those changes, label them into a bundle, save them, and schedule them for example to go out on a day a big sale is going to happen. For that, we do need a global save button that persists across sections, as it can also there serve as a hub for revisions and scheduling. Can we make it so the entire bottom save hub only appears once a change that requires saving has been made? |
I've updated the save button to show a modal. The design of the modal itself is not perfect but I think it's a good start. I can't tweak it too much for now without impacting the save panel within edit mode, so we need to be a bit careful there. |
I've updated the PR, the save hub is only available when there are changes to be saved. |
73f9cc5
to
ad7c0ba
Compare
Is this good enough for a v1 of the save button in the site editor? What needs to be improved? |
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.
I'm happy to move this forward as a step in the right direction. We can refine more in the future, but this feels like a more coherent approach.
@ntsekouras I'll take a look. I made sure to test it but for some reason it didn't break for me. |
If we have to have the panel in the design section, that's okay, it doesn't have to become modal quite yet. |
Cherry-picked this PR to the wp/6.2 branch. |
Related #36667 closes #46985
What and why?
This PR tries to add a global save button to the site editor. Check #46985 for the reasoning. The TLDR is that we're able to make edits to the templates and navigation... from within the edit mode but also outside it, meaning there's a need to save changes globally.
How?
Testing Instructions
1- Open the site editor
2- Enter edit mode and make changes to any part of the site
3- Leave the edit mode without saving
4- You should be able to save using the "save" button inside the site editor sidebar.