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

Prevent word wrapping when badge or trailing icon is (not) present #253

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

ernstmul
Copy link
Contributor

What does this PR do?

ActionMenu Anchor and Button don't take up full available space when no icon or badge is present. And if the icon or badge is present, they take up the width 50/50 with the text (making the text wrap in most cases). This PR fixes that.

ActionMenu.Item.Button before:
image

ActionMenu.Item.Button after:
image

ActionMenu.Item.Anchor before:
image

ActionMenu.Item.Anchor after:
image

Have you read the Contributing Guidelines on issues?

Yes

Copy link

changeset-bot bot commented Jan 28, 2025

⚠️ No Changeset found

Latest commit: ad62c7d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

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

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "@appwrite.io/pink" specified in the `linked` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@appwrite.io/pink-icons" specified in the `linked` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@appwrite.io/kitchensink" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@appwrite.io/fonts" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@appwrite.io/pink-design" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

Copy link

vercel bot commented Jan 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
pink-design ❌ Failed (Inspect) Jan 28, 2025 11:21am
ui-kitchensink ❌ Failed (Inspect) Jan 28, 2025 11:21am

Copy link
Contributor

Uh oh! @ernstmul, the image you shared is missing helpful alt text. Check your pull request body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

Copy link

pkg-pr-new bot commented Jan 28, 2025

Open in Stackblitz

npm i https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@253
npm i https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@253

commit: ad62c7d

Copy link
Member

@ArmanNik ArmanNik left a comment

Choose a reason for hiding this comment

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

LGTM...What happens when the text is too long?

@ernstmul
Copy link
Contributor Author

LGTM...What happens when the text is too long?

It will wrap eventually, but this time it will be because there is no more space. Not because an empty container is taking up the space!
image

@ernstmul ernstmul merged commit 3ef7f86 into v2 Jan 28, 2025
3 of 6 checks passed
Copy link
Contributor

Uh oh! @ernstmul, the image you shared is missing helpful alt text. Check #253 (comment).

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

@ArmanNik ArmanNik deleted the prevent-word-wrapping-when-badge-or-trailing-icon branch January 28, 2025 12:18
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.

2 participants