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

[Pagination] Responsive layout #6687

Closed
4 tasks
brittneytewks opened this issue Mar 28, 2023 · 25 comments
Closed
4 tasks

[Pagination] Responsive layout #6687

brittneytewks opened this issue Mar 28, 2023 · 25 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. Calcite (design) Issues logged by Calcite designers. design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. estimate - 8 Requires input from team, consider smaller steps. p - high Issue should be addressed in the current milestone, impacts component or core functionality ready for dev Issues ready for development implementation.

Comments

@brittneytewks
Copy link

Description

Responsiveness across Calcite Design System, focused on web (traditionally desktop sized web browser), tablet, phone screen sizes, and large monitors.

Acceptance Criteria

  1. Consider breaking changes for folks. Consultation should occur on both the design and development teams.
  2. Components need to be designed for the following breakpoints:
  • Small (s), 476px
  • Medium (m), 768px
  • Large (l), 1152px
  • Extra larger (xl), 1440px

Relevant Info

Part of epic #6670

Which Component

pagination

Example Use Case

No response

Priority impact

p4 - not time sensitive

Esri team

Calcite (design)

@brittneytewks brittneytewks added enhancement Issues tied to a new feature or request. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Mar 28, 2023
@github-actions github-actions bot added the impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive label Mar 28, 2023
@brittneytewks brittneytewks added needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive labels Mar 28, 2023
@github-actions github-actions bot added the Calcite (design) Issues logged by Calcite designers. label Mar 28, 2023
@brittneytewks brittneytewks added p - high Issue should be addressed in the current milestone, impacts component or core functionality design Issues that need design consultation prior to development. estimate - 8 Requires input from team, consider smaller steps. labels Mar 28, 2023
@brittneytewks brittneytewks removed the needs triage Planning workflow - pending design/dev review. label Mar 28, 2023
@SkyeSeitz
Copy link

Update from team discussion today:
@rmstinson presented iterations for a Pagination on smaller screen sizes and mobile devices. Below is the solution we landed on, which Mike will refine before our final design proposal.

image

Additional action items for the team: Look at how this could also be used on desktop size viewports.

@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Mar 30, 2023
@brittneytewks brittneytewks added 0 - new New issues that need assignment. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Mar 31, 2023
@SkyeSeitz SkyeSeitz self-assigned this Mar 31, 2023
@rmstinson
Copy link

Added another section with final revisions! Figma link here: https://www.figma.com/file/zBGnAOEOxqKGocUjqiYbed/Responsive-Layout?node-id=13257%3A304540&t=sQkUqpbjmja9kXmQ-1

Here are the screenshots of the three options for screen widths ranging from 320px-479px. Full designs in the Figma link above :)

Screenshot 2023-03-31 at 2 16 59 PM

@geospatialem geospatialem assigned rmstinson and unassigned SkyeSeitz Mar 31, 2023
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Mar 31, 2023
@macandcheese
Copy link
Contributor

Some feedback - I like A in the screen above the best. It keeps the touch area for back and forth close together and anchors the controls to the sides - B and C don't seem to be visually as well spaced.

I would be interested to see a combination of the location of the < > in A with another text treatment.

Not a huge fan of the caret or the blue color, I wonder if we can look at some other styles for that button? Maybe treating the "100" differently than the "of 199" like the B example (we could treat the entire area as a larger hit area).

@ashetland
Copy link

I lean most toward [A] as I look at these more. I through together a couple quick riffs based on [A] to add to the mix. I flipped the element order here as an exploration, but could go with the original order as well.
CleanShot 2023-04-03 at 08 32 19@2x

Also, I thought this would be some good food for thought since we talked about "items per page at one point" (may be out of scope here). I found what the Carbon team chooses to display at different widths interesting:
CleanShot 2023-04-03 at 08 19 53@2x
CleanShot 2023-04-03 at 08 19 32@2x

@SkyeSeitz
Copy link

I lean towards the flipped order with chevron back/forward controls. Explored a slightly different caret+txt treatment with spacing overrides. Could totally use calcite-select component as we discussed:

image

@macandcheese
Copy link
Contributor

(or C) - I think that alignment is the strongest. I think some font weight / underline approaches could be looked at but those two seem like the best visual choices, IMO.

@driskull driskull self-assigned this Sep 5, 2023
@brittneytewks brittneytewks added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Sep 5, 2023
@driskull
Copy link
Member

