8000 fix(pagination): adjust block padding by mcoker · Pull Request #7065 · patternfly/patternfly · GitHub
[go: up one dir, main page]

Skip to content

fix(pagination): adjust block padding#7065

Merged
mcoker merged 5 commits intopatternfly:mainfrom
mcoker:issue-7057
Sep 23, 2024
Merged

fix(pagination): adjust block padding#7065
mcoker merged 5 commits intopatternfly:mainfrom
mcoker:issue-7057

Conversation

@mcoker
Copy link
Contributor
@mcoker mcoker commented Sep 11, 2024

fixes #7057

Visual regression report - backstop-toolbar-pagination-padding.pdf

This updates both the toolbar's bottom padding and the bottom pagination's top padding to use var(--pf-t--global--spacer--gap--group--vertical)

@mcoker mcoker requested a review from lboehling September 11, 2024 17:46
@patternfly-build
Copy link
Collaborator
patternfly-build commented Sep 11, 2024

Copy link
@lboehling lboehling left a comment

Choose a reason for hiding this comment

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

i think the bottom pagination spacing looks good! thanks @mcoker!! Left a comment on the toolbar spacing update looking off in demos with dividers.

--#{$toolbar}--RowGap: var(--pf-t--global--spacer--md);
--#{$toolbar}--PaddingBlockStart: 0;
--#{$toolbar}--PaddingBlockEnd: var(--pf-t--global--spacer--md);
--#{$toolbar}--PaddingBlockEnd: var(--pf-t--global--spacer--gap--group--vertical);

Choose a reason for hiding this comment

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

looking through the backstop report and i'm wondering if we should leave this a md spacer. Toolbar starts looking really cramped in examples that have a divider beneath the toolbar
Screenshot 2024-09-12 at 4 02 46 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lboehling agreed, updated!

@evwilkin
Copy link
Member

Two quick questions:

  1. It looks like this only touches pagination and no longer updates Toolbar (based on Lucia's PR feedback above), if so can we update the title/description to avoid confusion?
  2. Does line 157 do anything? I see the m-bottom PaddingBlockStart variable assigned a new value, but just below it looks like the actual padding-block-start rule references a different variable (m-sticky-paddingblockstart) so I'm not sure if that first reassignment is having any effect?

@mcoker mcoker changed the title fix(pagination/toolbar): adjust block padding fix(pagination): adjust block padding Sep 13, 2024
@mcoker
Copy link
Contributor Author
mcoker commented Sep 13, 2024

@evwilkin great feedback! On the var question, bottom pagination is a bit tricky. Here's the rundown of how it works:

  • By default, bottom pagination is sticky (no modifier or anything, it's just sticky) on small screens, then becomes normal (aka static, but not with a modifier or anything, it's just static) on large screens
  • You can apply .pf-m-sticky which will make it sticky on all viewports, but really only has an impact on large screens since the small screen default is already sticky
  • You can apply .pf-m-static in the same way - static/not-sticky on all viewports, but really only impacts small screens since on large screens it's static by default

Copy link
Contributor
@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

Nothing blocking below

Comment on lines +48 to +50
--#{$pagination}--m-bottom--PaddingBlockStart: 0;
--#{$pagination}--m-bottom--m-sticky--PaddingBlockStart: 0;
--#{$pagination}--m-bottom--md--PaddingBlockStart: var(--pf-t--global--spacer--gap--group--vertical);
--#{$pagination}--m-bottom--m-static--PaddingBlockStart: var(--pf-t--global--spacer--gap--group--vertical);
Copy link
Contributor

Choose a reason for hiding this comment

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

Super🦸🏼 nit, but these new vars could be bumped up a line so that all the PaddingBlockStart vars are grouped together

@mcoker
Copy link
Contributor Author
mcoker commented Sep 13, 2024

@evwilkin oops, I replied prematurely above. Nice catch, I see what you mean and yep that needs to be updated 👍

@mcoker
Copy link
Contributor Author
mcoker commented Sep 18, 2024

@srambach @thatblindgeye from the feedback above, I took another look at the padding vars. We basically have a static layout and a sticky layout. Sticky is less than the --md breakpoint and with the .pf-m-sticky modifier, and static is greater than --md and with .pf-m-static.

I took the route of creating 4 sets of padding vars:

  • --Padding - this would use the sticky values since this is a small screen, no modifier layout
  • --md--Padding - this would use static values
  • --m-sticky--Padding - sticky, duh
  • --m-static--Padding - ⚡️

Taking a stab at a simpler way to expose vars to users, and less vars on our end, I just created --m-sticky--Padding and --m-static--Padding and am using those instead. So default padding uses --m-sticky, > than --md breakpoint uses --m-static, and obviously the modifier classes use their corresponding vars. WDYT? I'm inclined to stick to our existing way of defining vars and have 4 separate sets, but figured I'd try this and get y'alls thoughts.

Copy link
Member
@srambach srambach left a comment

Choose a reason for hiding this comment

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

Looks good - I like the variables. 🎋

@mcoker mcoker merged commit 35d8a14 into patternfly:main Sep 23, 2024
@mcoker mcoker deleted the issue-7057 branch January 7, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pagination - audit improvements

6 participants

0