fix(editor): center the folded toolbar and avoid squeezing the title - #294
Open
bouzidanas wants to merge 1 commit into
Open
fix(editor): center the folded toolbar and avoid squeezing the title#294bouzidanas wants to merge 1 commit into
bouzidanas wants to merge 1 commit into
Conversation
… can use available space on phones (screen width < 700px)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What & why
Below 700px, the folded creation/editing toolbar stay left-aligned while parent container keeps a fixed width. This results in unused space while the deck title is constrained to 90px.
In order to give more space to the title and also maintain a smoother position transition for the toolbar controls while crossing the 700px threshold, the parent container is forced instead to expand its width to take the remaining space (width in topbar). At the same time, the toolbar is centered in this parent. Note that while, the parent element adjusts to the space available, it still has the same floor which means the content should never get cutoff or overflow this container.
UI comparison
The comparison resizes the editor from 900px to 600px, crossing the 700px breakpoint and showing the toolbar collapse before and after the fix. Keep eye on the title as the topbar's width decreases.
How I verified it
npm run build:singlepassedChecklist
npm run build:singlesucceeds (fromslides/)node scripts/test-sync.tsif I touchedslides/src/sync/(not touched)slides/src/i18n/(none added)