Skip to content

Conversation

@lassopicasso
Copy link
Contributor

@lassopicasso lassopicasso commented Jan 6, 2026

Description

  • Replaced legacy StudioHeading one place, see image before and after.
  • Remove legacy StudioHeading, StudioIconTextfield, StudioToggleableTextfield and StudioToggleableTextfieldSchema

Not necessary to test this PR, and code review can mostly be ContentLibrary.tsx

Before image before
After image: after

Verification

  • Related issues are connected (if applicable)
  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

@lassopicasso lassopicasso added skip-manual-testing Deprecated: Use skip-second-approval instead. squad/utforming Issues that belongs to the named squad. labels Jan 6, 2026
@github-actions github-actions bot added skip-releasenotes Issues that do not make sense to list in our release notes frontend solution/studio/designer labels Jan 6, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 6, 2026

📝 Walkthrough

Walkthrough

Removed multiple deprecated legacy UI components, their stories, tests, docs and styles from the studio-components-legacy package; updated a consumer to import StudioHeading from the new package and added explicit props for the 404 heading.

Changes

Cohort / File(s) Summary
Heading export removal & consumer update
src/Designer/frontend/libs/studio-components-legacy/src/components/StudioHeading/index.tsx, src/Designer/frontend/libs/studio-content-library/src/ContentLibrary/ContentLibrary.tsx
Deleted legacy StudioHeading re-export. Updated ContentLibrary.tsx to import StudioHeading from @studio/components and added explicit props (data-size='xl', level={1}) for the 404 branch.
StudioIconTextfield — component, stories, docs, styles, tests, index
src/Designer/frontend/libs/studio-components-legacy/src/components/StudioIconTextfield/StudioIconTextfield.tsx, .../StudioIconTextfield/index.ts, .../StudioIconTextfield/StudioIconTextfield.stories.tsx, .../StudioIconTextfield/StudioIconTextfield.test.tsx, .../StudioIconTextfield/StudioIconTextfield.mdx, .../StudioIconTextfield/StudioIconTextfield.module.css
Removed the StudioIconTextfield component and its private IconLabel, deleted associated type exports, Storybook stories, MDX docs, unit tests, and CSS rules.
StudioToggleableTextfield — component, stories, tests, index, CSS
src/Designer/frontend/libs/studio-components-legacy/src/components/StudioToggleableTextfield/StudioToggleableTextfield.tsx, .../StudioToggleableTextfield/index.ts, .../StudioToggleableTextfield/StudioToggleableTextfield.stories.tsx, .../StudioToggleableTextfield/StudioToggleableTextfield.test.tsx, .../StudioToggleableTextfield/StudioToggleableTextfield.module.css
Removed the toggleable textfield component and its exported props; deleted Storybook stories, unit tests, and a single CSS rule for .propertyButton.
StudioToggleableTextfieldSchema — schema validator, component, stories, tests, docs, index
src/Designer/frontend/libs/studio-components-legacy/src/components/StudioToggleableTextfieldSchema/JsonSchemaValidator.ts, .../StudioToggleableTextfieldSchema/StudioToggleableTextfieldSchema.tsx, .../StudioToggleableTextfieldSchema/index.ts, .../StudioToggleableTextfieldSchema/StudioToggleableTextfieldSchema.stories.tsx, .../StudioToggleableTextfieldSchema/StudioToggleableTextfieldSchema.test.tsx, .../StudioToggleableTextfieldSchema/StudioToggleableTextfieldSchema.mdx, .../JsonSchemaValidator.test.ts
Removed JsonSchemaValidator utility and the schema-wrapping StudioToggleableTextfieldSchema component and types; deleted associated index re-exports, Storybook stories, MDX docs and unit tests.
Legacy components barrel
src/Designer/frontend/libs/studio-components-legacy/src/components/index.ts
Removed re-exports for StudioHeading, StudioIconTextfield, StudioToggleableTextfield, and StudioToggleableTextfieldSchema from the legacy components index barrel.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

area/ui-editor

Suggested reviewers

  • Jondyr

Poem

🐰 A tidy hop across old code tonight,
Removing nests that no longer fit quite right,
Headings moved and stories shelved away,
The rabbit hops on, light as hay. ✨

Pre-merge checks

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description identifies the changes (legacy component removal and replacement) and provides visual evidence, but lacks structured detail about impacts and testing scope. Clarify which components depend on the removed legacy components, confirm no breaking changes exist, and explain why automated tests were not added despite significant removals.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: Remove some legacy studio components' accurately summarizes the main change: removal of multiple deprecated legacy components from the studio-components-legacy library.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@lassopicasso lassopicasso linked an issue Jan 6, 2026 that may be closed by this pull request
@lassopicasso lassopicasso changed the title chore: Replace and remove legacy studio heading chore: Remove some legacy studio components Jan 6, 2026
@lassopicasso lassopicasso added the quality/debt Shortcuts made for saving time. Fixing this will make us more efficient going forward. label Jan 6, 2026
@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.24%. Comparing base (788c6d9) to head (e90feeb).
⚠️ Report is 65 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17361      +/-   ##
==========================================
- Coverage   96.26%   96.24%   -0.03%     
==========================================
  Files        2384     2392       +8     
  Lines       30282    30380      +98     
  Branches     3529     3542      +13     
==========================================
+ Hits        29150    29238      +88     
- Misses        820      832      +12     
+ Partials      312      310       -2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lassopicasso lassopicasso moved this to 🔎 In review in Team Altinn Studio Jan 6, 2026
@JamalAlabdullah JamalAlabdullah self-assigned this Jan 8, 2026
Copy link
Contributor

@JamalAlabdullah JamalAlabdullah left a comment

Choose a reason for hiding this comment

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

nice! 👍

@JamalAlabdullah JamalAlabdullah merged commit 4b04359 into main Jan 8, 2026
9 checks passed
@JamalAlabdullah JamalAlabdullah deleted the replace-and-remove-legacy-StudioHeading branch January 8, 2026 09:22
@github-project-automation github-project-automation bot moved this from 🔎 In review to ✅ Done in Team Altinn Studio Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend quality/debt Shortcuts made for saving time. Fixing this will make us more efficient going forward. skip-manual-testing Deprecated: Use skip-second-approval instead. skip-releasenotes Issues that do not make sense to list in our release notes solution/studio/designer squad/utforming Issues that belongs to the named squad.

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Legacy components to be deleted

2 participants