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

feat(toolbar): Allow every element to have every color #10186

Merged
merged 9 commits into from
Mar 8, 2024

Conversation

Princesseuh
Copy link
Member

@Princesseuh Princesseuh commented Feb 21, 2024

Changes

Previously only a few elements could have different colors, buttons and badges. This PR makes it so every element can be customized in the same fashion. Additionally, it is now fully reactive, so you can change it at runtime however you want.

A notable exception however is Tooltip, because that one doesn't use standard colors and need a bit more design work.

image

(the card in this screenshot are all hovered, their neutral state has no colors.)

Testing

We don't really test the precise style of everything at this time, nonetheless everything should be clickable and everything like before, so tests should pass!

Docs

withastro/docs#7191

Copy link

changeset-bot bot commented Feb 21, 2024

🦋 Changeset detected

Latest commit: 86e84f4

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

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Feb 21, 2024
@Princesseuh Princesseuh marked this pull request as draft February 21, 2024 17:22
@Princesseuh Princesseuh added this to the 4.5 milestone Feb 21, 2024
@github-actions github-actions bot added the semver: minor Change triggers a `minor` release label Feb 21, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

Copy link
Contributor

⚖️ Bundle Size Check

Latest commit: d241e03

File Old Size New Size Change
dev-toolbar/ui-library/badge 1.62 KB 2.07 KB + 466 B
dev-toolbar/ui-library/button 1.82 KB 2.79 KB + 994 B
dev-toolbar/ui-library/card 1.63 KB 2.79 KB + 1.16 KB
dev-toolbar/ui-library/highlight 30.76 KB 32.07 KB + 1.31 KB
dev-toolbar/ui-library/toggle 1.4 KB 2.63 KB + 1.23 KB

@Princesseuh Princesseuh marked this pull request as ready for review February 22, 2024 16:05
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

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

Looks great! I worry about users accidentally passing incorrect attribute values, then losing the element because everything is invisible, so validation would be nice to have, but maybe not that critical.

Also, we have a blue palette if you want to expose that option too! Base is #3645D9, light is #BDC3FF, and dark is #0B1466.

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Docs approves!

@Princesseuh Princesseuh merged commit 959ca5f into main Mar 8, 2024
13 checks passed
@Princesseuh Princesseuh deleted the feat/toolbar-colors branch March 8, 2024 10:52
@astrobot-houston astrobot-houston mentioned this pull request Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) semver: minor Change triggers a `minor` release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants