-
Notifications
You must be signed in to change notification settings - Fork 13.5k
refactor(toolbar): improve slot layout and visibility handling #30371
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
Open
ShaneK
wants to merge
25
commits into
next
Choose a base branch
from
next-branch/FW-6439
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
3e47d64
to
5280f4f
Compare
8b66770
to
d593cb5
Compare
d593cb5
to
d9bcab6
Compare
4b8d8fa
to
f08f797
Compare
e94650e
to
9f9efb5
Compare
d277d5d
to
d3ac45d
Compare
d534843
to
132ae80
Compare
Co-authored-by: Brandy Smith <brandyscarney@users.noreply.github.com>
brandyscarney
requested changes
Apr 28, 2025
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.
A few minor changes requested. Looks really good!
Co-authored-by: Brandy Smith <brandyscarney@users.noreply.github.com>
.../modal.e2e.ts-snapshots/modal-shape-sheet-default-ionic-md-ltr-light-Mobile-Chrome-linux.png
Outdated
Show resolved
Hide resolved
brandyscarney
requested changes
Apr 29, 2025
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.
…e up unnecessary space
…mework into next-branch/FW-6439
…mework into next-branch/FW-6439
…ent can be added dynamically
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.
Issue number: resolves internal
What is the current behavior?
Currently, the Ionic theme toolbar uses
position: absolute
in modals to center its text or justtext-align: center
in other scenarios. This can lead to issues with alignment that can cause overlapping elements.What is the new behavior?
This new behavior reworks how slots get rendered and the content gets placed in the toolbar. It no longer relies on
host-context
at all (which doesn't work in Firefox) and instead usesflex
to lay out the toolbar and responsively react to the content around it.This does, however, have the drawback of preventing us from properly centering the content of the toolbar with just CSS, so there's new JavaScript that checks for content in certain slots and shows/hides slots based on whether or not there's anything in them, to allow the toolbar content to properly center itself.
toolbar-new.mp4
All of this combined leads to a much nicer toolbar experience that's actually responsive and works for any type of content - not just ion-titles.
Screenshots
Many of the screenshots had to be updated because the previous version of the toolbar was absolutely positioned in most cases and had a 3px top and bottom padding. This change removes that padding and makes it more closely align with the Figma mocks.
Does this introduce a breaking change?
Other information
Preview:
Toolbar