Skip to content

Remove components that no other project uses - #91

Open
lucperkins wants to merge 2 commits into
mainfrom
remove-unused-components
Open

lucperkins wants to merge 2 commits into
mainfrom
remove-unused-components

Conversation

@lucperkins

@lucperkins lucperkins commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

flakehub and docs.determinate.systems are the only projects that depend on this package, according to a code search across the org. Between them they import:

  • BusyIcon
  • CodeInline (docs, through the export * in components/DS.tsx)
  • ColorProvider
  • ColorSchemeToggle
  • CopyButton
  • LabeledRadioInput and LabeledTextInput
  • PageLayout

This keeps those and everything they depend on (ClipboardIcon, ColorContext, DetSysIcon, Header, LabeledInput, Navigation, Placeholder), and removes the rest:

  • Button, CodeBlock, CodeFile, DownloadButton, GitHubButton, Highlight, InstallCTA, Link, and MacInstaller
  • the useHighlight and useObjectURL hooks, which only those used
  • the @shikijs/* packages and @radix-ui/react-icons, which only those used

This is a breaking change to the package's exports, but nothing that consumes it imports any of the removed ones.

Testing

  • npm run build, npm run format, and codespell src pass.
  • Storybook starts, and all 36 remaining stories render without errors.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Removed
    • The package no longer provides the Button, code display and highlighting, download and GitHub buttons, installation call-to-action, installer link, or Link components.
    • Related public exports and hooks for syntax highlighting and object URLs have also been removed. Existing exports such as BusyIcon and Header remain.

flakehub and docs.determinate.systems are the only consumers of this
package, and between them they import BusyIcon, CodeInline, ColorProvider,
ColorSchemeToggle, CopyButton, LabeledRadioInput, LabeledTextInput, and
PageLayout. This keeps those and everything they depend on, and removes
the rest: Button, CodeBlock, CodeFile, DownloadButton, GitHubButton,
Highlight, InstallCTA, Link, MacInstaller, and the useHighlight and
useObjectURL hooks. The Shiki packages and @radix-ui/react-icons were only
used by those, so they're gone too.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for determinate-ui ready!

Name Link
🔨 Latest commit 4f6271c
🔍 Latest deploy log https://app.netlify.com/projects/determinate-ui/deploys/6adfbc26f9631acf6f9983b9
😎 Deploy Preview https://deploy-preview-91--determinate-ui.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.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: c63d5fb4-61ee-4963-8944-3c7457f4153c
Commits

Reviewing files that changed from the base of the PR and between cc0fdb8 and 4f6271c.

Files ignored due to path filters: 1
  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 36
  • package.json
  • src/Button/Button.stories.tsx
  • src/Button/index.scss
  • src/Button/index.tsx
  • src/CodeBlock/CodeBlock.stories.tsx
  • src/CodeBlock/index.scss
  • src/CodeBlock/index.tsx
  • src/CodeFile/CodeFile.stories.tsx
  • src/CodeFile/index.scss
  • src/CodeFile/index.tsx
  • src/DownloadButton/DownloadButton.stories.tsx
  • src/DownloadButton/index.scss
  • src/DownloadButton/index.tsx
  • src/GitHubButton/GithubButton.stories.tsx
  • src/GitHubButton/index.scss
  • src/GitHubButton/index.tsx
  • src/Highlight/Highlight.stories.tsx
  • src/Highlight/index.scss
  • src/Highlight/index.tsx
  • src/InstallCTA/InstallCTA.stories.tsx
  • src/InstallCTA/InstallFromCurl.tsx
  • src/InstallCTA/NavTab.tsx
  • src/InstallCTA/TabSelector.tsx
  • src/InstallCTA/index.scss
  • src/InstallCTA/index.tsx
  • src/InstallCTA/types.ts
  • src/Link/Link.stories.ts
  • src/Link/index.scss
  • src/Link/index.tsx
  • src/MacInstaller/MacInstaller.stories.tsx
  • src/MacInstaller/index.scss
  • src/MacInstaller/index.tsx
  • src/MacInstaller/macPackageData.ts
  • src/hooks/useHighlight.ts
  • src/hooks/useObjectURL.ts
  • src/index.ts
Files with no reviewable changes: 36
  • src/Link/index.scss
  • src/CodeBlock/index.scss
  • src/GitHubButton/index.scss
  • src/InstallCTA/InstallCTA.stories.tsx
  • src/GitHubButton/GithubButton.stories.tsx
  • src/CodeFile/index.scss
  • src/CodeFile/CodeFile.stories.tsx
  • src/GitHubButton/index.tsx
  • src/InstallCTA/InstallFromCurl.tsx
  • src/Link/index.tsx
  • src/DownloadButton/index.scss
  • src/MacInstaller/macPackageData.ts
  • src/DownloadButton/index.tsx
  • src/InstallCTA/TabSelector.tsx
  • src/DownloadButton/DownloadButton.stories.tsx
  • src/InstallCTA/types.ts
  • src/Button/Button.stories.tsx
  • src/Highlight/index.scss
  • src/Button/index.scss
  • src/CodeBlock/CodeBlock.stories.tsx
  • src/Link/Link.stories.ts
  • src/MacInstaller/index.scss
  • package.json
  • src/hooks/useObjectURL.ts
  • src/Button/index.tsx
  • src/MacInstaller/index.tsx
  • src/CodeFile/index.tsx
  • src/InstallCTA/NavTab.tsx
  • src/Highlight/index.tsx
  • src/InstallCTA/index.scss
  • src/hooks/useHighlight.ts
  • src/MacInstaller/MacInstaller.stories.tsx
  • src/Highlight/Highlight.stories.tsx
  • src/index.ts
  • src/InstallCTA/index.tsx
  • src/CodeBlock/index.tsx

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

Walkthrough

The package removes several UI components, their styles and Storybook stories, and the hooks that supported code highlighting and object URLs. It also removes their exports from src/index.ts and removes @radix-ui/react-icons and Shiki packages from package.json.

Changes: UI component removal

Layer / File(s) Summary
Remove code display and download components
src/hooks/*, src/Highlight/*, src/CodeBlock/*, src/CodeFile/*, src/DownloadButton/*
Removes highlighting hooks and components, code display and download components, and their styles and stories.
Remove installation components
src/InstallCTA/*, src/MacInstaller/*
Removes the installation CTA, target detection, tab components, macOS installer, and their styles and stories.
Remove button and link components
src/Button/*, src/GitHubButton/*, src/Link/*
Removes the Button, GitHubButton, and Link components, along with their styles and stories.
Update package dependencies and public exports
src/index.ts, package.json
Removes exports for the deleted components and hooks, and removes @radix-ui/react-icons and the five @shikijs/* packages from dependencies.

Priority: Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Suggested reviewers: gustavderdrache, grahamc

Merge Risk: Minimal · up to 4f627

The removals appear consistent with the intended breaking change, with no identified issue requiring resolution before merge.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely summarizes the main change: removing unused components, hooks, stories, styles, and dependencies.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

# Conflicts:
#	package-lock.json
#	package.json

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant