-
Notifications
You must be signed in to change notification settings - Fork 149
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: panda preset package, ref leather-wallet/issues#62 #5429
Conversation
WalkthroughThe recent updates simplify the configuration of the project's theme by incorporating the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
package.json
Outdated
@@ -254,6 +254,7 @@ | |||
"@chromatic-com/storybook": "1.2.23", | |||
"@leather-wallet/prettier-config": "0.0.5", | |||
"@leather-wallet/rpc": "0.3.0", | |||
"@leather-wallet/panda-preset": "link:../mono/packages/panda-preset/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using link
here as I couldn't get file
working, maybe I am missing something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does pnpm link --global .
in preset & pnpm link @leather-wallet/panda-preset
in ext work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gave that a try and it didn't work immediately. It could be possible to get it to work with some more investigation.
panda-preset
At first pnpm link --global .
failed right away with:
ERR_PNPM_WORKSPACE_PKG_NOT_FOUND In ../../../../../Library/pnpm/global/5: "@leather-wallet/tokens@workspace:*" is in the dependencies but no package named "@leather-wallet/tokens" is present in the workspace
I changed the import to "@leather-wallet/tokens": "0.4.0"
and it then succeeded although with a different warning ERR_PNPM_PATCH_NOT_APPLIED The following patches were not applied: [email protected]
That's not something we want to do though as I think packages should refer to the workspace version workspace:*
extension
In the extension pnpm link @leather-wallet/panda-preset
fails with:
ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND No package.json (or package.yaml, or package.json5) was found in "/Users/petew/src/leather/extension/node_modules/@leather-wallet/panda-preset".
I can investigate more. It could be that I also need to add some pnpm
overrides. I was following Edgar's guide but got it working just changing from the file:
protocol to link:
a799663
to
97ea829
Compare
@@ -254,6 +254,7 @@ | |||
"@chromatic-com/storybook": "1.2.23", | |||
"@leather-wallet/prettier-config": "0.0.5", | |||
"@leather-wallet/rpc": "0.3.0", | |||
"@leather-wallet/panda-preset": "0.0.5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I manually published the package in this PR - leather-io/mono#151
I did some testing first creating my own packages and wanted to try this properly.
97ea829
to
03e73c2
Compare
This PR is consuming the new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @pete-watters, big improvement. Love seeing the monorepo come alive
03e73c2
to
473a393
Compare
Thanks @kyranjamie . There was a lot of trial and error here. I got it working in codesandbox finally also - https://codesandbox.io/p/devbox/leather-wallet-panda-preset-6nm6kc I don't have fonts added yet so will get working on that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!pnpm-lock.yaml
Files selected for processing (2)
- package.json (1 hunks)
- panda.config.ts (2 hunks)
Files skipped from review due to trivial changes (1)
- package.json
Additional comments not posted (1)
panda.config.ts (1)
14-14
: The integration of@leather-wallet/panda-preset
simplifies the theme configuration significantly.Verification successful
The integration of
@leather-wallet/panda-preset
is successful and does not introduce any issues.
- The preset is correctly listed in
panda.config.ts
,package.json
, andpnpm-lock.yaml
.- No errors or warnings related to the preset were found in the codebase.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the preset is correctly applied and does not introduce any issues. # Test: Search for any errors or warnings related to the preset in the build logs. rg --type log $'error|warning' ./logs/build.logLength of output: 105
Script:
#!/bin/bash # Description: Verify the integration of the `@leather-wallet/panda-preset` in the codebase. # Search for the usage of the preset in the codebase. rg '@leather-wallet/panda-preset' # Search for any errors or warnings related to the preset in the codebase. rg 'error|warning' --glob '*.ts' --glob '*.js' --glob '*.tsx' --glob '*.jsx'Length of output: 65347
This DRAFT demonstrates replacing the
extension
panda configuration with apreset
package from leather-io/mono#151Summary by CodeRabbit
Chores
@leather-wallet/panda-preset
version0.0.5
.Refactor
@leather-wallet/panda-preset
.