Skip to content

feat: FIT-953: Improve the JSON Viewer#9245

Merged
robot-ci-heartex merged 32 commits intodevelopfrom
fb-fit-953/improve-json-viewer
Jan 29, 2026
Merged

feat: FIT-953: Improve the JSON Viewer#9245
robot-ci-heartex merged 32 commits intodevelopfrom
fb-fit-953/improve-json-viewer

Conversation

@ricardoantoniocm
Copy link
Contributor

@ricardoantoniocm ricardoantoniocm commented Jan 23, 2026

This pull request introduces a new, feature-flagged interactive JSON viewer for viewing task source data in the Data Manager, replacing the older inline implementation with a more modular and extensible approach. It adds a new TaskSourceViewer component with support for toggling between a code view and an interactive JSON viewer, improves styling and copy-to-clipboard functionality, and updates modal integration. Several supporting UI exports and feature flags are also added.

Recording

https://www.loom.com/share/d153d666f4ba407b881def51d990f3a1

Task Source Viewer Refactor and Interactive JSON Viewer Integration:

  • Introduced a new TaskSourceViewer component that loads and displays task source data, allowing users to switch between a formatted code view and an interactive JSON viewer, controlled by the FF_INTERACTIVE_JSON_VIEWER feature flag. The component supports localStorage persistence of view mode and external rendering of the view toggle (e.g., in a modal header). (TaskSourceViewer.tsx, CodeView.tsx, ViewToggle.tsx, index.ts, feature-flags.js, [1] [2] [3] [4] [5]

  • Replaced the old inline TaskSourceView implementation in the table modal with the new TaskSourceViewer, updating modal integration to allow rendering the view toggle in the modal header and adjusting modal width. (Table.jsx, web/libs/datamanager/src/components/Common/Table/Table.jsxL175-R190)

Styling and UI Improvements:

  • Added new SCSS modules for TaskSourceViewer and CodeView to improve layout, code block appearance, and copy button styling. (TaskSourceViewer.module.scss, CodeView.module.scss, [1] [2]

  • Updated global scrollbar color for consistency in dark mode. (global.scss, web/libs/editor/src/assets/styles/global.scssR207-R210)

UI Library and Icon Updates:

  • Exported the new JsonViewer component and related types from the UI library, along with Tabs components needed for the view toggle. (ui/src/index.ts, ui/src/lib/json-viewer/index.ts, [1] [2]

  • Added a new icon export IconBookOpenText to the UI icon set. (ui/src/assets/icons/index.ts, web/libs/ui/src/assets/icons/index.tsR38)

Code Cleanup:

@netlify
Copy link

netlify bot commented Jan 23, 2026

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

Name Link
🔨 Latest commit 13d281b
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-docs-new-theme/deploys/697a8fd88fc4b10008b46694

@netlify
Copy link

netlify bot commented Jan 23, 2026

Deploy Preview for label-studio-storybook ready!

Name Link
🔨 Latest commit 13d281b
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/697a8fd8eb6fb40008f99fe6
😎 Deploy Preview https://deploy-preview-9245--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 Jan 23, 2026

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 13d281b
🔍 Latest deploy log https://app.netlify.com/projects/heartex-docs/deploys/697a8fd88fc4b10008b46692

@github-actions github-actions bot added the feat label Jan 23, 2026
@netlify
Copy link

netlify bot commented Jan 23, 2026

Deploy Preview for label-studio-playground ready!

Name Link
🔨 Latest commit 13d281b
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/697a8fd8636b440008320981
😎 Deploy Preview https://deploy-preview-9245--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 Jan 26, 2026

/git merge

Workflow run
Successfully merged: create mode 100644 web/libs/core/src/lib/preview/utils.ts

@ricardoantoniocm ricardoantoniocm requested a review from a team January 26, 2026 18:51
@ricardoantoniocm ricardoantoniocm self-assigned this Jan 26, 2026
@ricardoantoniocm ricardoantoniocm marked this pull request as ready for review January 26, 2026 18:53
@ricardoantoniocm
Copy link
Contributor Author

ricardoantoniocm commented Jan 26, 2026

/git merge

Workflow run
Successfully merged: 13 files changed, 279 insertions(+), 137 deletions(-)

@ricardoantoniocm
Copy link
Contributor Author

ricardoantoniocm commented Jan 27, 2026

/git merge

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

@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 4.27350% with 112 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.39%. Comparing base (834ce89) to head (13d281b).
⚠️ Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
web/libs/ui/src/lib/json-viewer/json-viewer.tsx 3.33% 87 Missing ⚠️
.../libs/ui/src/lib/json-viewer/reader-view-modal.tsx 5.88% 16 Missing ⚠️
...libs/ui/src/lib/json-viewer/reader-view-button.tsx 10.00% 9 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (834ce89) and HEAD (13d281b). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (834ce89) HEAD (13d281b)
pytests 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9245      +/-   ##
===========================================
- Coverage    65.86%   56.39%   -9.48%     
===========================================
  Files          842      573     -269     
  Lines        65625    41336   -24289     
  Branches     11391    11433      +42     
===========================================
- Hits         43225    23311   -19914     
+ Misses       22396    18021    -4375     
  Partials         4        4              
Flag Coverage Δ
lsf-e2e 51.70% <4.27%> (-0.14%) ⬇️
lsf-integration 47.67% <4.27%> (-0.07%) ⬇️
lsf-unit 6.74% <ø> (+<0.01%) ⬆️
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.

@ricardoantoniocm
Copy link
Contributor Author

ricardoantoniocm commented Jan 28, 2026

/git merge

Workflow run
Successfully merged: create mode 100644 web/libs/ui/src/lib/tag-autocomplete/use-tag-autocomplete.ts

Copy link
Contributor

@nass600 nass600 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it ❤️

@robot-ci-heartex robot-ci-heartex merged commit 7029255 into develop Jan 29, 2026
45 of 47 checks passed
@robot-ci-heartex robot-ci-heartex deleted the fb-fit-953/improve-json-viewer branch January 29, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants