-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: resolve send button flashing issue in webview #7320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -947,7 +947,8 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>( | |
| "bg-transparent border-none p-1.5", | ||
| "rounded-md min-w-[28px] min-h-[28px]", | ||
| "text-vscode-foreground opacity-85", | ||
| "transition-all duration-150", | ||
| // Fixed: Use specific transition to prevent flashing | ||
| "transition-opacity duration-100", | ||
| "hover:opacity-100 hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]", | ||
| "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder", | ||
| "active:bg-[rgba(255,255,255,0.1)]", | ||
|
|
@@ -969,7 +970,8 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>( | |
| "bg-transparent border-none p-1.5", | ||
| "rounded-md min-w-[28px] min-h-[28px]", | ||
| "text-vscode-foreground opacity-85", | ||
| "transition-all duration-150", | ||
| // Fixed: Use specific transition to prevent flashing | ||
| "transition-opacity duration-100", | ||
| "hover:opacity-100 hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]", | ||
| "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder", | ||
| "active:bg-[rgba(255,255,255,0.1)]", | ||
|
|
@@ -1101,8 +1103,9 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>( | |
| "relative inline-flex items-center justify-center", | ||
| "bg-transparent border-none p-1.5", | ||
| "rounded-md min-w-[28px] min-h-[28px]", | ||
| "opacity-60 hover:opacity-100 text-vscode-descriptionForeground hover:text-vscode-foreground", | ||
| "transition-all duration-150", | ||
| // Fixed: Consistent with send button fix to prevent flashing | ||
| "opacity-75 hover:opacity-100 text-vscode-descriptionForeground hover:text-vscode-foreground", | ||
| "transition-opacity duration-100", | ||
| "hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]", | ||
| "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder", | ||
| "active:bg-[rgba(255,255,255,0.1)]", | ||
|
|
@@ -1124,8 +1127,12 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>( | |
| "relative inline-flex items-center justify-center", | ||
| "bg-transparent border-none p-1.5", | ||
| "rounded-md min-w-[28px] min-h-[28px]", | ||
| "opacity-60 hover:opacity-100 text-vscode-descriptionForeground hover:text-vscode-foreground", | ||
| "transition-all duration-150", | ||
| // Fixed: Removed opacity transitions that were causing flashing | ||
| // Changed from opacity-60 to opacity-75 for better visibility | ||
| // Removed transition-all to prevent unwanted animations | ||
| "opacity-75 hover:opacity-100 text-vscode-descriptionForeground hover:text-vscode-foreground", | ||
| // Use transition only for specific properties to avoid flashing | ||
| "transition-opacity duration-100", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good fix changing from to ! However, I'm wondering if we should also add to smooth out the background and border color changes on hover? This would maintain smooth transitions without causing the flashing issue. |
||
| "hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]", | ||
| "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder", | ||
| "active:bg-[rgba(255,255,255,0.1)]", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,8 +76,8 @@ export const EditModeControls: React.FC<EditModeControlsProps> = ({ | |
| "relative inline-flex items-center justify-center", | ||
| "bg-transparent border-none p-1.5", | ||
| "rounded-md min-w-[28px] min-h-[28px]", | ||
| "opacity-60 hover:opacity-100 text-vscode-descriptionForeground hover:text-vscode-foreground", | ||
| "transition-all duration-150", | ||
| "opacity-75 hover:opacity-100 text-vscode-descriptionForeground hover:text-vscode-foreground", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These buttons use while some others use . Could we pick one standard opacity value for all icon buttons to maintain visual consistency? |
||
| "transition-opacity duration-100", | ||
| "hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]", | ||
| "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder", | ||
| "active:bg-[rgba(255,255,255,0.1)]", | ||
|
|
@@ -97,8 +97,8 @@ export const EditModeControls: React.FC<EditModeControlsProps> = ({ | |
| "relative inline-flex items-center justify-center", | ||
| "bg-transparent border-none p-1.5", | ||
| "rounded-md min-w-[28px] min-h-[28px]", | ||
| "opacity-60 hover:opacity-100 text-vscode-descriptionForeground hover:text-vscode-foreground", | ||
| "transition-all duration-150", | ||
| "opacity-75 hover:opacity-100 text-vscode-descriptionForeground hover:text-vscode-foreground", | ||
| "transition-opacity duration-100", | ||
| "hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]", | ||
| "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder", | ||
| "active:bg-[rgba(255,255,255,0.1)]", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ export const IconButton: React.FC<IconButtonProps> = ({ | |
| "bg-transparent border-none p-1.5", | ||
| "rounded-md min-w-[28px] min-h-[28px]", | ||
| "text-vscode-foreground opacity-85", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This component uses as the base opacity. Since this is the reusable icon button component, whatever opacity we choose here should probably be the standard for all icon buttons. Consider aligning all button opacities with this value. |
||
| "transition-all duration-150", | ||
| "transition-opacity duration-100", | ||
| "hover:opacity-100 hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]", | ||
| "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder", | ||
| "active:bg-[rgba(255,255,255,0.1)]", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I notice we're using here for the stop TTS and add images buttons, but other buttons in this file use (lines 1107, 1133). Is this intentional, or should we standardize on one opacity value for consistency across all icon buttons?