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 segmnet-buttons with wrong width in nested slots #2338

Closed
wants to merge 2 commits into from
Closed

Fix segmnet-buttons with wrong width in nested slots #2338

wants to merge 2 commits into from

Conversation

amir-ba
Copy link
Collaborator

@amir-ba amir-ba commented Aug 20, 2024

This PR attempts to address the issue raised here 2314:
As part of this PR the segment-button component is refactored to :

  • Use better lifecycle hooks to reduce the component render
  • Use default values for the segment IDs
  • Fallback to full-width option in the segment when calculating the child button width, when no getBoundingClientRect or width attribute exist for the segment child element. This issue will occur when the segment-button is rendered inside some other components <slot> element as it will be rendered but with display: none attribute, which will cause the component to break.

Copy link

netlify bot commented Aug 20, 2024

Deploy Preview for marvelous-moxie-a6e2fe ready!

Name Link
🔨 Latest commit bd71a12
🔍 Latest deploy log https://app.netlify.com/sites/marvelous-moxie-a6e2fe/deploys/66c4abe03bcea90008f7312e
😎 Deploy Preview https://deploy-preview-2338--marvelous-moxie-a6e2fe.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@amir-ba amir-ba changed the title Fix sgmnet-buttons with wrong width in nested slots Fix segmnet-buttons with wrong width in nested slots Aug 20, 2024
@amir-ba amir-ba added the bug Something isn't working label Aug 20, 2024
@amir-ba amir-ba closed this by deleting the head repository Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant