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

Avoid scrollbar in dropdown popups (page footer, log recorder) #8704

Merged
merged 1 commit into from Nov 26, 2023

Conversation

zbynek
Copy link
Contributor

@zbynek zbynek commented Nov 19, 2023

Adds a wrapping <div> to have consistent paddingwith other dropdowns (e.g. the ones in sidebar) -- that avoids extra scrollbar when a separator is present. The diff makes more sense without whitespace changes.

Before:

image
image
image

After:

image
image
image

Footer popup introduced in this PR: #7989

Testing done

Screenshot above.

Proposed changelog entries

Avoid scrollbar in the version popup (page footer)

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 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
  2. Explanation as to why this change has no tests: visual improvement only
    Options

Desired reviewers

@janfaracik

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

@zbynek
Copy link
Contributor Author

zbynek commented Nov 19, 2023

Obviously it's OK to not have this in the changelog as it doesn't affect functionality, I filled the "proposed changelog" entry just in case.

@MarkEWaite MarkEWaite added the skip-changelog Should not be shown in the changelog label Nov 19, 2023
@mawinter69
Copy link
Contributor

The same problem can be seen in the menu of log recorders:
image
I think the root cause is that the jenkins-dropdown__separator has a negative margin for left and right. When setting the margin to 0 the problem disappears.
But maybe there was a reason for that margin value. If so then the logrecorder index.jelly should be fixed as well

@mawinter69
Copy link
Contributor

mawinter69 commented Nov 19, 2023

I think the reason for the negative margin is to extend the separator to the edges when it is wrapped in a <div class="jenkins-dropdown">. The div adds some padding so that highlighted rows (hovering with the mouse over a row) have some gap. So the div should be added to the log recorder as well

@zbynek zbynek changed the title Avoid scrollbar in the version popup (page footer) Avoid scrollbar in dropdown popups (page footer, log recorder) Nov 20, 2023
@zbynek
Copy link
Contributor Author

zbynek commented Nov 20, 2023

@mawinter69 thanks, I changed the code to use the same wrapping div in all usages of overflowButton, even those without separator, to have consistent look. My conclusion was the same as yours -- the negative margin compensates for the outer div padding.

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.

/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 Nov 24, 2023
@NotMyFault NotMyFault merged commit aedae5b into jenkinsci:master Nov 26, 2023
17 checks passed
@zbynek zbynek deleted the version-popup branch November 27, 2023 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback skip-changelog Should not be shown in the changelog
Projects
None yet
5 participants