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

Edit tasklist title
Beta Give feedback Tasklist Submitter checklist, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. The Jira issue, if it exists, is well-described.
    Options
  2. 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.
    Options
  3. There is automated testing or an explanation as to why this change has no tests.
    Options
  4. New public classes, fields, and methods are annotated with @Restricted or have @since TODO Javadocs, as appropriate.
    Options
  5. New deprecations are annotated with @Deprecated(since = "TODO") or @Deprecated(forRemoval = true, since = "TODO"), if applicable.
    Options
  6. 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).
    Options
  7. For dependency updates, there are links to external changelogs and, if possible, full differentials.
    Options
  8. For new APIs and extension points, there is a link to at least one consumer.
    Options

Desired reviewers

@jenkinsci/sig-ux

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

Maintainer checklist

Edit tasklist title
Beta Give feedback Tasklist Maintainer checklist, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. There are at least two (2) approvals for the pull request and no outstanding requests for change.
    Options
  2. Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
    Options
  3. Changelog entries in the pull request title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood.
    Options
  4. Proper changelog labels are set so that the changelog can be generated automatically.
    Options
  5. 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).
    Options
  6. 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).
    Options

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

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
6 participants