-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: BROS-109: Import Dropzone content area moved beyond fold if JSON preview is too large #7805
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
base: develop
Are you sure you want to change the base?
Conversation
… preview is too large
…, as well as to set the header and content elements flush with the card's border.
…he fold. Improves style of code block.
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for heartex-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for label-studio-docs-new-theme ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for label-studio-playground ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Pull Request Overview
This PR addresses the issue where the import dropzone content was pushed off-screen due to a large JSON preview by refactoring the SimpleCard and CodeBlock components and updating the associated styles and layout.
- Updated SimpleCard to include flushContent and flushHeader props for flexible spacing.
- Modified CodeBlock to accept an optional className for better styling control.
- Adjusted Import.scss and Import.jsx to constrain JSON preview height and ensure dropzone content visibility.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
web/libs/ui/src/lib/simple-card/index.tsx | Added flushContent, flushHeader, headerClassName, and contentClassName props for spacing control. |
web/libs/ui/src/lib/code-block/code-block.tsx | Enabled dynamic className support and updated styling classes. |
web/apps/labelstudio/src/pages/CreateProject/Import/Import.scss | Introduced custom scrollbar mixin and updated height constraints for JSON preview. |
web/apps/labelstudio/src/pages/CreateProject/Import/Import.jsx | Adjusted SimpleCard usage and CodeBlock container styling to improve layout. |
web/apps/labelstudio/src/pages/CreateProject/Import/Import.scss
Outdated
Show resolved
Hide resolved
/fm sync |
…-moved-beyond-fold-if-json-preview-too-large' Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/15786970999
Reason for change
The content of the import dropzone area was moving off-screen when the JSON preview was too large, hindering user experience. This change ensures that the import dropzone content remains visible regardless of the JSON preview's size.
Screenshots
Before

After

Testing
The following tests were performed to verify the changes:
Reviewer notes
CodeBlock
andSimpleCard
component improvements (e.g.,className
prop, flush props) function as intended and provide the expected styling flexibility.