Skip to content
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

Code snippets have hover tooltips over content #2015

Closed
dustinbyrne opened this issue Sep 25, 2024 · 1 comment · Fixed by #2016
Closed

Code snippets have hover tooltips over content #2015

dustinbyrne opened this issue Sep 25, 2024 · 1 comment · Fixed by #2016
Labels
bug Something isn't working navie-plan

Comments

@dustinbyrne
Copy link
Contributor

The tooltip should only be present above the header

image

@dustinbyrne dustinbyrne added bug Something isn't working navie-plan labels Sep 25, 2024
Copy link

github-actions bot commented Sep 25, 2024

Title

Restrict tooltip display to the header in MarkdownCodeSnippet component

Problem

In the MarkdownCodeSnippet component, hover tooltips currently appear over the entire code snippet content. The tooltip should only be displayed when hovering over the header, not over other parts of the code snippet.

Analysis

The MarkdownCodeSnippet component uses the VContextContainer component to display the content, which includes a header and code snippet. To ensure that tooltips only appear over the header, the event listeners for displaying tooltips need to be adjusted so they only activate when hovering over the header and not the entire content of the code snippet.

Proposed Changes

  1. packages/components/src/components/chat/MarkdownCodeSnippet.vue:
    Modify the event listeners within the MarkdownCodeSnippet component to isolate the tooltip functionality to only the header. This will likely involve changes within the template section and corresponding methods to detect hover events only over the header.

  2. packages/components/src/components/chat/MarkdownCodeSnippet.vue:
    Update the styling in the scoped style block to ensure hover effects and tooltips are visually associated only with the header section of the code snippets.

By isolating the hover events and ensuring the corresponding tooltip logic activates solely for the header, the tooltip appearance will be restricted to the desired area.

After implementing these changes, ensure to test the component thoroughly to confirm that tooltips no longer appear when hovering over the code content and only appear over the header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working navie-plan
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant