Skip to content
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

Simplify icon related alignments and paddings #405

Merged

Conversation

PavelHolec
Copy link
Collaborator

@PavelHolec PavelHolec commented Dec 23, 2022

#317

Text line height is updated to match designs (independently on specific font). This makes it possible to simplify icon alignment, as now the .top alignment can be used for same-size icon and text.

The firstBaseline alignment for icons is still supported, but the calculation is not as precise, so it is not used in most components, unless needed (BadgeList).

image

Icon alignment is simplified (all vertical guidelines can be used) as the icon size is equal to line height

image

Component sizes match design sizing independently on used font

image

image

image

@PavelHolec PavelHolec self-assigned this Dec 23, 2022
@PavelHolec PavelHolec linked an issue Dec 23, 2022 that may be closed by this pull request
@PavelHolec PavelHolec force-pushed the 317-replace-firsttextbaseline-with-custom-firsttextcenter branch 4 times, most recently from 5526747 to 6967c64 Compare December 28, 2022 14:48
@PavelHolec PavelHolec force-pushed the 317-replace-firsttextbaseline-with-custom-firsttextcenter branch 4 times, most recently from eb6eb19 to ad1690d Compare December 29, 2022 14:24
@PavelHolec PavelHolec added this to the 2023Q1 milestone Dec 29, 2022
@PavelHolec PavelHolec force-pushed the 317-replace-firsttextbaseline-with-custom-firsttextcenter branch from d133cf7 to 9e7e870 Compare December 30, 2022 12:51
@PavelHolec PavelHolec marked this pull request as ready for review December 30, 2022 12:52
@PavelHolec PavelHolec requested a review from a team as a code owner December 30, 2022 12:52
Sources/Orbit/Components/Icon.swift Show resolved Hide resolved
Sources/Orbit/Components/Icon.swift Outdated Show resolved Hide resolved
Sources/Orbit/Components/Icon.swift Outdated Show resolved Hide resolved
Sources/Orbit/Components/Tag.swift Outdated Show resolved Hide resolved
@sjavora
Copy link
Member

sjavora commented Dec 31, 2022

Very nice!

Seeing stuff like
Screenshot 2022-12-31 at 22 09 25
...shouldn't .measured() be limited to a single line?

@PavelHolec PavelHolec force-pushed the 317-replace-firsttextbaseline-with-custom-firsttextcenter branch from 9e7e870 to d3414c0 Compare January 2, 2023 09:07
@PavelHolec
Copy link
Collaborator Author

Very nice!

Seeing stuff like Screenshot 2022-12-31 at 22 09 25 ...shouldn't .measured() be limited to a single line?

Thx, updated with a single line limit and previews.

@PavelHolec PavelHolec merged commit b914f9b into main Jan 2, 2023
@PavelHolec PavelHolec deleted the 317-replace-firsttextbaseline-with-custom-firsttextcenter branch January 2, 2023 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify icon related alignments and paddings
2 participants