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

fix[sdks]: centering items in columns #3979

Merged
merged 4 commits into from
Mar 24, 2025

Conversation

sidmohanty11
Copy link
Contributor

@sidmohanty11 sidmohanty11 commented Mar 20, 2025

Description

when we vertically center two individual elements we use margin-top: auto, margin-bottom: auto to keep the elements in the center. Turns out the builder-columns box doesn't respect height and shrinks to what’s required and height gets applied to the root div (as we don’t use noWrap true in case of columns). To fix this, we are adding height: 100% to make sure that we respect the root div's height (if provided)

Jira
https://builder-io.atlassian.net/browse/ENG-8386

Screenshot
If relevant, add a screenshot or two of the changes you made.

Copy link

changeset-bot bot commented Mar 20, 2025

🦋 Changeset detected

Latest commit: 12c81b3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@builder.io/react Patch
@builder.io/sdk-angular Patch
@builder.io/sdk-react-nextjs Patch
@builder.io/sdk-qwik Patch
@builder.io/sdk-react Patch
@builder.io/sdk-react-native Patch
@builder.io/sdk-solid Patch
@builder.io/sdk-svelte Patch
@builder.io/sdk-vue Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

nx-cloud bot commented Mar 20, 2025

View your CI Pipeline Execution ↗ for commit 12c81b3.

Command Status Duration Result
nx test @e2e/nuxt ✅ Succeeded 9m 2s View ↗

☁️ Nx Cloud last updated this comment at 2025-03-24 05:13:25 UTC

fix
fix
@sidmohanty11 sidmohanty11 requested review from a team, builder-adi, anaghav2023 and clyde-builderio and removed request for a team, builder-adi and anaghav2023 March 20, 2025 12:02
Comment on lines +622 to +623
expect(textCenters[0]).toBeCloseTo(columnCenter, 1);
expect(textCenters[1]).toBeCloseTo(columnCenter, 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Here textCenters[0] should be equal to textCenters[1] ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup, both are vertically centered

Copy link
Contributor

@clyde-builderio clyde-builderio left a comment

Choose a reason for hiding this comment

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

LGTM

@sidmohanty11 sidmohanty11 merged commit 93999c0 into BuilderIO:main Mar 24, 2025
46 checks passed
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.

None yet

2 participants