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 labels in anonymous mode #5650
Conversation
p/scripts/main.js
Outdated
html += '<li class="item"><label><input class="checkboxTag" name="t_' + tag.id + '" type="checkbox"' + | ||
(context.anonymous ? ' disabled="disabled"' : '') + |
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.
Please have a look into line 1201. The event listener does not make sense in context.anonymous = true on the checkbox.
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.
The if (checkboxTag) {
should do the job, doesn't it? In anonymous mode, this is false
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.
if (ev.target.closest('.checkboxTag'))
is independend of context nor disabled="disabled"
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.
Indeed, but there is no .checkboxTag
in anonymous mode, so the rest is just skipped as it should, isn't it ?
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.
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.
Sorry, my mistake. Better now?
What about now? |
IMHO it does not make sense to list all (incl. not used) labels in the anonym. mode I would see follwing 2 options in case of that there is no label added:
|
This reverts commit 24dfba5.
I have added a message when there are no labels. I would like to keep the labels also in anonymous mode, as there are more features coming related to labels (such as automatic labelling). |
No labels style improved. |
I do not mind much, but I find it fine as it is, and I would rather limit the amount of code, especially when specific to a relatively niche feature |
Fwiw you might be able to do something with the new :has() selector, but wouldn't it make more sense to simply not show the checkbox instead of disabling it? |
fix #4305
Replaces #4649