-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
Add updates count badge to Updates sidebar item #7084
Conversation
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.
Looks nice :)
(feedback is non-blocking)
Co-authored-by: Alexander Brandes <brandes.alexander@web.de>
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
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.
Looks reasonable. Implementation is fine.
There should be usage guidelines.
@janfaracik is that something you're able to add to design library before we ship this? |
Will do, am I good to add it to the existing 'Layouts' PR? |
I think there should there be support for badges in context menus. For a generalized feature (e.g. imagine badges with open issues in various |
Yes 👍 |
Do you plan to address Daniel's comment on badges in context menu's in this PR? |
I'd favour doing them separately to this PR (just to get this in as I think its a nice-to-have), happy to do it though in this if you prefer @daniel-beck? |
I'd prefer that this is done at the same time, to have parity between sidepanel and menus. (Unless there's a UX reason that menus should not have these badges, now or later, of course.) |
@janfaracik do you plan to take a look at the context menu changes? |
I will do for sure, just a little swamped at the moment. |
Please take a moment and address the merge conflicts of your pull request. Thanks! |
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.
The tooltip isn't just in a "plain" HTML environment, but in an HTML attribute.
A tooltip of " onmouseenter=alert(1) "
causes XSS.
As a general recommendation, stop concatenating strings to create HTML entirely.
Is this PR good for merge notice now @timja? |
/label ready-for-merge This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback. Thanks! |
@@ -75,6 +75,9 @@ THE SOFTWARE. | |||
Generally used with post="true". | |||
(onclick supersedes this except in the context menu.) | |||
</st:attribute> | |||
<st:attribute name="badge" since="TODO"> | |||
If set, displays the value as a small badge on the right side of the sidepanel item. |
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 needs a better description. At the moment most people will assume this is just a simple text you can pass in but what is actually is required is a jenkins.management.Badge object.
…em (jenkinsci#7084)" The "Manage Jenkins" / "System" drop down menu includes the extra text "undefined" at the end of each entry. This removes that change and removes the updates count badge from the updates sidebar. This reverts commit 291f5ed.
[JENKINS-71345] Revert "Add updates count badge to Updates sidebar item (#7084)" The "Manage Jenkins" / "System" drop down menu includes the extra text "undefined" at the end of each entry. This removes that change and removes the updates count badge from the updates sidebar. This reverts commit 291f5ed.
Adds back the updates count badge introduced and removed in #6783, this time by adding an attribute to the
task.jelly
component so that any view/plugin can use it.Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Proposed changelog entries
section only if there are breaking changes or other changes which may require extra steps from users during the upgrade@Restricted
or have@since TODO
Javadoc, as appropriate.@Deprecated(since = "TODO")
or@Deprecated(forRemoval = true, since = "TODO")
if applicable.eval
to ease future introduction of Content-Security-Policy directives (see documentation on jenkins.io).Desired reviewers
@jenkinsci/sig-ux
Maintainer checklist
Before the changes are marked as
ready-for-merge
:Proposed changelog entries
are accurate, human-readable, and in the imperative moodupgrade-guide-needed
label is set and there is aProposed upgrade guidelines
section in the PR title. (example)lts-candidate
to be considered (see query).