Skip to content

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

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

ricardoantoniocm
Copy link
Contributor

@ricardoantoniocm ricardoantoniocm commented Jun 20, 2025

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
before-light

After
after-light

Testing

The following tests were performed to verify the changes:

  • Manual UI Verification: Tested the Project Import page with various JSON preview sizes (small, medium, large) to ensure the import dropzone content remained visible and correctly positioned.
  • Component Interaction Testing: Verified that all interactive elements within the import dropzone and JSON preview areas function as expected (e.g., file drag and drop, sample data selection, error message display).

Reviewer notes

  • Pay close attention to the visual alignment and responsiveness of the import dropzone and JSON preview areas, especially with large JSON payloads.
  • Verify the application of the new custom scrollbar styling and its impact on user experience.
  • Confirm that the CodeBlock and SimpleCard component improvements (e.g., className prop, flush props) function as intended and provide the expected styling flexibility.

Copy link

netlify bot commented Jun 20, 2025

Deploy Preview for label-studio-storybook ready!

Name Link
🔨 Latest commit 1aef49d
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/6855c0d5ed2e5d0008238396
😎 Deploy Preview https://deploy-preview-7805--label-studio-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added the fix label Jun 20, 2025
Copy link

netlify bot commented Jun 20, 2025

Deploy Preview for heartex-docs ready!

Name Link
🔨 Latest commit 1aef49d
🔍 Latest deploy log https://app.netlify.com/projects/heartex-docs/deploys/6855c0d59489f900082ec73c
😎 Deploy Preview https://deploy-preview-7805--heartex-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Jun 20, 2025

Deploy Preview for label-studio-docs-new-theme ready!

Name Link
🔨 Latest commit 1aef49d
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-docs-new-theme/deploys/6855c0d5a160d10008f86569
😎 Deploy Preview https://deploy-preview-7805--label-studio-docs-new-theme.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Jun 20, 2025

Deploy Preview for label-studio-playground ready!

Name Link
🔨 Latest commit 1aef49d
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/6855c0d514d631000834da27
😎 Deploy Preview https://deploy-preview-7805--label-studio-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ricardoantoniocm ricardoantoniocm requested a review from Copilot June 20, 2025 19:59
Copy link
Contributor

@Copilot Copilot AI left a 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.

@ricardoantoniocm
Copy link
Contributor Author

ricardoantoniocm commented Jun 20, 2025

/fm sync

Workflow run

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.

2 participants