-
-
Notifications
You must be signed in to change notification settings - Fork 400
PICARD-3061: Add long descriptions to tags, display them in tooltips #2636
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
base: master
Are you sure you want to change the base?
Conversation
6fb64b9
to
cd2d916
Compare
cd2d916
to
bf70857
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally I agree with the goal of providing more context for the variables. But I don't think the current approach works, as it is repurposing the tag name feature. Instead there should be a separate longer description. See my more detailed comments on the code.
As a side note I think the strings used for description should ideally be the same as used in the documentation. Maybe not always the full text. But the more similar they are (ideally identical) the easier it is to reuse the translations on Weblate.
68f2ea9
to
535dd59
Compare
0262cbe
to
20ec4f2
Compare
Rebased and pushed with significant changes from the original PR. Please review the descriptions and tooltip code, along with identified EDIT: I also tried to put all of the tags in alphabetical order for ease of maintenance and adding new tags. Please request a change if you spot something in the wrong place. |
@rdswift what do you think about displaying the tooltip on tag's titles in metadata box, as done in rdswift#19 ? |
PRESERVED_TAGS
and EXTRA_VARIABLES
Great idea. I merged your changes. Thanks. |
Also, just a "heads up" that it looks like the Ubuntu |
|
In that case, the upside is that I've covered both conditions in the testing for this PR. 😉 |
picard/util/tags.py
Outdated
), | ||
TagVar( | ||
'media', | ||
shortdesc=N_('Media'), | ||
# TODO: Confirm this is a multi-value. | ||
longdesc=N_('A multi-value tag containing the media on which the release was distributed (e.g.: CD).'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't multi-value. This is set per track, and a track only has a single media type
picard/util/tags.py
Outdated
), | ||
TagVar( | ||
# TODO: Check if this actually exists or if it was provided by the last.fm plugin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Mood" is one of the defined and mapped tags
We already have this, the So the purpose here is exactly to catch cases where tests fail with optional dependencies missing. Worked as intended :) The "normal" tests run with |
Thanks for clarifying, I thought something wasn't working, but actually that's the reverse, it is working perfectly :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Nothing more from me on this PR. I may have some more description changes, or link / see also / option items to add, but I will start a new PR for that.
I'd like to have him review it again as well. One thing we still didn't finalize is whether or not to use "No description provided" or just repeat the tag name as the tooltip if there is no longdesc or shortdesc or the tag is not found in |
- Add long descriptions to use for tooltips. - Add tooltips method. - Add basic html if markup not loaded.
Add backticks around date format. Co-authored-by: Laurent Monin <lmonin.zas@gmail.com>
- Add a constant to PICARD_URLS for `https://musicbrainz.org/doc/` - Add a helper to get a title for an option setting in `picard/profile.py` - Only include the long description and notes in tag tooltips. - Add a new method to get a tag's full description including the long description, notes, related settings and links. This could be used to provide tag documentation similar to scripting function documentation. - Change tag options to `is_*` for consistency. Use properties `not_*` for use with `ATTRIB2NOTE` as proposed by @zas. - Update tests.
* Notes/sections: make the code more generic, and easier to extend - use an IntEnum to identify sections - use a namedtuple to describe each section: title & function to get content - replace _add_section() by a more generic _add_sections() * Move `_gen_sections()` to TagVar, make format translatable * Add tests for basic TagVar
- Remove `profile_setting_title()` from `picard/profile.py` - Add `get_option_title()` to `picard/options.py` - Update `picard/util/tags.py` to use new `get_option_title()` function - Add new `test/test_options.py` file - Update `test/test_util_tags.py` file to use new `get_option_title()` function
fd94a0a
to
ecfa871
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
PRESERVED_TAGS
andEXTRA_VARIABLES
Problem
The tooltips shown for the tags and variables in the script editor only showed information for the
TAG_NAMES
. There were no tooltip descriptions forPRESERVED_TAGS
andEXTRA_VARIABLES
.Solution
Add tooltip descriptions to
PRESERVED_TAGS
andEXTRA_VARIABLES
. Add test for tooltips on tags and variables.Action
Additional actions required:
Since this change will result in some new and changed string for translation, please review the new and existing tag description strings to ensure that any desired changes are captured prior to merging this PR.