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

Use Jenkins modal for 'Apply' button failures #8394

Merged
merged 5 commits into from
Dec 20, 2023

Conversation

janfaracik
Copy link
Contributor

@janfaracik janfaracik commented Aug 18, 2023

Previously we'd show a big YUI modal for when the 'Apply' button would fail to save the form. This PR updates that to use a notification banner and a Jenkins modal to display the errors.

Advantages of this

  • Notifications are consistent with the notification that appears on a successful save
  • Notifications and Jenkins modals have better support for theming and are cleaner and more consistent in appearance
  • One less reliance on YUI

Before
image

image

After
image

image

Before
image

image

After
image

image

Testing done

  • Notifications/modals show as expected for form failures

Proposed changelog entries

  • Use a notification and Jenkins modal for 'Apply' button failures.

Proposed upgrade guidelines

N/A

Submitter checklist

Desired reviewers

@jenkinsci/sig-ux

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

Maintainer checklist

Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

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

Very nice

@timja timja added the rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Aug 18, 2023
@timja timja requested a review from a team August 18, 2023 10:06
@timja timja added the needs-security-review Awaiting review by a security team member label Aug 18, 2023
@timja timja requested a review from a team August 18, 2023 10:06
@timja timja added the web-ui The PR includes WebUI changes which may need special expertise label Aug 19, 2023
@NotMyFault NotMyFault added the ath-fail The acceptance-test-harness suite needs a forward-compatible change label Aug 20, 2023
@NotMyFault
Copy link
Member

ATH is not successful.

@Kevin-CB Kevin-CB added security-approved @jenkinsci/core-security-review reviewed this PR for security issues and removed needs-security-review Awaiting review by a security team member labels Aug 22, 2023
@Kevin-CB
Copy link
Contributor

It looks fine from a security perspective

@NotMyFault NotMyFault removed the request for review from a team August 23, 2023 08:12
@daniel-beck
Copy link
Member

How would you propose that users act on these error messages? The ID is provided so they can ask an admin for help: Users provide the ID, admins can go look through logs for it to understand what went wrong. It's far from convenient, but it doesn't disclose potentially sensitive information to users.

When trying to select the ID from the error popup and releasing the mouse pointer over the popup, it disappears before one can copy the error. That makes the above impossible, unless one tries first to take a screenshot (or like some folks, photo), or it's a repeatable error. That seems like a frustrating experience when using the new UI (even if it's prettier).

(FTR the most straightforward step to reproduce is to check "Poll SCM" and providing an invalid cron pattern. No need to edit the DOM.)

@lemeurherve
Copy link
Member

lemeurherve commented Sep 27, 2023

How would you propose that users act on these error messages? [...]

When trying to select the ID from the error popup and releasing the mouse pointer over the popup, it disappears before one can copy the error. [...]

Maybe add a "copy to clipboard" button next to the ID?

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

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

@github-actions github-actions bot removed the unresolved-merge-conflict There is a merge conflict with the target branch. label Dec 16, 2023
@timja
Copy link
Member

timja commented Dec 16, 2023

How would you propose that users act on these error messages? The ID is provided so they can ask an admin for help: Users provide the ID, admins can go look through logs for it to understand what went wrong. It's far from convenient, but it doesn't disclose potentially sensitive information to users.

Addressed by switching it to use the same dialog:

image image

(screenshots updated in the body)

@timja timja changed the title Use a notification and Jenkins modal for 'Apply' button failures Use Jenkins modal for 'Apply' button failures Dec 17, 2023
@timja timja added ath-successful This PR has successfully passed the full acceptance-test-harness suite and removed ath-fail The acceptance-test-harness suite needs a forward-compatible change labels Dec 17, 2023
@timja
Copy link
Member

timja commented Dec 17, 2023

@jenkinsci/sig-ux ath is now successful in jenkinsci/acceptance-test-harness#1446

@daniel-beck daniel-beck self-requested a review December 18, 2023 17:07
@timja
Copy link
Member

timja commented Dec 19, 2023

/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!

@comment-ops-bot comment-ops-bot bot added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Dec 19, 2023
@NotMyFault NotMyFault merged commit 3a1ac2c into jenkinsci:master Dec 20, 2023
17 checks passed
@timja timja deleted the new-form-error-modal branch December 20, 2023 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ath-successful This PR has successfully passed the full acceptance-test-harness suite ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted security-approved @jenkinsci/core-security-review reviewed this PR for security issues 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