Repository navigation
fix: termbase tip - #7769
Merged
Merged
fix: termbase tip#7769
Conversation
shaohuzhang1
commented
Nov 9, 2026
| </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" /> |
Contributor
Author
There was a problem hiding this comment.
Overall, the diff is syntactically fine and low-risk. Main concerns are i18n, accessibility, and flex layout robustness.
Potential issues / suggestions
-
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')"> -
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
MkTooltipsupports focus triggers, ensure it opens on keyboard focus as well as hover.
-
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-0to 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-0to the right group.
- Wrapping the
-
Avoid unnecessary
!importantunless requiredtext-N600!is valid if the project uses suffix-style important modifiers, but confirm it is needed. IfMkIconhas a default color that must be overridden, this is acceptable.
-
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.
-
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.
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.
【【知识库】自定义分词缺失提示词】
https://www.tapd.cn/tapd_fe/45245355/bug/detail/1145245355001078999