Skip to content

Conversation

@phw
Copy link
Member

@phw phw commented Dec 14, 2025

Summary

  • This is a…
    • Bug fix
    • Feature addition
    • Refactoring
    • Minor / simple change (like a typo)
    • Other
  • Describe this change in 1-2 sentences:

Problem

Fix script variable description shown in tooltips and docs.

  • Moved display_tag_tooltip / display_tag_full_description to tags.docs module. This was needed to avoid circular imports.
  • Extend both functions to consider plugin variables. If a variable name is not available in the default list of tags ALL_TAGS the plugin variables extension point is searched for a description
  • Consistently use those functions to display tag tooltips/descriptions. This affected the scripting documentation, which previously was directly using ALL_TAGS.full_description_content, but now uses display_tag_full_description.

Moved display_tag_tooltip / display_tag_full_description to tags.docs
module. Extend both functions to consider plugin variables and
and consistently use those functions to display tag tooltips/descriptions.
@phw phw requested a review from rdswift December 14, 2025 00:10
rdswift
rdswift previously approved these changes Dec 14, 2025
Copy link
Collaborator

@rdswift rdswift left a comment

Choose a reason for hiding this comment

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

This works, and the code looks good.

Just my one comment about possibly sorting the tags in alphabetical order regardless of whether the tag is hidden.

I was hoping to also show the name of the plugin providing the tag in the description, but I can do that in a separate PR (building on this). I would also like to provide some checking to not allow plugins to register duplicate tags or tags like _.

This sorts tags and hidden variables into a consistent list
Copy link
Collaborator

@zas zas left a comment

Choose a reason for hiding this comment

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

LGTM

@phw phw merged commit e43270f into metabrainz:master Dec 14, 2025
50 checks passed
@phw phw deleted the fix-plugin-variables-docs branch December 14, 2025 10:46
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.

3 participants