Skip to content

H-6460: Finish ds-components beta recipe cleanup#8673

Open
lunelson wants to merge 19 commits intomainfrom
ln/ds-random-fixing
Open

H-6460: Finish ds-components beta recipe cleanup#8673
lunelson wants to merge 19 commits intomainfrom
ln/ds-random-fixing

Conversation

@lunelson
Copy link
Copy Markdown
Contributor

@lunelson lunelson commented Apr 29, 2026

🌟 What is the purpose of this PR?

Finish the remaining @hashintel/ds-components beta-structure cleanup for H-6460 by flattening the lingering src/beta component layout, converting the last Panda config recipes to runtime recipes, and removing transitional preset and Figma tooling leftovers that are no longer part of the package workflow.

🔗 Related links

🚫 Blocked by

  • None

🔍 What does this change?

  • Flattens the remaining src/beta component roots into the sibling-file pattern (foo.tsx, foo.recipe.ts, foo.stories.ts) and updates affected story imports across the beta surface.
  • Extends the beta migration codemod and tests in scripts/migrate-beta-fractal-pilots.ts and scripts/migrate-beta-fractal-pilots.test.ts to support the later migration batches and preserve the explicit .recipe / .stories import behavior.
  • Converts the last remaining Panda defineSlotRecipe(...) holdouts to runtime sva(...) recipes, deletes src/preset/recipes.ts, and removes the temporary recipe registration wiring from src/preset.ts.
  • Keeps the preset typing workaround as a narrow suppression on colorPalette instead of the broader registry-era suppression.
  • Removes the current @hashintel/refractive usage from ds-components for now as part of the beta-surface simplification.
  • Removes cleanup leftovers that were only supporting the migration process, including HANDOFF.md, figma.config.json, and the unused @figma/code-connect dependency.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

⚠️ Known issues

  • Some beta runtime recipes still carry TODO(beta-graduation) export-line suppressions for strict-token issues; those were intentionally left for a later cleanup pass.

🐾 Next steps

  • Remove the remaining staged beta recipe suppressions as strict-token issues are fixed.
  • Start graduating stabilized beta components out of src/beta into src/components.

🛡 What tests cover this?

  • yarn fix:eslint
  • yarn fix:format
  • yarn lint:tsc
  • yarn test:unit
  • yarn build

❓ How to test this?

  1. Check out ln/ds-random-fixing.
  2. Run yarn fix:eslint, yarn fix:format, yarn lint:tsc, yarn test:unit, and yarn build from libs/@hashintel/ds-components.
  3. Confirm the package still builds cleanly, the codemod tests pass, and src/preset/recipes.ts / figma.config.json are gone.

📹 Demo

  • N/A

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment May 7, 2026 0:49am
hashdotdesign-tokens Ready Ready Preview, Comment May 7, 2026 0:49am
petrinaut Ready Ready Preview, Comment May 7, 2026 0:49am

