Repository navigation
refactor(ui): adopt centralized Spacing tokens across components - #716
Merged
Merged
Conversation
haiphucnguyen
commented
Sep 12, 2026
Collaborator
- Replace hardcoded dp dimensions with semantic Spacing tokens across UI components
- Introduce micro and scrollbarGutter spacing values for layout consistency
- Add star history section and pull request template to documentation
- Replace hardcoded dp dimensions with semantic Spacing tokens across UI components - Introduce micro and scrollbarGutter spacing values for layout consistency - Add star history section and pull request template to documentation
There was a problem hiding this comment.
🟡 Changes recommended
A critical compile error and unresolved moderate spacing and accessibility issues remain.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR centralizes Compose UI spacing through semantic Spacing tokens and adds documentation assets.
Changes:
- Adds
microandscrollbarGuttertokens. - Migrates spacing across desktop and shared UI components.
- Adds Star History documentation and a pull request template.
File summaries
| File | Reviewed changes | Review findings |
|---|---|---|
README.md |
Adds Star History documentation. | — |
desktop/src/main/kotlin/io/askimo/desktop/shell/TelemetryPanel.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/shell/ProviderModelPanel.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/shell/NavigationSidebar.kt |
Centralizes profile spacing. | Moderate (1 vote): profile padding and gaps no longer scale with fontScale. Moderate (1 vote): profile details gap no longer follows LocalFontScale. Moderate (1 vote): collapsed profile padding no longer scales with LocalFontScale. |
desktop/src/main/kotlin/io/askimo/desktop/shell/FooterBar.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/shell/ComposeTopMenuBar.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/settings/WebSearchSettingsSection.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/settings/VoiceSettingsSection.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/settings/ProviderSelectionDialog.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/settings/NetworkSettingsSection.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/settings/McpServerManagementSection.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/settings/GroupedModelList.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/settings/FileViewerDialog.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/settings/AIProviderSettingsSection.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/settings/AdvancedSettingsSection.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/settings/AboutSettingsSection.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/project/UrlInputDialog.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/project/ProjectView.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/project/ProjectsView.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/project/NewProjectDialog.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/project/EditProjectDialog.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/project/DeleteProjectDialog.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/project/AddReferenceMaterialDialog.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/plan/PlanEditorView.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/chat/RagSourcesTree.kt |
Applies spacing tokens. | — |
desktop/src/main/kotlin/io/askimo/desktop/chat/ProjectSidePanel.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/terminal/TerminalPanel.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/shell/StarPromptDialog.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/shell/NotificationComponents.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/shell/NavigationSidebar.kt |
Refactors sidebar items and spacing. | Critical (2 votes): Surface has no selected parameter, so the helper does not compile. Moderate (1 vote): preserve selectable semantics so screen readers identify the active item. |
desktop-shared/src/main/kotlin/io/askimo/ui/shell/EventLogWindow.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/shell/EventLogPanel.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/settings/ShortcutsSettingsSection.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/settings/AppearanceSettingsSection.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/settings/AgentsSettingsSection.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/session/SessionsView.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/plan/PlansGalleryView.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/plan/PlanHistorySidePanel.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/plan/PlanDetailView.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/onboarding/OnboardingWizardDialog.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/mcp/McpToolsDialog.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/mcp/McpServerCatalogDialog.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/discover/DiscoverView.kt |
Applies spacing tokens. | Moderate (1 vote): top and bottom insets remain fixed at 32.dp while horizontal insets scale with LayoutDensity. |
desktop-shared/src/main/kotlin/io/askimo/ui/common/ui/Tooltip.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/common/ui/MarkdownText.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/common/ui/FilePreviewPane.kt |
Applies scrollbar spacing token. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/common/ui/CodeViewerBlock.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/common/theme/Spacing.kt |
Adds spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/common/components/TablePagination.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/common/components/Buttons.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/common/components/ActionInputField.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/chat/OutdatedMessageComponents.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/chat/MessageComponents.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/chat/ChatView.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/chat/ChatInputField.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/bookmarks/BookmarksView.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/agent/WorkspaceFilesPanel.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/agent/AgentView.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/agent/AgentRunArea.kt |
Applies spacing tokens. | — |
desktop-shared/src/main/kotlin/io/askimo/ui/agent/AgentHistoryPanel.kt |
Applies spacing tokens. | — |
.github/PULL_REQUEST_TEMPLATE.md |
Adds pull request guidance. | — |
Review details
Suppressed comments (5)
desktop-shared/src/main/kotlin/io/askimo/ui/discover/DiscoverView.kt:141
- This padding migration leaves the top and bottom insets as fixed
32.dpwhile the horizontal insets now respond toLayoutDensity. Compact and spacious layouts will therefore scale only horizontally here; use a composed spacing expression (or a dedicated token) for these vertical insets too.
.padding(start = Spacing.extraLarge, end = Spacing.scrollbarGutter, top = 32.dp, bottom = 32.dp),
desktop-shared/src/main/kotlin/io/askimo/ui/shell/NavigationSidebar.kt:602
- After replacing
NavigationDrawerItem,selectedis now used only to choose colors; the clickableSurfacedoes not expose the current selection to accessibility services. Preserve selectable semantics (or keepNavigationDrawerItem) so screen readers can identify the active navigation/session item.
desktop/src/main/kotlin/io/askimo/desktop/shell/NavigationSidebar.kt:223 - The profile details gap also no longer follows
LocalFontScale. With a large custom font scale, the name and occupation text become larger while this gap stays at the compact 2.dp token, changing the existing scaled layout and potentially crowding the row.
desktop/src/main/kotlin/io/askimo/desktop/shell/NavigationSidebar.kt:209 - These replacements drop
fontScalefrom the expanded profile's padding and gap, while the avatar and settings icon below still scale withLocalFontScale. At larger UI font sizes the row content grows but these insets remain fixed, so this section no longer scales as it did before; apply the font scale to both spacing tokens as well.
desktop/src/main/kotlin/io/askimo/desktop/shell/NavigationSidebar.kt:279 - The collapsed profile item's vertical padding similarly stopped scaling with
LocalFontScale, even though its avatar still usesfontScale. Restore that multiplier so the collapsed profile remains sized consistently with the expanded version and the previous behavior.
- Files reviewed: 61/61 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+599
to
+603
| Surface( | ||
| selected = selected, | ||
| onClick = onClick, | ||
| modifier = modifier.fillMaxWidth(), | ||
| shape = shape, |
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.