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-64712] Fix unexpected scrolling of config UI #1051

Merged
merged 2 commits into from
Mar 4, 2021

Conversation

MarkEWaite
Copy link
Contributor

@MarkEWaite MarkEWaite commented Feb 26, 2021

JENKINS-64712 - Fix unexpected scrolling of nested checkbox

The nesting of one checkbox beneath another checkbox appears to be purely a presentation convenience to only show the useExistingAccountWithSameEmail if the useExistingAccountWithSameEmail checkbox was enabled. Since the GitTool data model has the useExistingAccountWithSameEmail and the useExistingAccountWithSameEmail fields at the same level, this simplifies the user experience by displaying them both at the time.

Tested interactively with Jenkins 2.263.4, Jenkins 2.277.1-rc, and Jenkins 2.281. Behaves as expected in all cases.

Checklist

  • I have read the CONTRIBUTING doc
  • I have referenced the Jira issue related to my changes in one or more commit messages
  • Unit tests pass locally with my changes
  • I have added documentation as necessary
  • No Javadoc warnings were introduced with my changes
  • No spotbugs warnings were introduced with my changes
  • Documentation in README has been updated as necessary
  • Online help has been added and reviewed for any new or modified fields
  • I have interactively tested my changes
  • Any dependent changes have been merged and published in upstream modules (like git-client-plugin)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Further comments

Existing values are loaded as expected on startup.

Values are persisted to the GitTool.xml configuration file when the configuration is applied or saved.

Hints in other communities suggest that the unexpected scrolling is caused by specific CSS markup, but I can't find that specific markup in my search of the generated page. Rather than fight with CSS markup, it is easier to move the nested checkbox to the top level.

Would love to have review and verification by @MRamonLeon

Since the GitTool data model has the useExistingAccountWithSameEmail
and the useExistingAccountWithSameEmail fields at the same level, this
simplifies the user experience by displaying them both at the time.

Existing values are loaded as expected on startup.

Values are persisted to the GitTool.xml configuration file when the
configuration is applied or saved.

Appears to be purely a presentation convenience to only show the
useExistingAccountWithSameEmail if the useExistingAccountWithSameEmail
checkbox was enabled.

Tested interactively with Jenkins 2.263.4, Jenkins 2.277.1-rc, and
Jenkins 2.281.  Behaves as expected in all cases.

Hints in other communities suggest that the unexpected scrolling is
caused by specific CSS markup, but I can't find that specific markup
in my search of the generated page.  Rather than fight with CSS markup,
it is easier to move the nested checkbox to the top level.
No benefit to retaining that UI code when it hasn't been tested or
maintained since it was disabled 7 years ago.
@MarkEWaite MarkEWaite added the bugfix Fixes a bug - used by Release Drafter label Feb 27, 2021
@MarkEWaite MarkEWaite merged commit f6ddc1e into jenkinsci:master Mar 4, 2021
@MarkEWaite MarkEWaite deleted the fix-config-page-jump branch March 4, 2021 03:46
@MarkEWaite
Copy link
Contributor Author

@MRamonLeon I merged it on the assumption that my interactive testing was sufficient and you likely don't have time to review the code.

@MRamonLeon
Copy link
Contributor

Sorry for the late response, I was looking into it and the changes are sensible to me. But I wondered if with the new changes, we were sending data that we were not previously (the nested field). I looked into the optionalBlock and its documentation says the inner fields are not sent, but testing it, the inner field was sent. So I ended up trying to find out if there was something wrong in the jelly or whatever and it triggered the bug. But I couldn't.

Just as I mentioned, your reasoning seems fine to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes a bug - used by Release Drafter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants