-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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: merge shellbox into codebox #5425
Conversation
@araujogui is attempting to deploy a commit to the OpenJS Foundation Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Also if we use an icon for the copy/paste button instead of text (which I think is better) we need to remove the translation. (And also change the width of the button) |
Personally -1 for the icons on button. Copy is more explicit that an icons. Then there's nothing specific about the design system. |
With more padding and small increase of size and ok |
My screenshot was just an example. Ideally the way of the Next.js docs would be great. But we don't have a designer, so... |
I'm learning design with Figma. Are you interested by I mock-up ? |
Thanks, but we don't need that for now. The Foundation is also in talks on providing a Designer, so that's awesome news. |
+1 for using an copy emoji |
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.
Nice work. The unit tests are failing atm, I think we just need a new snapshot.
It's also kind of annoying that the $
is copied for shell. If it's not fixed in this PR, I think it would be good to create a new issue for it.
cc @araujogui any updates here? |
Also, @araujogui can we create a prop that allows us to disable the "header" of the Codebox (like Also when the header is hidden the copy button should only appear when hovering and should be inline with the code like in the screenshot below, |
chore: delete shellbox component chore linting test: create textToCopy tests feat: wip feat: add copied icon feat: fix colors fix: increase copied timeout feat: add aria label refactor: remove shellbox i18n refactor: linting fix: some colors test: fix copy find chore: update snapshot fix: lighter copy button feat: add hideheader prop feat: trim and remove $ chore: fix linting chore: update snapshots fix: button display
0c87bfb
to
dc66e40
Compare
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.
LGTM! Fantastic work you've done here. Also, the pair programming sessions were super insightful!
This component looks way better and the new design is stunning!
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
Yeah I've seen a technique where it's visually present but not copy-able. And in case people don't know (because I didn't forever), the prompt does serve some purpose, if however small, in showing that |
Well this PR fixed the $ issue but only for $. Maybe what we need in the future is a field called prefix that allows us to add non-cooyable pieces |
I’m still not fan of Lang button. I propose to glue them and use an separator like | |
Please open the latest version of Storybook before commenting this. |
In lasted version of storybook it’s isn’t glue |
@araujogui a tiny bug the third one should not have left border-radius and the second one should. |
It is working as expected on my "mobile" viewport. @araujogui are you able to reproduce this? @AugustinMauroy can you tell me which browser you're using? |
Safari lasted on iPhone 7 (I’m on lasted storybook deploy) |
I can't reproduce this on Safari macOS, nor on Safari on my iPhone 14 Pro (iOS 17) |
I'm merging this as it is now, but @araujogui, can you make a follow-up PR with the tiny bug fix I've mentioned? This PR just had been sitting for so long, and we can reiterate the minor bugs on follow-up PRs. |
Description
Merge Shellbox into Codebox
Related Issues
Check List
npx turbo lint
to ensure the code follows the style guide. And runnpx turbo lint:fix
to fix the style errors if necessary.npx turbo format
to ensure the code follows the style guide.npx turbo test
to check if all tests are passing, and/ornpx turbo test:snapshot
to update snapshots if I created and/or updated React Components.