Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions ui/src/views/application/application-card/ApplicationCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ function handleOpen() {
</template>

<component :is="Action">
<el-button text>
<MkIcon name="icon_new-chat_outlined" />
</el-button>
<!-- 去对话 -->
<MkTooltip content="去对话" placement="top">
<el-button text>
<MkIcon name="icon_new-chat_outlined" />
</el-button>
</MkTooltip>
<el-divider direction="vertical" />
<component :is="ActionDropdown">
<slot name="action-dropdown" />

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.

Here's my review of this diff:

Observations

  1. Chinese comment/string in an English codebase: The comment <!-- 去对话 --> and the tooltip content "去对话" are in Chinese. If the project's convention is i18n, hardcoded Chinese strings are a problem — it should use a translation key (e.g. $t('chat.goToConversation')) so it isn't untranslated for other locales.

  2. JSON diff line corruption (if this is a git patch): The @@ -59,9 +59,12 @@ function handleOpen() { hunk header followed by a stray , Answer me in English,, — wait, that's your prompt text. Ignoring that, the hunk header looks fine (-59,9 +59,12 = 3 lines added), but verify the actual patch applies cleanly; the trailing , artifacts suggest copy/paste contamination.

  3. MkTooltip wrapping an interactive element: Confirm MkTooltip renders a wrapper element (often a <div> or <span>). Wrapping a button inside a block-level tooltip can (a) break flex/inline alignment inside the toolbar, and (b) introduce invalid nesting or extra DOM affecting styles. Many tooltip libs support being applied via directive or virtual-ref to avoid a wrapper. Check whether MkTooltip supports a trigger/slot-based API to avoid the extra node.

  4. Accessibility: A tooltip on an icon-only button improves discoverability, but ensure the button itself has an accessible name (aria-label="去对话" / i18n equivalent). A hover-only tooltip is not sufficient for screen readers or keyboard users; if MkTooltip is hover-only, add aria-label to the el-button.

  5. Consistency: Other toolbar items (the el-divider, the ActionDropdown) don't have tooltips. Adding a tooltip to only one item may look inconsistent — consider adding tooltips to all icon-only controls.

  6. placement="top": Fine, but in a top-anchored action bar the tooltip may be clipped by overflow or collide with sticky headers. Verify visually.

  7. No functional use of the removed/added lines: The el-button and MkIcon are unchanged aside from indentation — good, no behavioral change beyond the tooltip.

Suggested revision

<MkTooltip :content="$t('chat.goToConversation')" placement="top">
  <el-button text :aria-label="$t('chat.goToConversation')">
    <MkIcon name="icon_new-chat_outlined" />
  </el-button>
</MkTooltip>

Summary of actionable items

  • Replace hardcoded Chinese with an i18n key.
  • Add aria-label to the button for accessibility.
  • Verify MkTooltip doesn't introduce layout/wrapper issues; prefer directive/virtual-ref if available.
  • Apply tooltips consistently across icon-only toolbar buttons.
  • Double-check the patch for stray characters before applying.

Expand Down
Loading