Skip to content

fix: termbase tip - #7769

Merged
fit2cloudwxx merged 1 commit into
v3from
pr@v3@fix_termbaseTip
Nov 9, 2026
Merged

fit2cloudwxx merged 1 commit into
v3from
pr@v3@fix_termbaseTip

Conversation

@shaohuzhang1

@shaohuzhang1 shaohuzhang1 commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

【【知识库】自定义分词缺失提示词】
https://www.tapd.cn/tapd_fe/45245355/bug/detail/1145245355001078999

</div>
<div class="flex-align-center gap-3">
<MkSearchInput v-model="searchText" class="w-60!" @change="handleSearchChange" />
<ButtonCreateTermbase v-if="!isWorkspaceSharedResource()" :knowledge-id="knowledgeId" @refresh="handleTermbasesCreated" />

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Overall, the diff is syntactically fine and low-risk. Main concerns are i18n, accessibility, and flex layout robustness.

Potential issues / suggestions

  1. Hard-coded Chinese tooltip text

    • This will not be localized if the app supports multiple languages.
    • Use the project’s i18n helper instead of a literal string:
    <MkTooltip placement="right" :content="t('termbase.searchTooltip')">
    
  2. Accessibility of the info icon

    • The tooltip is triggered by an icon only. Hover-only tooltips are not keyboard- or touch-friendly.
    • Prefer a real focusable trigger, e.g. a button, and hide the decorative icon from screen readers:
    <MkTooltip placement="right" :content="t('termbase.searchTooltip')">
      <button type="button" class="inline-flex items-center" :aria-label="t('termbase.searchTooltip')">
        <MkIcon name="icon_info_outlined" class="text-N600!" aria-hidden="true" />
      </button>
    </MkTooltip>
    
    • If MkTooltip supports focus triggers, ensure it opens on keyboard focus as well as hover.
  3. Flex layout may become less robust

    • Wrapping the <h4> in a new flex div can change shrinking behavior. Long titles may squeeze or overflow the right-side controls.
    • Consider adding min-w-0 to the left wrapper and truncation to the heading if titles can be long:
    <div class="flex-align-center gap-2 min-w-0">
      <h4 class="truncate">{{ title }}</h4>
      ...
    </div>
    
    • If the right-side controls should not shrink, add shrink-0 to the right group.
  4. Avoid unnecessary !important unless required

    • text-N600! is valid if the project uses suffix-style important modifiers, but confirm it is needed. If MkIcon has a default color that must be overridden, this is acceptable.
  5. Tooltip placement

    • placement="right" is probably fine for a left-aligned header title, but verify it does not overflow on narrow screens. Most tooltip components handle auto-flipping; if not, test responsive behavior.
  6. No performance or reactivity concerns

    • The change adds only static template markup and does not introduce new reactive state or computed overhead.

Verdict

No blocking defects in the shown diff. Recommended changes: use i18n for the tooltip text, make the tooltip trigger keyboard-accessible, and add min-w-0/truncate if title can be long.

@fit2cloudwxx
fit2cloudwxx merged commit a34b645 into v3 Nov 9, 2026
3 of 4 checks passed
@fit2cloudwxx
fit2cloudwxx deleted the pr@v3@fix_termbaseTip branch November 9, 2026 09:48
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