fix(FN-2646): restore quick chat render toggle visibility

- Remove generic btn btn-icon classes from quick chat render toggles so component-specific visibility styles apply
- Increase toggle icon size and adjust default muted color for clearer eye/eye-off affordance in assistant messages
- Add explicit focus-visible ring styling for keyboard accessibility on the render toggle control
- Extend QuickChatFAB regression coverage to assert class usage, SVG icon presence, and plain/rendered toggle state transitions
This commit is contained in:
Fusion
2026-04-27 00:02:35 -07:00
committed by gsxdsm
parent 6e336ffccc
commit 1159a6de22
3 changed files with 16 additions and 5 deletions

View File

@@ -248,16 +248,21 @@ describe("QuickChatFAB", () => {
const toggles = screen.getAllByTestId("quick-chat-message-render-toggle");
expect(toggles).toHaveLength(2);
expect(toggles[0]).not.toHaveClass("btn");
expect(toggles[0]).not.toHaveClass("btn-icon");
expect(toggles[0].querySelector("svg")).toBeInTheDocument();
expect(within(firstAssistantBubble).getByText("Bold", { selector: "strong" })).toBeInTheDocument();
expect(within(secondAssistantBubble).getByText("Bold", { selector: "strong" })).toBeInTheDocument();
fireEvent.click(toggles[0]);
expect(toggles[0]).toHaveClass("quick-chat-message-render-toggle--plain");
expect(within(firstAssistantBubble).getByText(/\*\*Bold\*\* one/)).toBeInTheDocument();
expect(within(firstAssistantBubble).queryByText("Bold", { selector: "strong" })).toBeNull();
expect(within(secondAssistantBubble).getByText("Bold", { selector: "strong" })).toBeInTheDocument();
fireEvent.click(toggles[0]);
expect(toggles[0]).not.toHaveClass("quick-chat-message-render-toggle--plain");
expect(within(firstAssistantBubble).getByText("Bold", { selector: "strong" })).toBeInTheDocument();
expect(within(userBubble).getByText(/\*\*User\*\* plain/)).toBeInTheDocument();
});