Skip to content

chore: salvage remaining UI polish from #3344#3353

Merged
jeanfbrito merged 1 commit into
masterfrom
chore/salvage-3344-ui-polish
Jun 11, 2026
Merged

chore: salvage remaining UI polish from #3344#3353
jeanfbrito merged 1 commit into
masterfrom
chore/salvage-3344-ui-polish

Conversation

@jeanfbrito

@jeanfbrito jeanfbrito commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

#3349 absorbed most of #3344's UI polish, but a set of changes never made it to master. This PR ports the remainder, verified file-by-file against the merged state:

  • Explicit font-* color tokenscolor='hint' | 'default' | 'annotation''font-hint' | 'font-default' | 'font-annotation' in ServerInfoContent, DocumentViewer, MarkdownContent, PdfContent, and TopBar, matching the token names in Fuselage's Theme.d.ts.
  • CertificatesManager action button — replaces the <a href='#'> fake-link wrapped in a Box with a proper Fuselage <Button small secondary>, fixing semantics and keyboard accessibility.
  • Font stackGlobalStyles now uses the Inter-first stack instead of bare system-ui.
  • Design context files — commits DESIGN.md, PRODUCT.md, and .impeccable/design.json introduced by chore: Polish Settings, Certificates, and Downloads views against Fuselage #3344 (current versions, updated after the Fuselage 0.78 migration).

Deliberately not ported from #3344: the Section/CertificateSection component restructure and its i18n keys — #3349 shipped a different design for those views, and porting them would revert it.

Verification

  • yarn lint and npx tsc --noEmit pass on this branch.
  • Token fixes and font stack are presentation-only; no logic changes.

Supersedes the remaining scope of #3344.

Summary by CodeRabbit

  • Documentation

    • Added comprehensive design system documentation with design principles, typography standards, color tokens, component specifications, and UI guidelines.
    • Added product requirements documentation covering brand, accessibility, and inclusion standards.
  • Style

    • Updated typography with an improved font stack featuring Inter and system font fallbacks.
    • Refined text color tokens for better visual consistency and accessibility.
  • Refactor

    • Simplified button component in Certificates Manager.

