Editor: Fix and align collapsing logic for "Save Draft" and "Saved" button states. #17506
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #17461
Description
#10552 introduced an issue where the breakpoints used for switching between the icon and text forms of the save, saving, and saved state buttons were not aligned.
There was a CSS breakpoint that hid the save button when the screen was wider than 600 pixels, but JS code would switch to rendering the text form only when the screen was wider than 800 pixels. This resulted in no save button being shown between those two breakpoints.
This PR fixes that by removing the 600 pixels CSS breakpoint, because JS now handles toggling between icon and text modes, so it's no longer needed. It also switches that JS breakpoint to 600 pixels so that it is aligned with the saving and saved state button breakpoints.
This makes me think that we really should have e2e tests also running in smaller screen sizes.
How has this been tested?
It was verified that when the screen is wider than 600 pixels, the long form text version of the buttons is rendered, and when the screen is narrower than 600 pixels, the icon version is rendered.
Screenshots
Long Form Save
Long Form Saved
Short Form Save
Short Form Saved
Types of Changes
Bug Fix: Show missing save button in small screen sizes.
Checklist: