Skip to content

fix(Inline): Problem with alignItems center#1581

Open
yceballost wants to merge 14 commits into
masterfrom
iceballos-fix-inline-spacing
Open

fix(Inline): Problem with alignItems center#1581
yceballost wants to merge 14 commits into
masterfrom
iceballos-fix-inline-spacing

Conversation

@yceballost

@yceballost yceballost commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

This PR fix a problem with center alignments in Inline component. You can see the screenshots diff to see the improvement

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

Size stats

master this branch diff
Total JS 17 MB 17 MB +153 B
JS without icons 2.07 MB 2.07 MB +153 B
Lib overhead 96.3 kB 96.3 kB 0 B
Lib overhead (gzip) 21.1 kB 21.1 kB 0 B

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

Deploy preview for mistica-web ready!

Project:mistica-web
Status: ✅  Deploy successful!
Preview URL:https://mistica-1txts6z57-flows-projects-65bb050e.vercel.app
Latest Commit:0ecb72e

Deployed with vercel-action

@github-actions

Copy link
Copy Markdown

Accessibility report
✔️ No issues found

ℹ️ You can run this locally by executing yarn audit-accessibility.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

Screenshot tests report

✔️ All passing

containerBase,
{
cursor: 'pointer',
display: 'flex',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

This change resolve this problem, also improve the ios switch screenshots

Comment thread src/inline.tsx Outdated
Comment thread src/inline.css.ts Outdated
Comment on lines +130 to +134
// Propagate alignItems to wrapper divs so icon SVGs (inline elements) are
// correctly centered within each wrapper, not just the wrappers themselves.
// Only activates when childDisplay is set (i.e. alignItems !== 'stretch').
display: fallbackVar(childDisplay, 'block'),
alignItems: fallbackVar(childAlignItems, 'normal'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we fall back to block/normal to preserve current behavior when alignItems is stretch, but current behavior is probably wrong. I think we should fallback to flex/stretch: We could remove the conditional in the inline.tsx component and the fallback function here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to use flex / stretch values for fallback, but some screenshot breaks

inline cases, the vertical align change in this case
image

the progressBar stepped disappear
image

but we have an enhance with flex/stretch in rating!
image

But i think the first case is quite breaking if we go by this way. wdyt?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... Perhaps we can fix it in the future

@yceballost yceballost marked this pull request as ready for review June 30, 2026 23:02
@yceballost yceballost requested review from Marcosld and Copilot June 30, 2026 23:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

music for my eyes

Copilot AI review requested due to automatic review settings June 30, 2026 23:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread src/inline.css.ts Outdated
Comment on lines +130 to +134
// Propagate alignItems to wrapper divs so icon SVGs (inline elements) are
// correctly centered within each wrapper, not just the wrappers themselves.
// Only activates when childDisplay is set (i.e. alignItems !== 'stretch').
display: fallbackVar(childDisplay, 'block'),
alignItems: fallbackVar(childAlignItems, 'normal'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... Perhaps we can fix it in the future

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is expected, we are showing more space than 8px

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants