Lite: misc + refactor components#14005
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the Lite UI component layer by removing several wrapper components (e.g., Button, ShortcutButton, DropdownButton, Tooltip, ToggleGroup) and migrating call sites to Base UI primitives plus shared styling helpers (getButtonClassName, TooltipPopup, Toggle*Styles). It also tweaks panel behavior and focus logic in the workspace.
Changes:
- Replace
Buttonusages with native<button>elements styled viagetButtonClassName. - Replace the custom
Tooltip/ShortcutButtonabstractions with@base-ui/reacttooltip primitives and a sharedTooltipPopup. - Remove
DropdownButton/ButtonGroupwrappers and reimplement the commit dropdown layout directly inOutlinePanelCSS/JSX.
Reviewed changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/lite/ui/src/Updater.tsx | Replace Button with <button> + getButtonClassName. |
| apps/lite/ui/src/routes/RootLayout.tsx | Replace ShortcutButton with Base UI Tooltip primitives for the project picker trigger. |
| apps/lite/ui/src/routes/project/$id/workspace/WorkspacePage.tsx | Replace Button with <button> + getButtonClassName in error boundary UI. |
| apps/lite/ui/src/routes/project/$id/workspace/OutlinePanel.tsx | Migrate hotkey tooltips to Base UI primitives; replace dropdown/button wrappers with explicit markup. |
| apps/lite/ui/src/routes/project/$id/workspace/OutlinePanel.module.css | Add direct styling for the new commit dropdown “button group” layout. |
| apps/lite/ui/src/routes/project/$id/workspace/OperationTooltip.tsx | Replace ShortcutButton + custom tooltip wrapper with Base UI tooltip primitives and TooltipPopup. |
| apps/lite/ui/src/routes/project/$id/workspace/FilesPanel.tsx | Replace Button render usage with styled <button> in toolbar menus. |
| apps/lite/ui/src/routes/project/$id/workspace/DetailsPanel.tsx | Replace local toggle/shortcut abstractions with Base UI toggles + Toggle*Styles and Base UI tooltips. |
| apps/lite/ui/src/routes/project/$id/workspace/DependencyIndicatorButton.tsx | Replace custom tooltip wrapper with Base UI tooltip primitives + TooltipPopup. |
| apps/lite/ui/src/routes/project/$id/route.tsx | Remove an extra blank line. |
| apps/lite/ui/src/routes/index.tsx | Remove an extra blank line. |
| apps/lite/ui/src/panels/state.ts | Change initial filesVisible default (behavior change). |
| apps/lite/ui/src/panels.ts | Refactor adjacent-panel focusing logic using an explicit ordered panel list. |
| apps/lite/ui/src/components/Tooltip.tsx | Replace wrapper tooltip component with TooltipPopup presentation component. |
| apps/lite/ui/src/components/Tooltip.stories.tsx | Update Storybook usage to Base UI tooltip primitives + TooltipPopup. |
| apps/lite/ui/src/components/Tooltip.module.css | Adjust tooltip spacing/padding and remove unused .text styling. |
| apps/lite/ui/src/components/ToggleGroup.tsx | Replace wrapper components with ToggleGroupStyles / ToggleStyles render helpers. |
| apps/lite/ui/src/components/ToggleGroup.stories.tsx | Update stories to use Base UI toggle components with local style render helpers. |
| apps/lite/ui/src/components/ShortcutButton.tsx | Remove component (no longer used). |
| apps/lite/ui/src/components/ShortcutButton.stories.tsx | Remove stories (component removed). |
| apps/lite/ui/src/components/ProjectButton.tsx | Replace custom tooltip wrapper with Base UI tooltip primitives + TooltipPopup. |
| apps/lite/ui/src/components/Kbd.stories.tsx | Remove an extra blank line. |
| apps/lite/ui/src/components/Icon.tsx | Refactor icon storage to a Map, tighten typing, and simplify class/style composition. |
| apps/lite/ui/src/components/Icon.stories.tsx | Adjust story generation to consume the exported icon map. |
| apps/lite/ui/src/components/Icon.module.css | Refactor selector structure for SVG sizing. |
| apps/lite/ui/src/components/DropdownButton.tsx | Remove component (replaced by explicit markup in OutlinePanel). |
| apps/lite/ui/src/components/DropdownButton.stories.tsx | Remove stories (component removed). |
| apps/lite/ui/src/components/DiffStat.stories.tsx | Remove an extra blank line. |
| apps/lite/ui/src/components/ButtonGroup.tsx | Remove component (no longer used). |
| apps/lite/ui/src/components/ButtonGroup.stories.tsx | Remove stories (component removed). |
| apps/lite/ui/src/components/ButtonGroup.module.css | Remove styles (component removed). |
| apps/lite/ui/src/components/Button.tsx | Replace Button component with styling helper getButtonClassName + exported style types. |
| apps/lite/ui/src/components/Button.stories.tsx | Update stories to use native <button> with getButtonClassName. |
| .prettierignore | Ignore apps/lite/release output directory. |
7bcb6a2 to
2916054
Compare
2916054 to
7c797e9
Compare
9feb6c8 to
0563c2c
Compare
Not all buttons are `<button>`s, so it's better to abstract styles only.
Let's revisit this later on when we think about testing strategies. For now we'll keep it simple.
55ea7d0 to
3302900
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See commits.