fix(patch): cherry-pick fc42c46 to release/v0.12.0-preview.9-pr-12247 to patch version v0.12.0-preview.9 and create version 0.12.0-preview.10#12533
Conversation
Summary of ChangesHello @gemini-cli-robot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request automates the application of a critical fix to a preview release branch, leading to a new preview version. The core change ensures that the screen reader-friendly view notification in the CLI is presented to the user only once, improving the user experience by avoiding redundant messages. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a one-time notification for users with screen readers, informing them about the screen reader-friendly view and how to disable it. The implementation correctly uses a file-based flag to prevent showing the message on subsequent runs. However, I've identified a potential UI flicker issue in the current implementation and provided a suggestion to resolve it. Otherwise, the changes look good.
| const showScreenReaderNudge = | ||
| isScreenReaderEnabled && !hasSeenScreenReaderNudge; |
There was a problem hiding this comment.
The current logic for showScreenReaderNudge can cause a UI flicker. On the initial render, hasSeenScreenReaderNudge is undefined, making !hasSeenScreenReaderNudge evaluate to true. If the screen reader is enabled, the nudge will be displayed momentarily. Then, the useEffect hook runs, checks for the file, and if it exists, sets hasSeenScreenReaderNudge to true. This triggers a re-render where showScreenReaderNudge becomes false, causing the nudge to disappear.
To prevent this flicker, you should only show the nudge when you are certain it should be displayed, i.e., after the check has completed and hasSeenScreenReaderNudge is explicitly false.
| const showScreenReaderNudge = | |
| isScreenReaderEnabled && !hasSeenScreenReaderNudge; | |
| const showScreenReaderNudge = | |
| isScreenReaderEnabled && hasSeenScreenReaderNudge === false; |
|
Size Change: +1.33 kB (+0.01%) Total Size: 20.2 MB
ℹ️ View Unchanged
|
c447183
into
release/v0.12.0-preview.9-pr-12247
This PR automatically cherry-picks commit fc42c46 to patch version v0.12.0-preview.9 in the preview release to create version 0.12.0-preview.10.