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

Move Blog Year Buttons to Grid Layout #16022

Merged

Conversation

mike-weiner
Copy link
Contributor

@mike-weiner mike-weiner commented Nov 28, 2024

Description

Fixes: #16012

This PR:

  • Moves the year buttons on https://istio.io/latest/blog/ to a flex layout that allows for wrapping.
  • Remove the overflow support and instead use an @media query to adjust button sizing.
  • Reduces the spacing between the year buttons.
  • Change the cursor to the hover cursor type when a person hovers on the year buttons.

Reviewers

  • Ambient
  • Docs
  • Installation
  • Networking
  • Performance and Scalability
  • Extensions and Telemetry
  • Security
  • Test and Release
  • User Experience
  • Developer Infrastructure
  • Localization/Translation

@mike-weiner mike-weiner requested a review from a team as a code owner November 28, 2024 05:39
@istio-testing istio-testing added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 28, 2024
@craigbox
Copy link
Contributor

thanks for taking this on! I'm a bit worried about the article so far below the fold on mobile, given there are so many buttons. Might it be better to think of some kind of drop-down for that situation

@mike-weiner
Copy link
Contributor Author

thanks for taking this on! I'm a bit worried about the article so far below the fold on mobile, given there are so many buttons. Might it be better to think of some kind of drop-down for that situation

@craigbox - Yea... I didn't love that.

A dropdown is one idea. I could also work to make the buttons a bit smaller on mobile, something like this:

Screenshot 2024-11-27 at 11 57 43 PM

@craigbox
Copy link
Contributor

That's better, thanks.
tbh I doubt people regularly want to filter by year. Regular pagination is probably plenty.

Copy link
Member

@Arhell Arhell left a comment

Choose a reason for hiding this comment

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

@mike-weiner
Copy link
Contributor Author

mike-weiner commented Nov 28, 2024

I'm really liking how https://deploy-preview-16022--preliminary-istio.netlify.app/latest/blog/ looks and adapts to smaller screen sizes now.

I'm less of a fan of how https://deploy-preview-16022--preliminary-istio.netlify.app/latest/news/ looks and adapts to smaller screen sizes.

Thoughts?

Edit: I'm thinking the dropdown idea is going to be a better solution. I'm going to explore that.

Edit 2: I've found a solution that I'm happy with. Seems to work well on both https://deploy-preview-16022--preliminary-istio.netlify.app/latest/blog/ and https://deploy-preview-16022--preliminary-istio.netlify.app/latest/news/

@istio-testing istio-testing added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 28, 2024
@craigbox
Copy link
Contributor

craigbox commented Nov 30, 2024

I tried your first version and I think there was space between the pills; I would often end up zooming into the page when I was trying to tap a year. The second version actually fixes that, which is great!

Nits, all of which probably predate your change:

  • will this look weird when we add one more pill?

  • the pills aren't the same size

Screenshot 2024-11-30 at 10 34 05 PM

(seems to work OK if you set a min-width of 5rem - also applied the margin fix from below)

  • the margin only being on the right of each pill means they don't line up visually
Screenshot 2024-11-30 at 10 36 55 PM

(seems to work OK if you change margin-right: 1rem to margin-left: 0.5rem; margin-right: 0.5rem)

@mike-weiner
Copy link
Contributor Author

@craigbox -

Yep, good call on the margin. I've fixed that and the buttons being unequal sizes in 8e191f1.

will this look weird when we add one more pill?

Here is what the Blog page will look like when we get to next year and add a 2025 button :) I'm trying to get away from CSS that sets a fixed height and width in pixels... since that works until it doesn't....

I think these all look pretty decent.

Screenshot-2024-11-30-08 38 50AM
Screenshot-2024-11-30-08 38 58AM
Screenshot-2024-11-30-08 39 09AM

@craigbox craigbox added the cherrypick/release-1.24 Set this label on a PR to auto-merge it to the release-1.24 branch label Nov 30, 2024
@istio-testing istio-testing merged commit eaa92b2 into istio:master Nov 30, 2024
6 checks passed
@istio-testing
Copy link
Contributor

In response to a cherrypick label: new pull request created: #16026

craigbox pushed a commit to craigbox/istio.io that referenced this pull request Dec 2, 2024
* Move Blog Year Buttons to Grid Layout

* Resolve lint complaints

* Move to 2 Columns on Mobile & Re-center Btns

* Remove Fixed Btn Height & Lint Fixes

* Sass Linter Fix

* Return to Flexbox & Allow Wrap

* Fix Margin & Make Btns Same Size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherrypick/release-1.24 Set this label on a PR to auto-merge it to the release-1.24 branch size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: the blog year selectors overflow
4 participants