@github-actions github-actions Bot added area/deps Relates to third-party dependencies (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team area/apps > hash.design Affects the `hash.design` design site (app) labels Apr 29, 2026
Copy link
Copy Markdown
Contributor Author

lunelson commented Apr 29, 2026

@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 29, 2026

PR Summary

Low Risk
Primarily a dependency removal and styling refactor in UI components; risk is mostly limited to visual regressions in these controls.

Overview
Removes @hashintel/refractive from @hashintel/ds-components (dependency + peerDependency), updating yarn.lock accordingly.

Replaces refractive/glass effects in SegmentedControl, Slider, and Switch with plain div elements and CSS-based styling (e.g., borders/gradients/backdrop blur), keeping the same component APIs while changing the rendered visuals.

Reviewed by Cursor Bugbot for commit 0d5eb4a. Bugbot is set up for automated code reviews on this repo. Configure here.

@graphite-app graphite-app Bot requested a review from a team April 29, 2026 16:00
borderRadius: `[${THUMB_RADIUS}px]`,
border: "[1px solid rgba(255,255,255,0.55)]",
background:
"[linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(245,247,250,0.92) 100%)]",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unused refractive props remain in SwitchProps interface

Medium Severity

The SwitchProps interface still declares specularOpacity, specularSaturation, and blurLevel props, but these were only used to configure the now-removed refractive.div component. The Switch component function at line 80 doesn't even destructure them, so passing these props has no effect. This is misleading to consumers who may believe they can control visual effects that no longer exist.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4982a3f. Configure here.

@lunelson lunelson force-pushed the ln/fe-219-stub-park-ui-patterns branch from bcf3239 to 980f377 Compare April 29, 2026 16:19
@lunelson lunelson force-pushed the ln/ds-random-fixing branch from 4982a3f to ea67c84 Compare April 29, 2026 16:19
borderRadius: `[${THUMB_RADIUS}px]`,
border: "[1px solid rgba(255,255,255,0.55)]",
background:
"[linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(245,247,250,0.92) 100%)]",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unused refractive props remain in SwitchProps interface

Low Severity

The SwitchProps interface still declares specularOpacity, specularSaturation, and blurLevel properties, but these were only used by the now-removed refractive.div component. They are not destructured in the component function (line 80–85) and have no effect on rendering. Consumers of Switch may incorrectly believe these props control visual behavior. Since the entire purpose of this PR is to remove refractive, these leftover props are dead code that belongs to the removed feature.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ea67c84. Configure here.

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Apr 29, 2026

🤖 Augment PR Summary

Summary: This PR removes the @hashintel/refractive dependency from @hashintel/ds-components.

Changes:

  • Drops @hashintel/refractive from both dependencies and peerDependencies.
  • Replaces <refractive.div> usage in SegmentedControl, Slider, and Switch with plain <div> elements.
  • Implements replacement “glass”/thumb visuals using Panda CSS (e.g. backdropFilter, borders, gradients, shadows).

Technical Notes: This keeps the Ark UI structure intact while eliminating the refractive SVG-filter based effect and its dependency edge.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

height: `[${THUMB_HEIGHT}px]`,
borderRadius: `[${THUMB_RADIUS}px]`,
border: "[1px solid rgba(255,255,255,0.45)]",
background:
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 29, 2026

Choose a reason for hiding this comment

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

thumbInnerStyles now sets an opaque background gradient, so the existing backgroundColor changes in &[data-dragging] > div (and similarly in Switch’s &[data-active] > div) likely won’t be visible; consider aligning state styling to the same CSS property to ensure the intended feedback shows up.

Severity: low

Other Locations
  • libs/@hashintel/ds-components/src/components/Switch/switch.tsx:59

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@lunelson lunelson force-pushed the ln/fe-219-stub-park-ui-patterns branch from 980f377 to 86889ff Compare April 29, 2026 20:05
@lunelson lunelson force-pushed the ln/ds-random-fixing branch from ea67c84 to 0d5eb4a Compare April 29, 2026 20:05
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0d5eb4a. Configure here.

borderRadius: `[${THUMB_RADIUS}px]`,
border: "[1px solid rgba(255,255,255,0.55)]",
background:
"[linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(245,247,250,0.92) 100%)]",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unused refractive props remain in SwitchProps interface

Low Severity

The SwitchProps interface still declares specularOpacity, specularSaturation, and blurLevel as optional props, but these were only used to configure the now-removed refractive.div component. They are never destructured or referenced in the Switch component body, making them dead code in the public API. Consumers passing these props would see no effect.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0d5eb4a. Configure here.

@lunelson lunelson marked this pull request as draft April 29, 2026 20:06
@lunelson lunelson changed the title Remove refractive from ds-components WIP removals, refinements Apr 29, 2026
Base automatically changed from ln/fe-219-stub-park-ui-patterns to main April 30, 2026 10:40
@github-actions github-actions Bot added the area/infra Relates to version control, CI, CD or IaC (area) label Apr 30, 2026
Comment on lines +342 to +344
new RegExp(
`import \\{\\s*${legacyRecipeImportName}\\s*\\} from "@hashintel/ds-helpers/recipes";`,
),
Comment on lines +342 to +344
new RegExp(
`import \\{\\s*${legacyRecipeImportName}\\s*\\} from "@hashintel/ds-helpers/recipes";`,
),
lunelson and others added 19 commits May 7, 2026 14:36
@lunelson lunelson force-pushed the ln/ds-random-fixing branch from bdc0a1a to 0722077 Compare May 7, 2026 12:36
@github-actions github-actions Bot removed the area/infra Relates to version control, CI, CD or IaC (area) label May 7, 2026
@lunelson lunelson changed the title WIP removals, refinements H-6460: Finish ds-components beta recipe cleanup May 7, 2026
@lunelson lunelson marked this pull request as ready for review May 7, 2026 12:39
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented May 7, 2026

This pull request is abnormally large and would use a significant amount of tokens to review. If you still wish to review it, comment "augment review" and we will review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash.design Affects the `hash.design` design site (app) area/deps Relates to third-party dependencies (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

3 participants