-
Notifications
You must be signed in to change notification settings - Fork 112
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(side-panel): create package #3827
Conversation
Run & review this pull request in StackBlitz Codeflow. |
🦋 Changeset detectedLatest commit: a8b970d The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
4545613
to
a944d10
Compare
☁️ Nx Cloud ReportCI is running/has finished running commands for commit a8b970d. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 3 targetsSent with 💌 from NxCloud. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Size Change: +246 B (0%) Total Size: 1.05 MB
ℹ️ View Unchanged
|
Passing run #8032 ↗︎
Details:
Review all test suite changes for PR #3827 ↗︎ |
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.
Approving, but follow up suggestions:
-
Provide a hook for state management (hopefully can make a standard hook with consistent API with other components that can be easily reused for other components with that behaviour.
-
Make sure elements namings for CustomizationProvider are consistent and clear, preferably component names themselves fully. I see that otherwise these are in upper snakecase. So maybe that, but I'm not sure what is the exact reasoning for upper camel case. EDIT: I see these are only in stories/tests, initially thought they might be part of a potential Customization API.
-
Make sure horizontal scrollbar doesn't appear when the side panel is sliding in.
-
In the documentation highlight when this should be used instead of Side Modal for example.
-
Add tests for both components
INNER_SP: { paddingBottom: "space40" }, | ||
SPH: { borderBottomWidth: "borderWidth40" }, | ||
SPHA: { justifyContent: "flex-start" }, | ||
SPB: { width: "75%" }, |
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.
If there isn't a reason for using acronyms here, I think it would be preferable to see full component names.
EDIT: I misunderstood that this would be part of the Customization API for the Paste User, so not a big deal then. Although even in this context here I'd prefer to see full names.
packages/paste-core/components/side-panel/src/SidePanelHeader.tsx
Outdated
Show resolved
Hide resolved
</SidePanelHeaderActions> | ||
</SidePanelHeader> | ||
<SidePanelBody> | ||
<Box width="100%"> |
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.
question(maybe): Add negative margin here so the content is right up against the padding of Side Panel Body
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.
Or you could leave it for now, and we can update it all once we have the AI components. The Chat Composer should also be sticky to the bottom of the Side Panel.
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'll add this to the AI log ticket
packages/paste-core/components/side-panel/src/SidePanelBody.tsx
Outdated
Show resolved
Hide resolved
width="100%" | ||
height="100%" | ||
paddingLeft="space40" | ||
// @ts-expect-error no 6px spacing token but we need this amount of padding to offset the scrollbar |
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.
question: why didn't we need to do this with Side Modal?
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.
Side Modal doesn't have a stylized scrollbar and Side Panel (like Sidebar) does. Side Modal right padding starts after the scrollbar, so the right side of the content of SideModalBody jumps to the left when the content starts to scroll.
I think stylized scrollbar without the jumping is a nicer experience but it's a really small difference and doing it the way Side Modal is built would avoid using the hard-coded px value. If you want to change it to be like Side Modal I'll add it to the refinement ticket
Passing run #8033 ↗︎
Details:
Review all test suite changes for PR #3827 ↗︎ |
Introduces the Side Panel component.