Skip to content

Adding color algo for hex colors to label component - #4712

Closed
lukasoppermann wants to merge 189 commits into
feat/add-label-componentfrom
feat/add-label-component-add-color-conversion
Closed

Adding color algo for hex colors to label component#4712
lukasoppermann wants to merge 189 commits into
feat/add-label-componentfrom
feat/add-label-component-add-color-conversion

Conversation

@lukasoppermann

@lukasoppermannlukasoppermann commented Jul 2, 2024

Copy link
Copy Markdown
Contributor

This PR adds the color algorithm to transform hex colors to something similar to variants to the new IssueLabel component.

@joshblack and anybody else who wants to chime in, please let me know anything that is not perfect and how I should improve it. Happy to learn.

siddharthkpand others added 30 commits May 1, 2024 17:33
* just trying something out
* should come sooner
* test(vrt): update snapshots
---------
Co-authored-by: siddharthkp <siddharthkp@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix: Ensure dynamically updated label is announced
* Use Link component
* Fix circular dependency
* Update approach
* Update packages/react/src/Box/Box.features.stories.tsx
* test(vrt): update snapshots
---------
Co-authored-by: khiga8 <khiga8@users.noreply.github.com>
* tests: add missing axe coverage for open ActionMenu
* Update test
* test(vrt): update snapshots
* test(vrt): update snapshots
* test(vrt): update snapshots
* test(ActionMenu): disable animations for snapshot test
---------
Co-authored-by: khiga8 <khiga8@users.noreply.github.com>
Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](mde/ejs@v3.1.9...v3.1.10)
---
updated-dependencies:
- dependency-name: ejs
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* add style for branchName as span adn add v8 tokens
* added changeset
* Update thin-ligers-turn.md
* test(vrt): update snapshots
* use not a instead of matching for span
---------
Co-authored-by: Siddharth Kshetrapal <siddharthkp@github.com>
Co-authored-by: lukasoppermann <lukasoppermann@users.noreply.github.com>
* refactor(Banner): update region to use a dedicated aria-label
* chore: add changeset, update config to exclude codesandbox
* feat: add aria-label to Banner
* Update packages/react/src/Banner/Banner.test.tsx
Co-authored-by: Kate Higa <16447748+khiga8@users.noreply.github.com>
* Update packages/react/src/Banner/Banner.test.tsx
Co-authored-by: Kate Higa <16447748+khiga8@users.noreply.github.com>
* test: update test label with aria-label
---------
Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
Co-authored-by: Kate Higa <16447748+khiga8@users.noreply.github.com>
Bumps [cross-env](https://github.com/kentcdodds/cross-env) from 7.0.2 to 7.0.3.
- [Release notes](https://github.com/kentcdodds/cross-env/releases)
- [Changelog](https://github.com/kentcdodds/cross-env/blob/master/CHANGELOG.md)
- [Commits](kentcdodds/cross-env@v7.0.2...v7.0.3)
---
updated-dependencies:
- dependency-name: cross-env
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/plugin-transform-modules-commonjs](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-modules-commonjs) from 7.23.3 to 7.24.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.24.1/packages/babel-plugin-transform-modules-commonjs)
---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-modules-commonjs"
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [jest-fail-on-console](https://github.com/ValentinH/jest-fail-on-console) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/ValentinH/jest-fail-on-console/releases)
- [Commits](ValentinH/jest-fail-on-console@v3.1.1...v3.2.0)
---
updated-dependencies:
- dependency-name: jest-fail-on-console
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
)
* feat(FeatureFlags): loosen feature flag type to accept undefined
* chore: add changeset
* Update .changeset/grumpy-coats-worry.md
---------
Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
* chore: add hydro analytics to storybook
* chore: use previewHead over managerHead
* Update build-docs
---------
Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
)
* Revert "Revert "Add support for nested submenus to `ActionMenu` (#4386)" (#4472)"
This reverts commit 82072eb.
* just want a change to trigger rebuild
---------
Co-authored-by: Siddharth Kshetrapal <siddharthkp@github.com>
Co-authored-by: Pavithra Kodmad <pksjce@github.com>
Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
* Use dynamic height and width for dialogs
* Update tall-forks-bathe.md
---------
Co-authored-by: Siddharth Kshetrapal <siddharthkp@github.com>
)
* Account for the {Space} key event
* Create quiet-lamps-kiss.md
* Update quiet-lamps-kiss.md
---------
Co-authored-by: Ian Sanders <iansan5653@github.com>
Co-authored-by: Siddharth Kshetrapal <siddharthkp@github.com>
* Export things we need for CommentEditor
* Add changeset
* Update snapshot
* Remove ComponentProps export and use React.ComponentProps in dotcom
* Remove the bits of ComponentProps
* Trigger onClose when Dialog backdrop is clicked
* Update docs with new backdrop gesture
* Add a few fixes and a test plan
* Add test for overflow
* Add overflow e2e test to actionbar
* Add tests
* Create mean-terms-bathe.md
* test(vrt): update snapshots
---------
Co-authored-by: pksjce <pksjce@users.noreply.github.com>
…4575)
* fix(react): update minimum version for @primer/live-region-element
* chore(deps): update lockfile and add changeset
* chore: change package versions to use range
* test: update test to run timers
* chore: revert order change when debugging
---------
Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
* replace leaky & with data-component
* Create stupid-stingrays-sparkle.md
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.23.7 to 7.24.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.24.5/packages/babel-core)
---
updated-dependencies:
- dependency-name: "@babel/core"
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [semver](https://github.com/npm/node-semver) from 7.6.0 to 7.6.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](npm/node-semver@v7.6.0...v7.6.2)
---
updated-dependencies:
- dependency-name: semver
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.11.20 to 20.12.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
---
updated-dependencies:
- dependency-name: "@types/node"
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [terser](https://github.com/terser/terser) from 5.27.0 to 5.31.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](terser/terser@v5.27.0...v5.31.0)
---
updated-dependencies:
- dependency-name: terser
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
joshblackand others added 23 commits August 1, 2024 17:27
Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
…in bundle (#4800)
* fix(import-css): update plugin to work with different output dirs
* feat(react): enable support for CSS Modules and emitting *.css files in bundle
* chore: update ordering for workspaces
* Update dry-trainers-protect.md
* Update package.json
* refactor: update primer/react to use postcss-preset-primer
* chore: update postcss config to mjs
* chore: restore original postcss config
---------
Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
* test(e2e): add vrt for blankslate
* test(vrt): update snapshots
---------
Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
* add missing link variant
* Create beige-schools-kneel.md
* add tooltip story
* test(vrt): update snapshots
* fix link style
* reset
* test(vrt): update snapshots
* Update .changeset/beige-schools-kneel.md
Co-authored-by: Josh Black <joshblack@github.com>
---------
Co-authored-by: langermank <langermank@users.noreply.github.com>
Co-authored-by: Josh Black <joshblack@github.com>
Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* test(e2e): add snapshots for Blankslate
* test(e2e): add support for feature flags in globals
* refactor(Blankslate): add support for css modules to Blankslate
* chore: remove local snapshots
* test(e2e): add fallback snapshots for styled-components
* chore: add changeset
* fix(stylelint): address stylelint errors
* chore: fix export size script
* chore: fix feature flag on action
* test(vrt): update snapshots
* test(vrt): update snapshots
* test(e2e): remove styled-components snapshots
* refactor(e2e): update snapshots to point to same image
---------
Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
* ui mob pair
* Create clever-birds-press.md
* test(vrt): update snapshots
* fix
* reset
* test(vrt): update snapshots
* try to only test light
* reset
* test(vrt): update snapshots
* fix test
* test(vrt): update snapshots
* lint
* Update packages/react/src/Heading/Heading.docs.json
Co-authored-by: Siddharth Kshetrapal <siddharthkp@github.com>
* fix typo
* lint
* fix story name
* reset
* fix test name
---------
Co-authored-by: langermank <langermank@users.noreply.github.com>
Co-authored-by: Siddharth Kshetrapal <siddharthkp@github.com>
Co-authored-by: Josh Black <joshblack@github.com>
* Add `className` prop to `FormControl`
* Changeset
The Banner "overview" docs mention the ability to hide the title visibly (see https://primer.style/components/banner#title), but how to actually implement this in the React component isn't documented. This change adds the correct prop, `hideTitle`, to the documented props for Banner.
* export FilteredActionList
* Create new-shirts-beam.md
* move FilteredActionList from root to experimental
* update changelog
* First commit
* update ignore
* clear up formatting
* Fix ignore again
* Test output
* missed inputs
* count css modules
* Remove push testing
* change cron to every hour
* tag the data with component name
… code accordingly (#4766)
* Update primer-react eslint plugin and update the code accordignly
* fix linting
* disable the rule
* disable the rule
* Create honest-ligers-fly.md
* add role region for pagelayout content
* add size and weight props
* add fallbacks
* polymorphic?
* test ci
* snapshots
* test(vrt): update snapshots
* lint
* Create gold-cups-explode.md
* fix playground
* refactor(e2e): update Text e2e test
---------
Co-authored-by: langermank <langermank@users.noreply.github.com>
Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
* wip
* wip wip
* add stories
* fix linting
* add tests for groups
* Update story names for e2e tests
* oops remove unintended file
* update story name
* same - update story name
* disable animations
* test(vrt): update snapshots
---------
Co-authored-by: broccolinisoup <broccolinisoup@users.noreply.github.com>
@lukasoppermann
lukasoppermannforce-pushed the feat/add-label-component-add-color-conversion branch from dc3d64e to f915fa4CompareAugust 13, 2024 06:58
@lukasoppermann
lukasoppermann requested a review from a team as a code ownerAugust 13, 2024 06:58
@lukasoppermann
lukasoppermannforce-pushed the feat/add-label-component-add-color-conversion branch from f915fa4 to aa84f41CompareAugust 13, 2024 07:00
@lukasoppermann

lukasoppermann commented Aug 23, 2024

Copy link
Copy Markdown
ContributorAuthor

Closing in favor of #4844

@jonrohan
jonrohan deleted the feat/add-label-component-add-color-conversion branch May 9, 2025 18:37
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changesetThis change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

19 participants

@lukasoppermann@joshblack@siddharthkp@khiga8@broccolinisoup@iansan5653@dgreif@randall-krauskopf@owenniblock@pksjce@jonrohan@ayy-bc@TylerJDev@MrChrisW@keithamus@JoyceZhu@bwittenberg@JelloBagel@lindseywild