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

refactor(segment): improves loading of the component and solves nested elemnts sizing issue #2358

Merged
merged 5 commits into from
Oct 21, 2024

Conversation

amir-ba
Copy link
Collaborator

@amir-ba amir-ba commented Oct 16, 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 Oct 16, 2024

Deploy Preview for marvelous-moxie-a6e2fe ready!

Name Link
🔨 Latest commit 58aa972
🔍 Latest deploy log https://app.netlify.com/sites/marvelous-moxie-a6e2fe/deploys/67110a5f98c78a00086209aa
😎 Deploy Preview https://deploy-preview-2358--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 added the bug Something isn't working label Oct 16, 2024
@amir-ba amir-ba merged commit 299be7d into telekom:main Oct 21, 2024
12 checks passed
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