You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Aias00 (via GitHub)" <gi...@apache.org> on 2026/08/03 15:41:53 UTC
[PR] [ISSUE #882] Disable unavailable prompt enhance action [rocketmq-dashboard]
Aias00 opened a new pull request, #883:
URL: https://github.com/apache/rocketmq-dashboard/pull/883
## Summary
- mark Prompt 增强 controls as disabled on the AI assistant and home assistant inputs
- add disabled styling for toolbar buttons
- cover both pages with regression tests
## Tests
- npm test -- --run src/pages/ai/__tests__/AiPage.test.tsx src/pages/home/__tests__/HomePage.test.tsx
- npm run lint -- src/pages/ai/index.tsx src/pages/ai/__tests__/AiPage.test.tsx src/pages/home/index.tsx src/pages/home/__tests__/HomePage.test.tsx src/index.css
- git diff --check
Closes #882
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #882][ISSUE #884] Disable unavailable AI toolbar actions [rocketmq-dashboard]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #883:
URL: https://github.com/apache/rocketmq-dashboard/pull/883#discussion_r3705605175
##########
web/src/pages/home/index.tsx:
##########
Review Comment:
These disabled icon+text buttons rely on visible text for their accessible name, but they don't expose an explicit accessible description explaining why they're disabled. Consider adding `aria-disabled` (optional when using `disabled`) and/or `aria-describedby` pointing to helper text, or at least add `aria-label` that includes the reason (e.g., '工具(暂未接入)') so screen reader users get the same context as the `title` tooltip (which is not reliably announced).
##########
web/src/pages/ai/index.tsx:
##########
@@ -781,7 +781,7 @@ const AiPage = () => {
<SlidersHorizontal size={17} />
<span>工具</span>
</button>
- <button className="tool-btn">
+ <button className="tool-btn" disabled title="Prompt 增强暂未接入">
Review Comment:
Similar to HomePage, the disabled state explanation is only in `title`, which is not consistently exposed to assistive tech. Consider adding an accessible description (e.g., `aria-label` including the reason, or `aria-describedby` to helper text) so the 'unavailable' reason is available to non-mouse users.
##########
web/src/index.css:
##########
@@ -154,6 +154,14 @@ body {
.tool-btn:hover {
background: #f3f4f6;
}
+.tool-btn:disabled {
+ color: #9ca3af;
+ cursor: not-allowed;
+ opacity: 0.72;
+}
+.tool-btn:disabled:hover {
+ background: #f9fafb;
+}
Review Comment:
The disabled styling reduces opacity and changes text color, which can lower contrast and make the button label hard to read depending on the background. Consider ensuring the resulting disabled foreground/background combination meets contrast requirements (or avoid opacity changes and instead use a single, verified disabled color palette).
##########
web/src/pages/home/index.tsx:
##########
@@ -387,7 +387,7 @@ const HomePage = () => {
<SlidersHorizontal size={17} />
<span>工具</span>
</button>
- <button className="tool-btn">
+ <button className="tool-btn" disabled title="Prompt 增强暂未接入">
Review Comment:
These disabled icon+text buttons rely on visible text for their accessible name, but they don't expose an explicit accessible description explaining why they're disabled. Consider adding `aria-disabled` (optional when using `disabled`) and/or `aria-describedby` pointing to helper text, or at least add `aria-label` that includes the reason (e.g., '工具(暂未接入)') so screen reader users get the same context as the `title` tooltip (which is not reliably announced).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #882][ISSUE #884] Disable unavailable AI toolbar actions [rocketmq-dashboard]
Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 closed pull request #883: [ISSUE #882][ISSUE #884] Disable unavailable AI toolbar actions
URL: https://github.com/apache/rocketmq-dashboard/pull/883
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #882][ISSUE #884] Disable unavailable AI toolbar actions [rocketmq-dashboard]
Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 commented on PR #883:
URL: https://github.com/apache/rocketmq-dashboard/pull/883#issuecomment-5175225964
Superseded by consolidated PR #942, which contains this change and has passing checks. Closing this narrower PR to keep review focused.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org