Skip to content

refactor(ui): adopt centralized Spacing tokens across components - #716

Merged
haiphucnguyen merged 3 commits into
mainfrom
feature/improvements
Sep 12, 2026
Merged

haiphucnguyen merged 3 commits into
mainfrom
feature/improvements

Conversation

@haiphucnguyen

Copy link
Copy Markdown
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
Copilot AI lite review requested due to automatic review settings September 12, 2026 05:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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 micro and scrollbarGutter tokens.
  • 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.dp while the horizontal insets now respond to LayoutDensity. 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, selected is now used only to choose colors; the clickable Surface does not expose the current selection to accessibility services. Preserve selectable semantics (or keep NavigationDrawerItem) 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 fontScale from the expanded profile's padding and gap, while the avatar and settings icon below still scale with LocalFontScale. 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 uses fontScale. 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,
@haiphucnguyen
haiphucnguyen merged commit ee17c5a into main Sep 12, 2026
10 checks passed
@haiphucnguyen
haiphucnguyen deleted the feature/improvements branch September 12, 2026 05:53
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.

2 participants