Ports the parts of #3344 that were not absorbed by the merged Fuselage
migration (#3349):

- Replace deprecated bare color tokens with explicit font-* tokens
  (font-default, font-hint, font-annotation) in ServerInfoContent,
  DocumentViewer, MarkdownContent, PdfContent, and TopBar
- Replace the fake-link action button in CertificatesManager with a
  proper Fuselage Button
- Use the Inter-first font stack in GlobalStyles instead of system-ui
- Commit the design context files (DESIGN.md, PRODUCT.md,
  .impeccable/design.json) that #3344 introduced
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR establishes a comprehensive design system for Rocket.Chat Desktop and applies new design tokens throughout the UI. It introduces design documentation, schema, and token definitions, then updates existing components to use the new token vocabulary while refactoring ActionButton for consistency.

Changes

Design System Implementation and Token Migration

Layer / File(s) Summary
Design System Documentation and Schema
.impeccable/design.json, DESIGN.md, PRODUCT.md
Defines the design system schema (version 2) with color roles and tonal ramps, typography rules, elevation/shadow specifications, motion, and breakpoints. Includes a component catalog with HTML/CSS snippets and design principles ("Fuselage Truth," stripe/mention rules, shadow/typography constraints). Documents product purpose (native shell for enterprise knowledge workers), brand personality, and WCAG 2.2 AA accessibility requirements.
Global Typography and Font Stack
src/ui/components/Shell/styles.tsx
Updates the global body font-family from system-ui to an explicit Inter font stack with platform-specific system font fallbacks (macOS, Windows, Linux).
ActionButton Component Refactoring
src/ui/components/CertificatesManager/ActionButton.tsx
Simplifies ActionButton from anchor-wrapped-in-Box to a direct Fuselage Button component; props type changes from AllHTMLAttributes<HTMLAnchorElement> to ComponentProps<typeof Button>.
Design Token Migration Across Components
src/ui/components/ServerInfoContent.tsx, src/ui/components/ServersView/DocumentViewer.tsx, src/ui/components/ServersView/MarkdownContent.tsx, src/ui/components/ServersView/PdfContent.tsx, src/ui/components/TopBar/index.tsx
Migrates color tokens from legacy vocabulary (hint, annotation, default) to new design tokens (font-hint, font-annotation, font-default) across multiple UI components for consistent semantic token usage.

🎯 2 (Simple) | ⏱️ ~10 minutes


type: chore

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: salvage remaining UI polish from #3344' clearly identifies the main change: porting UI refinements from a previous PR. It is concise, specific, and directly related to the changeset's core purpose.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • SALVAGE-3344: Request failed with status code 401

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
DESIGN.md (1)

250-256: ⚡ Quick win

Normalize the shadow token name.

Section 4 defines elevation-2x / elevation-2y, but the dropdown spec later refers to elevation-2. Please verify the canonical Fuselage token name and make the doc consistent before it becomes an implementation contract break.

Also applies to: 313-319

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@DESIGN.md` around lines 250 - 256, The doc uses both elevation-2x /
elevation-2y and elevation-2 inconsistently; pick the canonical Fuselage shadow
token name (confirm whether Fuselage exposes elevation-2 or separate
elevation-2x/elevation-2y) and update all references in this file (the Shadow
Vocabulary section and the dropdown/dialog specs at the later block referenced
around lines 313-319) to the chosen token name so the design text matches
Fuselage's actual token API (e.g., replace elevation-2x/elevation-2y with
elevation-2, or vice versa, everywhere).
.impeccable/design.json (1)

214-215: ⚡ Quick win

Remove the literal shadows from the examples.

The spec says shell-owned CSS must not author box-shadow, but these dialog and dropdown snippets still hardcode it. That makes the contract self-contradictory and easy to copy into implementation.

Also applies to: 230-231

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.impeccable/design.json around lines 214 - 215, The dialog/dropdown snippets
include hardcoded box-shadow (e.g., in the .ds-dialog CSS) which violates the
shell-owned rule; remove the literal box-shadow declarations from the snippet(s)
and either omit the property or replace it with a shell-controlled token (e.g.,
use a CSS variable like var(--rcx-shadow) instead of the literal shadow) so
.ds-dialog (and the corresponding dropdown snippet) no longer contain hardcoded
box-shadow values.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.impeccable/design.json:
- Around line 214-215: The dialog/dropdown snippets include hardcoded box-shadow
(e.g., in the .ds-dialog CSS) which violates the shell-owned rule; remove the
literal box-shadow declarations from the snippet(s) and either omit the property
or replace it with a shell-controlled token (e.g., use a CSS variable like
var(--rcx-shadow) instead of the literal shadow) so .ds-dialog (and the
corresponding dropdown snippet) no longer contain hardcoded box-shadow values.

In `@DESIGN.md`:
- Around line 250-256: The doc uses both elevation-2x / elevation-2y and
elevation-2 inconsistently; pick the canonical Fuselage shadow token name
(confirm whether Fuselage exposes elevation-2 or separate
elevation-2x/elevation-2y) and update all references in this file (the Shadow
Vocabulary section and the dropdown/dialog specs at the later block referenced
around lines 313-319) to the chosen token name so the design text matches
Fuselage's actual token API (e.g., replace elevation-2x/elevation-2y with
elevation-2, or vice versa, everywhere).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cf280ccd-7b84-4482-b05f-185ca5f9c276

📥 Commits

Reviewing files that changed from the base of the PR and between ae9fefe and 19be095.

📒 Files selected for processing (10)
  • .impeccable/design.json
  • DESIGN.md
  • PRODUCT.md
  • src/ui/components/CertificatesManager/ActionButton.tsx
  • src/ui/components/ServerInfoContent.tsx
  • src/ui/components/ServersView/DocumentViewer.tsx
  • src/ui/components/ServersView/MarkdownContent.tsx
  • src/ui/components/ServersView/PdfContent.tsx
  • src/ui/components/Shell/styles.tsx
  • src/ui/components/TopBar/index.tsx
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: build (windows-latest, windows)
  • GitHub Check: build (ubuntu-latest, linux)
  • GitHub Check: check (macos-latest)
  • GitHub Check: check (ubuntu-latest)
  • GitHub Check: check (windows-latest)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{tsx,ts}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{tsx,ts}: MANDATORY: Use Fuselage components for all UI work. Only create custom components when Fuselage doesn't provide what's needed
Import UI components from @rocket.chat/fuselage and check Theme.d.ts for valid color tokens
Use React functional components with hooks
Use PascalCase for component file names

Files:

  • src/ui/components/ServersView/DocumentViewer.tsx
  • src/ui/components/CertificatesManager/ActionButton.tsx
  • src/ui/components/ServersView/PdfContent.tsx
  • src/ui/components/Shell/styles.tsx
  • src/ui/components/TopBar/index.tsx
  • src/ui/components/ServersView/MarkdownContent.tsx
  • src/ui/components/ServerInfoContent.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Redux actions must follow FSA (Flux Standard Action) pattern
Avoid unnecessary comments — write self-documenting code through clear naming
Always verify libraries by checking official docs and .d.ts files in node_modules/. Never assume props, tokens, or APIs work without verification
Avoid subjective descriptors ('smart', 'excellent', 'dumb') in documentation and comments
Use measurable descriptions in code documentation: 'reduced memory usage', 'improved by X%' instead of subjective claims
NEVER invent metrics — don't include estimated time spent or speculated user counts. Only include numbers from actual logs, error messages, or documented sources

Files:

  • src/ui/components/ServersView/DocumentViewer.tsx
  • src/ui/components/CertificatesManager/ActionButton.tsx
  • src/ui/components/ServersView/PdfContent.tsx
  • src/ui/components/Shell/styles.tsx
  • src/ui/components/TopBar/index.tsx
  • src/ui/components/ServersView/MarkdownContent.tsx
  • src/ui/components/ServerInfoContent.tsx
🪛 ast-grep (0.43.0)
src/ui/components/ServersView/MarkdownContent.tsx

[warning] 237-237: Usage of dangerouslySetInnerHTML detected. This bypasses React's built-in XSS protection. Always sanitize HTML content using libraries like DOMPurify before injecting it into the DOM to prevent XSS attacks.
Context: dangerouslySetInnerHTML
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation

(react-unsafe-html-injection)

🪛 LanguageTool
DESIGN.md

[grammar] ~173-~173: Ensure spelling is correct
Context: ...ients, no decorative iconography in the titlebar, no busy toolbar). It is not generic Sa...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~173-~173: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...aphy in the titlebar, no busy toolbar). It is not generic SaaS marketing (no hero ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~344-~344: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rast before merging a color change. - Do use sentence case in source strings; ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~349-~349: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...y, no animated reactions in chrome. - Don't revive old Skype or legacy Teams c...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~350-~350: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...lebars, no busy multi-row toolbars. - Don't use generic SaaS marketing pattern...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~351-~351: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ds, no gradient accents on numbers. - Don't pursue pure brand minimalism (Line...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

PRODUCT.md

[grammar] ~15-~15: Ensure spelling is correct
Context: ...l around one or more Rocket.Chat server webviews. Its job is to make managing multiple w...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~32-~32: Ensure spelling is correct
Context: ...esktop chrome must not compete with the webview. Sidebar, titlebar, and dialogs exist t...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🔇 Additional comments (8)
src/ui/components/Shell/styles.tsx (1)

37-47: LGTM!

src/ui/components/CertificatesManager/ActionButton.tsx (1)

1-2: LGTM!

Also applies to: 4-4, 7-7

PRODUCT.md (1)

1-53: LGTM!

src/ui/components/ServerInfoContent.tsx (1)

127-152: LGTM!

Also applies to: 181-185, 260-305, 328-387

src/ui/components/ServersView/DocumentViewer.tsx (1)

32-39: LGTM!

src/ui/components/ServersView/MarkdownContent.tsx (1)

200-208: LGTM!

Also applies to: 231-238

src/ui/components/ServersView/PdfContent.tsx (1)

74-82: LGTM!

src/ui/components/TopBar/index.tsx (1)

21-30: LGTM!

@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

macOS installer download

@jeanfbrito jeanfbrito merged commit 609680d into master Jun 11, 2026
12 checks passed
@jeanfbrito jeanfbrito deleted the chore/salvage-3344-ui-polish branch June 11, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant