Skip to content

fix(dashboard): make toast text selectable#7894

Open
mvanhorn wants to merge 1 commit intographql-hive:mainfrom
mvanhorn:fix/toast-text-selectable
Open

fix(dashboard): make toast text selectable#7894
mvanhorn wants to merge 1 commit intographql-hive:mainfrom
mvanhorn:fix/toast-text-selectable

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

@mvanhorn mvanhorn commented Mar 23, 2026

Background

Resolves #7012. Closes #7914 Toast text cannot be selected because Radix UI Toast's swipe gesture handling intercepts pointer events, overriding the browser's text selection behavior.

Description

Adds select-text (Tailwind's user-select: text) to ToastTitle and ToastDescription in packages/web/app/src/components/ui/toast.tsx. This restores text selection within toast content while preserving the swipe-to-dismiss behavior on the toast container itself.

The codebase already uses select-text and select-none utilities across other components (dropdown menus, sidebar badges, callouts).

Checklist

  • Input validation
  • Output encoding
  • Error handling and logging
  • Data protection
  • Testing

This contribution was developed with AI assistance (Claude Code).

Add `select-text` to ToastTitle and ToastDescription so users can
select and copy error messages instead of triggering swipe gestures.

Fixes graphql-hive#7012

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 enhances the accessibility of toast notifications by enabling text selection. It resolves a previous issue where the swipe gesture handling interfered with the browser's text selection behavior. The fix is implemented by applying the select-text utility class to the relevant components, maintaining consistency with other parts of the codebase.

Highlights

  • Accessibility Fix: This PR addresses issue Error toasts text is not selectable #7012, which prevented users from selecting text within toast notifications.
  • Implementation: The solution involves adding the select-text utility class to the ToastTitle and ToastDescription components.
  • Consistency: The select-text utility is already in use in other components, ensuring a consistent user experience.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request makes text in toasts selectable by adding the select-text utility class to the ToastTitle and ToastDescription components. The change is straightforward and correctly addresses the issue of text selection being disabled by swipe gesture handlers. The implementation is consistent with the existing codebase.

@n1ru4l n1ru4l requested a review from jonathanawesome March 26, 2026 09:17
@n1ru4l n1ru4l mentioned this pull request Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Error toasts text is not selectable

1 participant