Skip to content

Conversation

@ricardoantoniocm
Copy link
Contributor

@ricardoantoniocm ricardoantoniocm commented Jun 27, 2025

Reason for change

The Storage error logs modal on the Settings > Cloud Storage page was not optimized for Dark Mode, making the text unreadable when a failed sync occurred. This PR addresses the issue by implementing design improvements to ensure the modal's readability and overall user experience in Dark Mode.

This PR also includes the following improvements:

  • Proper handling of the error overflowing the code block container.
  • Increase discoverability of Sync Log modal by adding the text "(View Logs)" when displaying the Failed status
  • Custom scrollbars
  • Added variants to Code Block component to support for negative and warning types.
  • Refactored the Code Block to apply the monospace font using the pre tag.

Screenshots

Before:

LSE
image
image

image image

After:

LSO
image
image

image image

LSE
image
image

image image

Testing

The changes have been verified by:

  • Manually testing in Dark Mode:
    • Navigating to Settings > Cloud Storage with Dark Mode enabled.
    • Triggering a failed sync to open the Storage error logs modal.
    • Confirming that the text within the modal is now optimized and readable in Dark Mode.
  • Testing copy-to-clipboard functionality:
    • Verifying that the "Copy" button correctly copies the error log text to the clipboard.
    • Confirming the button label changes to "Copied!" after a successful copy.
  • Checking updated link and text:
    • Ensuring the documentation link in the modal footer points to the correct troubleshooting page.
    • Verifying the updated text for the "Failed (View Logs)" status.

@netlify
Copy link

netlify bot commented Jun 27, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit c0ddbe4
🔍 Latest deploy log https://app.netlify.com/projects/heartex-docs/deploys/686ebf0a0c9dd20008d2638d

@ricardoantoniocm
Copy link
Contributor Author

ricardoantoniocm commented Jun 27, 2025

/git merge

Workflow run
Successfully merged: Already up to date.

@ricardoantoniocm ricardoantoniocm changed the title Fix: FIT-159: Storage error logs modal not optimized for dark mode fix: FIT-159: Storage error logs modal not optimized for dark mode Jun 27, 2025
@netlify
Copy link

netlify bot commented Jun 27, 2025

Deploy Preview for label-studio-storybook ready!

Name Link
🔨 Latest commit c0ddbe4
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/686ebf0a039f8200083359ef
😎 Deploy Preview https://deploy-preview-7867--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.

@netlify
Copy link

netlify bot commented Jun 27, 2025

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit c0ddbe4
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-docs-new-theme/deploys/686ebf0ad6429b00085c5660

@netlify
Copy link

netlify bot commented Jun 27, 2025

Deploy Preview for label-studio-playground ready!

Name Link
🔨 Latest commit c0ddbe4
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/686ebf0a1e94c900089f70db
😎 Deploy Preview https://deploy-preview-7867--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
Copy link
Contributor Author

ricardoantoniocm commented Jun 27, 2025

/git merge

Workflow run
Successfully merged: 9 files changed, 41 insertions(+), 8 deletions(-)

@ricardoantoniocm
Copy link
Contributor Author

ricardoantoniocm commented Jun 27, 2025

/git merge

Workflow run
Successfully merged: 2 files changed, 3 insertions(+), 3 deletions(-)

@ricardoantoniocm ricardoantoniocm marked this pull request as ready for review July 7, 2025 19:24
@codecov
Copy link

codecov bot commented Jul 7, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 65.41%. Comparing base (07a30ac) to head (c0ddbe4).
Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
web/libs/ui/src/lib/code-block/code-block.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7867      +/-   ##
===========================================
- Coverage    69.91%   65.41%   -4.50%     
===========================================
  Files          675      466     -209     
  Lines        48981    32238   -16743     
  Branches      8409     8409              
===========================================
- Hits         34243    21090   -13153     
+ Misses       14738    11148    -3590     
Flag Coverage Δ
pytests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

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 optimizes the Storage error logs modal for Dark Mode and refines related UI components to improve readability, styling consistency, and user interaction.

  • Introduces variant prop in CodeBlock for different visual states and adds custom scrollbars with <pre> wrapping.
  • Unifies card component borders by replacing box-shadows with border-bottoms and updating border color tokens.
  • Refactors the error-log modal in StorageSummary to use CodeBlock, adds a copy-to-clipboard CopyButton, updates modal title, footer link, and status text to "Failed (View Logs)".

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
web/libs/ui/src/lib/code-block/code-block.tsx Added variant prop/styles, custom scrollbars, refactored to wrap code in <pre>
web/libs/ui/src/lib/Card/Card.module.scss Replaced box-shadow with border-bottom; updated border color variable
web/apps/labelstudio/src/pages/Settings/StorageSettings/StorageSummary.jsx Reworked error-log modal to use CodeBlock + CopyButton, updated link, modal title, and status
web/apps/labelstudio/src/pages/Settings/StorageSettings/StorageCard.jsx Added top margin (mt-3) to the sync button container
web/apps/labelstudio/src/components/Card/Card.scss Replaced box-shadow with border-bottom for consistency

@ricardoantoniocm ricardoantoniocm enabled auto-merge (squash) July 8, 2025 19:45
@ricardoantoniocm ricardoantoniocm disabled auto-merge July 8, 2025 20:36
@ricardoantoniocm
Copy link
Contributor Author

ricardoantoniocm commented Jul 9, 2025

/fm sync

Workflow run

@ricardoantoniocm ricardoantoniocm self-assigned this Jul 9, 2025
@ricardoantoniocm
Copy link
Contributor Author

ricardoantoniocm commented Jul 9, 2025

/git merge

Workflow run
Successfully merged: Already up to date.

@ricardoantoniocm
Copy link
Contributor Author

ricardoantoniocm commented Jul 9, 2025

/git merge

Workflow run
Successfully merged: 2 files changed, 91 insertions(+), 9 deletions(-)

@ricardoantoniocm ricardoantoniocm merged commit 214e8c2 into develop Jul 9, 2025
44 of 46 checks passed
@robot-ci-heartex robot-ci-heartex deleted the fb-fit-159/storage-error-logs-modal-not-optimized-for-dark-mode branch July 9, 2025 20:38
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.

4 participants