Skip to content
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

[JENKINS-69787] Create new dismiss component #7265

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

CrystallDEV
Copy link

@CrystallDEV CrystallDEV commented Oct 15, 2022

…in messages

See JENKINS-69787.

Testing done

  • Manually tested with local Jenkins instance

image

- Executed all existing tests

Proposed changelog entries

  • Added new dismiss (jelly) component which uses the (new) introduced jenkins-button css class and use it in several admin notifications

Proposed upgrade guidelines

N/A

Submitter checklist

  • The Jira 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.
  • 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

N/A

Maintainer checklist

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

  • 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, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

Copy link
Member

@NotMyFault NotMyFault left a comment

Choose a reason for hiding this comment

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

Hey,

thanks for the PR!


If an interface already has a button, they are not aligned:

Screenshot 2022-10-15 at 18 22 47

@NotMyFault NotMyFault added web-ui The PR includes WebUI changes which may need special expertise rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted needs-security-review Awaiting review by a security team member labels Oct 15, 2022
@NotMyFault NotMyFault requested review from a team October 15, 2022 16:26
@NotMyFault NotMyFault changed the title JENKINS-69787: Create new dismiss component and use it in several adm… [JENKINS-6978] Create new dismiss component Oct 15, 2022
@jenkinsci jenkinsci deleted a comment from uhafner Oct 15, 2022
@timja
Copy link
Member

timja commented Oct 19, 2022

I was expecting something more like this component that you can use to remove a step / repeatable section,

image

e.g. from shell step:
image

When you have more than one dismiss button on the form, this can be used to determine
which button is pressed, as the server will get a parameter by this name.
</s:attribute>
<s:attribute name="tooltip" use="required">
Copy link
Member

Choose a reason for hiding this comment

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

Needs to specify the expectation around HTML content.

@CrystallDEV
Copy link
Author

Thanks everyone for the reviews. Ill fix the leftovers within the next week when I hopefully have time

@daniel-beck daniel-beck changed the title [JENKINS-6978] Create new dismiss component [JENKINS-69787] Create new dismiss component Oct 20, 2022
@github-actions github-actions bot added the unresolved-merge-conflict There is a merge conflict with the target branch. label Nov 14, 2022
@github-actions
Copy link
Contributor

Please take a moment and address the merge conflicts of your pull request. Thanks!

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.

Noting the requirement of #7265 (review)

@daniel-beck daniel-beck removed the needs-security-review Awaiting review by a security team member label Nov 18, 2022
@github-actions github-actions bot removed the unresolved-merge-conflict There is a merge conflict with the target branch. label Jan 3, 2023
@NotMyFault NotMyFault added the needs-comments-resolved Comments in the PR need to be addressed before it can be considered for merging label Jan 13, 2023
@NotMyFault
Copy link
Member

Hey @CrystallDEV,

would you mind addressing the outlined feedback above, please?

Thanks in advance!

@CrystallDEV CrystallDEV requested review from daniel-beck and uhafner and removed request for daniel-beck and uhafner February 24, 2023 14:36
@CrystallDEV
Copy link
Author

@NotMyFault @daniel-beck @uhafner I finally managed to find time and motivation to fix the PR. Looks good on my machine 😄

Copy link
Member

@uhafner uhafner left a comment

Choose a reason for hiding this comment

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

Thanks for addressing most of the feedback! Can you please also update the screenshots in the PR description?

which button is pressed, as the server will get a parameter by this name.
</s:attribute>
<s:attribute name="value">
The tooltip text of the dismiss button.
Copy link
Member

Choose a reason for hiding this comment

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

Make clear that HTML is not allowed in tooltip.

</s:documentation>
<button
name="${attrs.name ?: 'Dismiss'}"
tooltip="${attrs.value ?: '%Dismiss'}"
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it make more sense to have no tooltip if not given? It would not help if it is the same as the name. (If not you should at least make it consistent to the name). Is the % a typo?

Copy link
Member

@timja timja Feb 27, 2023

Choose a reason for hiding this comment

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

% is for internationalization

Copy link
Member

Choose a reason for hiding this comment

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

Then it should be in name as well?

Copy link
Member

@timja timja Feb 27, 2023

Choose a reason for hiding this comment

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

name is used as part of form submission so definitely should not change in different locales. tooltip is what's displayed to users (although as you said should probably be omitted if it's the same as attrs.value as it provides no value)

Copy link
Author

Choose a reason for hiding this comment

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

So anything I should change?

Copy link
Member

Choose a reason for hiding this comment

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

Probably should remove the tooltip I think. Or make it customise-able without also changing value.

e.g.
tooltip="${attrs.tooltip}"

I think would work

@CrystallDEV
Copy link
Author

Updated Screenshot

@github-actions github-actions bot added the unresolved-merge-conflict There is a merge conflict with the target branch. label Mar 20, 2023
@github-actions
Copy link
Contributor

Please take a moment and address the merge conflicts of your pull request. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-comments-resolved Comments in the PR need to be addressed before it can be considered for merging rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted unresolved-merge-conflict There is a merge conflict with the target branch. 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.

6 participants