Skip to content

fix(web): polish personal knowledge connectors UI layout and Harness styling - #1753

Open
crispinhu27 wants to merge 1 commit into
mainfrom
feat/knowledge-ui-polish
Open

crispinhu27 wants to merge 1 commit into
mainfrom
feat/knowledge-ui-polish

Conversation

@crispinhu27

Copy link
Copy Markdown
Collaborator

Summary

UI-only polish for 我的知识库 (#knowledgeView) and its connector drawer (#kbConnDrawer), aligning with LoopForge Harness UI conventions while keeping all business logic, API payloads, and test selectors intact:

  • Restore page spacing & header consistency: Remove the #knowledgeView { padding: 0 2px 32px; } override so .page-view.active top/horizontal spacing matches other settings views, add Harness refresh / plus icons to header buttons, and align button heights to Harness sizing (32px page-level, 28px inline).
  • Eliminate double-nested cards & visual duplication:
    • Replace outer .sh-card legacy gradient boxes with clean Harness .kb-panel and flat card surfaces (--hui-surface, --hui-border, --hui-panel-shadow).
    • Remove grayscale(1) / opacity: .56 dimming on unconfigured vendor cards and switch WeKnora SVG dark fills from hardcoded #112233 to currentColor for dark mode legibility.
    • Keep only one solid primary CTA at the page header (添加连接器), changing quick-setup card CTAs to soft accent (.kb-btn.xs.soft) and connector type list CTAs to neutral outline (.kb-btn.xs).
    • Convert the empty-state type cards from an unbalanced 4+2 grid into a single Harness panel of hairline-divided rows with brand/protocol icons for all connector types (including SiYuan, MCP, and third-party plugins).
  • Prioritize active connectors & polish details:
    • Show 已接入连接器 first when connectors exist, followed by 常用知识库 · 快速接入 and 知识库与文档调用统计.
    • Replace invalid --hui-surface-subtle / slate rgba fallbacks with --hui-canvas / --hui-soft across notice strip, sub-sources, usage tabs/filters, and drawer controls, and align #kbConnDrawer input heights and checkbox row alignment.
    • Add English translations in web/i18n-en.js for newly introduced section labels.

Verification

  • node --check web/app/knowledge.js
  • node --test webtest/tests/knowledge-management.test.mjs webtest/tests/i18n-knowledge.test.mjs webtest/tests/i18n-page-copy.test.mjs webtest/tests/i18n-pages.test.mjs webtest/tests/views.test.mjs (28/28 passed)
  • python3 scripts/check-public.py
  • Visual inspection in headless Chrome across light/dark themes and empty/populated/drawer states.

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