Skip to content

Removed the dismiss button and added X#26076

Open
Rahul-2006 wants to merge 2 commits intojenkinsci:masterfrom
Rahul-2006:uifix
Open

Removed the dismiss button and added X#26076
Rahul-2006 wants to merge 2 commits intojenkinsci:masterfrom
Rahul-2006:uifix

Conversation

@Rahul-2006
Copy link

Fixes #18321

Testing done

Previously: This uses Dismiss button:
DismissBefore
Now:
Since we have replaced the Dismiss button with X this is the after changes UI:
XBefore

Tested the change of deleting physically via UI:
XAfter

Verifying the disabled or not via scripting too!
XVerification

So a clear view of the changed lines in the code reflected accurately in the UI as tested both via UI and scripting

Screenshots (UI changes only)

These are the same as attached above, added both the before and after states.. right above, not adding them again to reduce the redundancy!!

Proposed changelog category

/label rfe,web-ui

Proposed upgrade guidelines

N/A

Difference between other commits and this one:

  1. I have not just updated a single repeatable file instead, worked on the entire admin monitors message.jelly files which are the main reason to get the Dismiss button
  2. Others solutions might be working on the css which can potentially lead to changes in other components ui behaviour
  3. I have also tested the working of the (X) button via scripting which ensures that the button is triggered to the correct cause
  4. The button after clicked creates a /act post request which returns 302 (as expected).

Submitter checklist

  • The issue, if it exists, is well-described.
  • The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see examples). Fill in the Proposed upgrade guidelines section only if there are breaking changes or changes that may require extra steps from users during upgrade.
  • There is automated testing or an explanation as to why this change has no tests.
  • New public classes, fields, and methods are annotated with @Restricted or have @since TODO Javadocs, as appropriate.
  • New deprecations are annotated with @Deprecated(since = "TODO") or @Deprecated(forRemoval = true, since = "TODO"), if applicable.
  • UI changes do not introduce regressions when enforcing the current default rules of Content Security Policy Plugin. In particular, new or substantially changed JavaScript is not defined inline and does not call eval to ease future introduction of Content Security Policy (CSP) directives (see documentation).
  • For dependency updates, there are links to external changelogs and, if possible, full differentials.
  • For new APIs and extension points, there is a link to at least one consumer.

Desired reviewers

@mention
Before the changes are marked as ready-for-merge:

Maintainer checklist

  • There are at least two (2) approvals for the pull request and no outstanding requests for change.
  • Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
  • Changelog entries in the pull request title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood.
  • Proper changelog labels are set so that the changelog can be generated automatically.
  • If the change needs additional upgrade steps from users, the upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).
  • If it would make sense to backport the change to LTS, be a Bug or Improvement, and either the issue or pull request must be labeled as lts-candidate to be considered.

@comment-ops-bot comment-ops-bot bot added rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted web-ui The PR includes WebUI changes which may need special expertise labels Jan 6, 2026
Copy link
Member

@daniel-beck daniel-beck left a comment

Choose a reason for hiding this comment

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

The lines I commented on need explanation or fixing, they seem wrong.

<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="yes" value="${%Tell me more}"/>
<f:submit name="no" value="${%Dismiss}"/>
<l:isAdmin>
Copy link
Member

Choose a reason for hiding this comment

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

Why?

<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="yes" value="${%Manage}"/>
<f:submit name="no" value="${%Dismiss}"/>
<l:isAdmin>
Copy link
Member

Choose a reason for hiding this comment

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

Why?

<f:submit value="${%Dismiss}"/>
<button type="submit"
class="jenkins-button jenkins-button--tertiary"
name="no"
Copy link
Member

Choose a reason for hiding this comment

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

Why?

<f:submit value="${%Dismiss}"/>
<button type="submit"
class="jenkins-button jenkins-button--tertiary"
name="no"
Copy link
Member

Choose a reason for hiding this comment

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

Why?

<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="more" value="${%Learn more}"/>
<f:submit name="dismiss" primary="false" value="${%Dismiss}"/>
<l:isAdmin>
Copy link
Member

Choose a reason for hiding this comment

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

Why?

<div class="jenkins-alert jenkins-alert-warning">
<form method="post" action="${rootURL}/${it.url}/disable">
<f:submit value="${%Dismiss}"/>
<l:isAdmin>
Copy link
Member

Choose a reason for hiding this comment

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

Why?

<button type="submit"
class="jenkins-button jenkins-button--tertiary"
value="${%Dismiss}"
name="no">
Copy link
Member

Choose a reason for hiding this comment

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

Why?

Comment on lines +29 to +36
<l:isAdmin>
<button type="submit"
class="jenkins-button jenkins-button--tertiary"
value="${%Dismiss}"
name="dismiss">
<l:icon src="symbol-close"/>
</button>
</l:isAdmin>
Copy link
Member

Choose a reason for hiding this comment

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

Formatting inconsistent with the rest of the file.

@Rahul-2006
Copy link
Author

@daniel-beck Hey, Can you please elaborate your Why!? Like i haven't understood What's behind that Why?

@daniel-beck
Copy link
Member

@daniel-beck Hey, Can you please elaborate your Why!? Like i haven't understood What's behind that Why?

Every line I commented on lacks justification and seems unrelated to this PR's goal.

@Rahul-2006
Copy link
Author

So as far as I understood the issue and tested the way towards the issue, I find it the issue is getting solved by the above fixes...
And they aren't creating any new bugs, i followed the code structure too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted web-ui The PR includes WebUI changes which may need special expertise

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[JENKINS-69787] Dismiss buttons in Admin monitors should use an (x) for dismissing

2 participants