driskull commented Sep 6, 2023

I'm not sure the Popover+list is the best way to go about a selection of pages. Why not the calcite-select component?

The Popover+list is essentially a role of dialog and a role of treegrid inside of it. Its also focus trapping. I would expect a single component here that can be operated with just arrow keys once tabbed into.

@SkyeSeitz @rmstinson @geospatialem can you comment on the above?

@driskull
Copy link
Member

driskull commented Sep 6, 2023

I think it would also be good if we have an option to turn off the pagination menu. What do you think?

@macandcheese
Copy link
Contributor

Agreed - I think that complex of an interaction is outside the scope of a Calcite Components pagination component. I'd expect Pagination to be limited to (at the most), page selection, "page size / items per page" selection, and direct page selection.

Launching a "rich detail" list of Pagination options like in the above widget is valid UI, but I think it's something you could build separately, as the content could be drastically different depending on need. Like @driskull mentioned, I think that particular UI could probably use a dropdown, having an entire Panel header UI there in a List seems kind of heavy.

@driskull
Copy link
Member

driskull commented Sep 6, 2023

Do we want to kick this issue back to design? its slotted for the current responsive milestone. cc @brittneytewks

@macandcheese
Copy link
Contributor

macandcheese commented Sep 6, 2023

Will defer to @SkyeSeitz but I think the plan is to add additional display modes and the responsive behavior will be to collapse the number of visible "page steps" as container size shrinks.

I don't think this component needs to consider having UI of "launch a list or dropdown or other component to have a rich selection". That IMO is not really part of pagination.

Really those are more like Carousel since only one item is being displayed at a time.

@driskull
Copy link
Member

driskull commented Sep 6, 2023

Maybe a user could just slot in something that displays at the xs size? Then they could add a menu/button/whatever?

@macandcheese
Copy link
Contributor

Yeah. I think at any size really, just place that adjacent to the pagination, pagination’s responsive adjustment could just be reduce number of pages shown as needed. The other view modes are good to have as an option at any viewport.

@SkyeSeitz
Copy link

Thanks for the thoughts above, folks. I am in agreement the first question is regarding scope of what we consider responsive- I would consider the following behavior a responsive Calcite Pagination component.

responsive-pagination-mockup.mov

@SkyeSeitz
Copy link

Updated Figma link for responsive feature.

Sounds like non-responsive features that are valuable at any viewport size, such as items per page or additional display modes, can be logged separate from this issue 👍🏽

@geospatialem geospatialem added 2 - in development Issues that are actively being worked on. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Sep 18, 2023
driskull added a commit that referenced this issue Sep 18, 2023
**Related Issue:** #6687

## Summary

- Makes pagination responsive
- Uses resize observer
- Makes ellipsis and page styles equivalent
- Refactor page rendering logic to count ellipsis as well as pages.
Next/previous buttons are not counted because they are always present.
- Exports Breakpoints interface from helper
- Modifies some e2e tests
- Adds screenshot tests

These are the proposed amount of items per breakpoint. (item numbers are
pages + ellipsis)
```ts
const maxItemBreakpoints = {
  large: 11,
  medium: 9,
  small: 7,
  xsmall: 5,
};
```
@driskull driskull added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Sep 18, 2023
@github-actions github-actions bot assigned geospatialem and unassigned driskull Sep 18, 2023
@github-actions
Copy link
Contributor

Installed and assigned for verification.

@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Sep 20, 2023
@geospatialem
Copy link
Member

geospatialem commented Sep 20, 2023

Verified in next for all but very specific smaller XS dimensions (under 485px). A follow-up issue was created for the specific size, anticipated for September/October.

verify-pagination-responsive-design

@ashetland ashetland added the figma changes Issues that require additions or updates to the Figma UI Kit where no `design` label exists label Sep 20, 2023
@SkyeSeitz SkyeSeitz removed the figma changes Issues that require additions or updates to the Figma UI Kit where no `design` label exists label Oct 27, 2023
@brittneytewks brittneytewks added the design Issues that need design consultation prior to development. label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. Calcite (design) Issues logged by Calcite designers. design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. estimate - 8 Requires input from team, consider smaller steps. p - high Issue should be addressed in the current milestone, impacts component or core functionality ready for dev Issues ready for development implementation.
Projects
None yet
Development

No branches or pull requests

8 participants