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

Fix broken annotation label #2586

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Incogdino
Copy link
Contributor

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • DevOps
  • Improve developer experience
  • Others, please explain:

Closes #2563

Overview of changes:
After investigating #2563, the image annotation started breaking after converting to use the slots API.

According to Vue's documentation, content passed by the slots API are considered to be owned by the parent component that passes them in and so styles do not apply to them.

A separate CSS rule to target all elements within the div that holds the slot is added to override the parent's styles. This fixed the issue and the problem no longer persists.

Some screenshots:
image
image

Anything you'd like to highlight/discuss:

Testing instructions:
Testing can be done locally by navigating to the docs folder and running npm markbind serve -d -o userGuide/components/imagesAndDiagrams.md

Proposed commit message: (wrap lines at 72 characters)
Fix broken annotation label


Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

Reviewer checklist:

Indicate the SEMVER impact of the PR:

  • Major (when you make incompatible API changes)
  • Minor (when you add functionality in a backward compatible manner)
  • Patch (when you make backward compatible bug fixes)

At the end of the review, please label the PR with the appropriate label: r.Major, r.Minor, r.Patch.

Breaking change release note preparation (if applicable):

  • To be included in the release note for any feature that is made obsolete/breaking

Give a brief explanation note about:

  • what was the old feature that was made obsolete
  • any replacement feature (if any), and
  • how the author should modify his website to migrate from the old feature to the replacement feature (if possible).

@Tim-Siu
Copy link
Contributor

Tim-Siu commented Feb 3, 2025

Screenshot 2025-02-03 at 11 50 41 Thanks @Incogdino for investigating this issue. The investigation is sound. It is also mentioned in [the documentation](https://vuejs.org/guide/components/slots) that "The slot mechanism is declarative: the component cannot directly read or transform the slot content". The fix works for me with both safari and chrome on macOS.

Copy link
Contributor

@Tim-Siu Tim-Siu left a comment

Choose a reason for hiding this comment

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

LGTM. This modification targets only the hover-label and should be a safe fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image annotation: example output is broken
2 participants