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

chore: move design-tokens into merged-packages as part of migration process #92

Closed
wants to merge 168 commits into from

Conversation

georgewrmarshall
Copy link
Contributor

@georgewrmarshall georgewrmarshall commented Nov 8, 2024

Description

This PR follows [PR#6] 1. Migrate the source repo's git history into the merged-packages/ temporary directory in metamask design system as part of the package migration process guide. This step migrates the Git history of the design-tokens repository into the metamask-design-system monorepo, placing all contents under the merged-packages/design-tokens directory.

Example PR in core

Related issues

Partly fixes: #88

Manual testing steps

  1. Check the contents under merged-packages/design-tokens in the metamask-design-system repository to ensure the file structure aligns with the original design-tokens repository.
  2. Verify that the commit history within merged-packages/design-tokens accurately preserves previous design-tokens commits.
  3. Confirm successful integration within the monorepo and that no errors are introduced.

Pre-merge author checklist

  • Verified git-filter-repo installation and migration process.
  • Confirmed all design-tokens files are correctly moved to merged-packages/design-tokens.
  • Checked that the full commit history for design-tokens is retained.
  • Followed MetaMask Coding Standards.
  • Set PR status appropriately.

Pre-merge reviewer checklist

  • Confirmed that all design-tokens files appear in merged-packages/design-tokens with the correct structure.
  • Verified the commit history for design-tokens is intact and accurately reflects the original repository.
  • Ensured this PR meets all acceptance criteria.

Cal-L and others added 30 commits January 19, 2022 14:34
Pushing new tokens from Figma
* 1.0.0

* Update CHANGELOG.md

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Erik Marks <[email protected]>
* Add issue template

* Prettify issue template
* Adding css stylesheet contaiing color design tokens

* Adding css path to build

Co-authored-by: Cal Leung <[email protected]>
Co-authored-by: github-actions <[email protected]>
* Updating some token descriptions that were wrong

* Adding HEX values to descriptions and updating primary in dark mode

* Updating token descriptions for brand colors

* Adding secondary tokens to light theme

* Adding storybook and adding initial design token documentation

* Clean up

* Updating some linting issues

* Updating scripts

* Adding secondary colors to dark and updating muted for both light and dark

* Updating all muted values

* Adding storybook and adding initial design token documentation

* Clean up

* Updating some linting issues

* Updating all muted values

* Swapping background default and alternative in dark mode and updating border color to be slightly less darker

* Skip lib check

* Add license to package.json

* Updates to tokens and docs

* Restoring token json token from main

* Try to fix test but updating text

* Fix build error

Co-authored-by: Cal Leung <[email protected]>
* 1.2.0

* Update change log

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Cal Leung <[email protected]>
* 1.3.0

* Updating category in changelog

Co-authored-by: github-actions <[email protected]>
Co-authored-by: georgewrmarshall <[email protected]>
* updated dark-theme to hex (w alpha)

* Update src/figma/tokens.json

* Update src/figma/tokens.json

* Update src/figma/tokens.json

* Update src/figma/tokens.json

* Update src/figma/tokens.json

* Update src/figma/tokens.json

* updated light-theme to hex (w alpha)

* updated blue400 to correct hex

* Changed all color to HEX value

* Converting CSS variables

* Generating light theme hex value updates

* generating js dark theme tokens

* Generating dark css

* Fixing secondary default

* Fixing border default description

Co-authored-by: Hiro M <[email protected]>
georgewrmarshall and others added 14 commits May 30, 2024 14:00
* chore: upgrading storybook to 8.1.3

* chore: upgrading storybook to v8.1.4
* chore: updated css variables based on updated json

* refactor: updated css variable namings

* feat: added deprecated css files

* refactor: updated migration changelist based on comments

* refactor: updated migration doc

* refactor: updated title for css part in migration doc

* refactor: simplified deprecated tokens

* refactor: removed deprecated colors and updated migration doc

* refactor: updated css naming

* refactor: nit changes

* feat: readded overlay inverse back to css variables

* docs: updating migrations doc layout

* chore: reverting css import order

---------

Co-authored-by: georgewrmarshall <[email protected]>
* feat: updated js tokens based on updated json

* refactor: updated migration doc

* feat: added deprecated tokens

* refactor: removed deprecated tokens and updated tests

* refactor: updated migration doc

* refactor: removed addition language in migration doc

* feat: readded overlay inverse back in js tokens

* docs: updating migration docs to include js updates

* fix: adding removed heading back

---------

Co-authored-by: georgewrmarshall <[email protected]>
* 4.0.0

* chore: updating changelog

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: georgewrmarshall <[email protected]>
… Token JSON (#719)

* feat: added tests for css variables

* refactor: removed lint ignore
* feat: add dark classname

* add light class
* chore: aligning dependencies with the metamask-design-system

* chore: aligning dependencies with design-system-react
* 4.1.0

* chore: updating changelog

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: georgewrmarshall <[email protected]>
Copy link

socket-security bot commented Nov 8, 2024

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@inquirer/[email protected] None 0 3.75 kB sboudrias
npm/@inquirer/[email protected] None +2 36.4 kB sboudrias
npm/@inquirer/[email protected] None 0 7.33 kB sboudrias
npm/@lavamoat/[email protected] None 0 3.53 kB lmbot
npm/@parcel/[email protected] None 0 410 kB devongovett
npm/@parcel/[email protected] None 0 344 kB devongovett
npm/@parcel/[email protected] None 0 344 kB devongovett
npm/@parcel/[email protected] None 0 513 kB devongovett
npm/@parcel/[email protected] None 0 445 kB devongovett
npm/@parcel/[email protected] None 0 440 kB devongovett
npm/@parcel/[email protected] None 0 459 kB devongovett
npm/@parcel/[email protected] None 0 472 kB devongovett
npm/@parcel/[email protected] None 0 517 kB devongovett
npm/@parcel/[email protected] None 0 513 kB devongovett
npm/@parcel/[email protected] None 0 537 kB devongovett
npm/@parcel/[email protected] None 0 418 kB devongovett
npm/@parcel/[email protected] None 0 516 kB devongovett
npm/@parcel/[email protected] environment, shell 0 129 kB devongovett
npm/@types/[email protected] None 0 29.4 kB types
npm/@types/[email protected] None 0 12.5 kB types
npm/@types/[email protected] None 0 2.27 MB types
npm/@types/[email protected] None 0 6.26 kB types
npm/@vitejs/[email protected] None 0 38 kB vitebot
npm/[email protected] None 0 6.35 kB wooorm
npm/[email protected] environment, filesystem, unsafe 0 25.3 kB egoist
npm/[email protected] None 0 81.8 kB egoist
npm/[email protected] None 0 7.34 kB wooorm
npm/[email protected] None 0 44.6 kB wooorm
npm/[email protected] None 0 5.48 MB andrewortwein, chromatic-ci-bot, codykaup, ...6 more
npm/[email protected] environment, filesystem 0 45.6 kB jakub.pawlowicz
npm/[email protected] environment, filesystem, network 0 493 kB jakub.pawlowicz
npm/[email protected] environment 0 11.5 kB knownasilya
npm/[email protected] None 0 9 kB wooorm
npm/[email protected] None 0 22 kB wooorm
npm/[email protected] None +1 98.6 kB yannbf
npm/[email protected] None 0 23.5 kB ljharb
npm/[email protected] None 0 682 kB leebyron
npm/[email protected] filesystem Transitive: environment, shell +1 183 kB rbardini
npm/[email protected] environment, filesystem 0 14 kB egoist
npm/[email protected] None 0 17.1 kB egoist
npm/[email protected] None 0 75.8 kB jdalton
npm/[email protected] None 0 7.66 kB wooorm
npm/[email protected] None 0 26.1 kB wooorm
npm/[email protected] None +1 26.6 kB wooorm
npm/[email protected] None 0 97.8 kB wooorm
npm/[email protected] None 0 21.7 kB kmck, wooorm
npm/[email protected] None 0 21.4 kB wooorm
npm/[email protected] None 0 17.8 kB wooorm
npm/[email protected] None 0 30.9 kB wooorm
npm/[email protected] None 0 18.3 kB wooorm
npm/[email protected] None 0 21.1 kB wooorm
npm/[email protected] None 0 10 kB wooorm
npm/[email protected] None 0 149 kB wooorm
npm/[email protected] None 0 12.7 kB wooorm
npm/[email protected] None 0 293 kB wooorm
npm/[email protected] None 0 65.4 kB wooorm
npm/[email protected] None 0 79.5 kB wooorm
npm/[email protected] None 0 27.6 kB wooorm
npm/[email protected] None 0 88.4 kB wooorm
npm/[email protected] None 0 12 kB wooorm
npm/[email protected] None 0 24.4 kB wooorm
npm/[email protected] None 0 20.3 kB wooorm
npm/[email protected] None 0 19 kB wooorm
npm/[email protected] None 0 16.3 kB wooorm
npm/[email protected] None 0 12.2 kB wooorm
npm/[email protected] None 0 15.2 kB wooorm
npm/[email protected] None 0 10.6 kB wooorm
npm/[email protected] None 0 33.1 kB wooorm
npm/[email protected] None 0 14.2 kB wooorm
npm/[email protected] None 0 9.72 kB wooorm
npm/[email protected] None 0 11 kB wooorm
npm/[email protected] None 0 9.94 kB wooorm
npm/[email protected] None 0 9.28 kB wooorm
npm/[email protected] None 0 6.42 kB wooorm
npm/[email protected] None 0 9.01 kB wooorm
npm/[email protected] None 0 10.7 kB wooorm
npm/[email protected] None 0 9.08 kB wooorm
npm/[email protected] None 0 16.1 kB wooorm
npm/[email protected] None 0 51.1 kB wooorm
npm/[email protected] None 0 37.5 kB wooorm
npm/[email protected] None 0 36.7 kB wooorm
npm/[email protected] None 0 202 kB wooorm
npm/[email protected] None 0 6.51 kB isaacs
npm/[email protected] None 0 396 kB legendecas
npm/[email protected] None 0 532 kB lupomontero
npm/[email protected] environment 0 58.7 kB react-bot
npm/[email protected] None 0 21.4 kB wooorm
npm/[email protected] None 0 19.5 kB wooorm
npm/[email protected] None 0 19.6 kB wooorm
npm/[email protected] filesystem 0 6.62 kB stephenhandley
npm/[email protected] None 0 2.52 MB eventualbuddha, lukastaegert, rich_harris, ...2 more
npm/[email protected] None 0 6.6 kB sboudrias
npm/[email protected] Transitive: environment, filesystem +2 5.94 MB hcatlin, nex3, sassbot
npm/[email protected] shell 0 7.82 kB wmhilton
npm/[email protected] None 0 22.9 kB wooorm
npm/[email protected] environment, eval, filesystem Transitive: network, shell +27 209 MB egoist
npm/[email protected] None 0 84.2 kB matteo.collina
npm/[email protected] None 0 146 kB wooorm
npm/[email protected] None 0 27.1 kB wooorm
npm/[email protected] None 0 13.2 kB wooorm
npm/[email protected] None 0 32.9 kB wooorm
npm/[email protected] None 0 28.5 kB wooorm
npm/[email protected] None 0 22.3 kB wooorm
npm/[email protected] None 0 122 kB wooorm
npm/[email protected] None 0 13.8 kB wooorm

View full report↗︎

Copy link

socket-security bot commented Nov 8, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/@types/[email protected], npm/[email protected], npm/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/@esbuild/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/@storybook/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/@inquirer/[email protected], npm/@inquirer/[email protected], npm/@inquirer/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/@types/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/@lavamoat/[email protected], npm/[email protected], npm/[email protected], npm/@types/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/@vitejs/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/@parcel/[email protected], npm/@parcel/[email protected], npm/@parcel/[email protected], npm/@parcel/[email protected], npm/@parcel/[email protected], npm/@parcel/[email protected], npm/@parcel/[email protected], npm/@parcel/[email protected], npm/@parcel/[email protected], npm/@parcel/[email protected], npm/@parcel/[email protected], npm/@parcel/[email protected], npm/@parcel/[email protected], npm/@parcel/[email protected], npm/[email protected], npm/[email protected], npm/@types/[email protected], npm/[email protected]

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

@georgewrmarshall
Copy link
Contributor Author

@SocketSecurity ignore-all

  • Acceptable risk as lavamoat protects us from supply chain attacks and most of these dependencies will be consolidated in the next step
Screenshot 2024-11-08 at 3 11 23 PM

@georgewrmarshall georgewrmarshall marked this pull request as ready for review November 8, 2024 23:37
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner November 8, 2024 23:37
@georgewrmarshall georgewrmarshall mentioned this pull request Nov 9, 2024
7 tasks
Copy link

@MajorLift MajorLift left a comment

Choose a reason for hiding this comment

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

  • Confirmed that all design-tokens files appear in merged-packages/design-tokens with the correct structure.

Verified that no diffs are found when comparing the migrated package with the main branch of the original repo using the following commands:

git remote add -f design-tokens https://github.com/MetaMask/design-tokens
git remote update
git diff HEAD:merged-packages/design-tokens remotes/design-tokens/main
  • Verified the commit history for design-tokens is intact and accurately reflects the original repository.

Commit history is linear, and its readability is not affected by the excessive merge commits issue.

Screenshot 2024-11-12 at 4 28 56 AM

There's one section prior to the version reset that has nested merge commits, but this doesn't hurt readability or maintainability, and deserves to be preserved as a part of the package's development history.

Screenshot 2024-11-12 at 4 29 09 AM
  • Ensured this PR meets all acceptance criteria.

Correctly implements the requirements of PR#6.

@mcmire
Copy link

mcmire commented Nov 12, 2024

Friendly remember to NOT squash + merge this branch. Prior to merging, you will need to go into the settings for this repo and temporarily enable "merge commits", and then you can select that option before you press the big green button.

@georgewrmarshall
Copy link
Contributor Author

Moving to new PR that is up to date with main #100

@georgewrmarshall georgewrmarshall deleted the fix/88/migrate-design-tokens branch November 12, 2024 20:49
georgewrmarshall added a commit that referenced this pull request Nov 12, 2024
…rocess (#100)

Duplicate of #92
with updated `main` branch

## **Description**

This PR follows **[PR#6] 1. Migrate the source repo's git history into
the merged-packages/ temporary directory in metamask design system** as
part of the [package migration process
guide](https://github.com/MetaMask/metamask-design-system/blob/main/docs/package-migration-process-guide.md#pr6-1-migrate-the-source-repos-git-history-into-the-merged-packages-temporary-directory-in-metamask-design-system).
This step migrates the Git history of the `design-tokens` repository
into the `metamask-design-system` monorepo, placing all contents under
the `merged-packages/design-tokens` directory.

[Example PR](MetaMask/core#1872) in core

## **Related issues**

Partly fixes:
#88

## **Manual testing steps**

1. Check the contents under `merged-packages/design-tokens` in the
`metamask-design-system` repository to ensure the file structure aligns
with the original `design-tokens` repository.
2. Verify that the commit history within `merged-packages/design-tokens`
accurately preserves previous `design-tokens` commits.
3. Confirm successful integration within the monorepo and that no errors
are introduced.

## **Pre-merge author checklist**

- [x] Verified `git-filter-repo` installation and migration process.
- [x] Confirmed all `design-tokens` files are correctly moved to
`merged-packages/design-tokens`.
- [x] Checked that the full commit history for `design-tokens` is
retained.
- [x] Followed MetaMask Coding Standards.
- [x] Set PR status appropriately.

## **Pre-merge reviewer checklist**

- [ ] Confirmed that all `design-tokens` files appear in
`merged-packages/design-tokens` with the correct structure.
- [ ] Verified the commit history for `design-tokens` is intact and
accurately reflects the original repository.
- [ ] Ensured this PR meets all acceptance criteria.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate @metamask/design-tokens Package into Shared UI Component Library Monorepo