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

Changes to make the docs homepage cards look consistent #43166

Merged

Conversation

Gauravpadam
Copy link
Member

@Gauravpadam Gauravpadam commented Sep 22, 2023

Closes #23914
This PR is an extension of #43164 to cover the styling changes and make some additional markup changes

Please have a look at the Deploy Preview for a better perspective of the PR

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. sig/docs Categorizes an issue or PR as relevant to SIG Docs. labels Sep 22, 2023
@Gauravpadam Gauravpadam changed the title SCSS changes for docs home page card layout SCSS changes to make the docs home page cards look consistent Sep 22, 2023
@netlify
Copy link

netlify bot commented Sep 22, 2023

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 0b4c196
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/65140e60da07c800080df604
😎 Deploy Preview https://deploy-preview-43166--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Gauravpadam Gauravpadam changed the title SCSS changes to make the docs home page cards look consistent SCSS changes to make the docs homepage cards look consistent Sep 22, 2023
Copy link
Member

@aj11anuj aj11anuj left a comment

Choose a reason for hiding this comment

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

Lgtm as it's a replica of #43164 (scss commit), 👍

@dipesh-rawat
Copy link
Member

/area web-development

@k8s-ci-robot k8s-ci-robot added the area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes label Sep 23, 2023
@aj11anuj
Copy link
Member

aj11anuj commented Sep 23, 2023

For finishing touch, few things that are coming to my mind:-

  1. (3rd row, 3rd column) Card/Tile's hyperlink text can be changed to "Documentation versions" and it can be turned into a blue button, as it's looking a little odd that only this card doesn't have any button like others.
  2. (3rd row, 3rd column) Card/Tile's heading can be changed to "Available Docs", as sometimes in smaller devices like mobile, that "documentation" word is looking like :-
    documentat
    ion
  3. At some cards there is some gap between blue button and hyperlinks, maybe by adding some relevant hyperlinks related to that card/tile, this space can be filled.

Screenshot_2023-09-23-11-38-21-486_com android chrome

@Gauravpadam
Copy link
Member Author

@aj11anuj, I appreciate the time taken for the review :)

So regarding the 'Documentation word wrap' which you addressed in the second pointer, We need not change the front matter for that as CSS should adapt to html and not the other way around. I'll just reduce the padding which will render the text properly on most viewports

I'm afraid that the first and the third issues can't be addressed with this PR, As they need some changes over the homepage index . I'd be happy to see a follow-up PR from your end to propose these changes

@sftim
Copy link
Contributor

sftim commented Sep 23, 2023

  • I don't think the blue card background improves things
  • The page would look better with whitespace above the buttons

Ideal outcome: also use flexbox and a variable layout so that there are fewer columns - maybe just 1 - on a narrow, mobile-device viewport.

@sftim
Copy link
Contributor

sftim commented Sep 23, 2023

I recommend against making content change in this PR. Style changes should work for the content we have, which is in 13(ish) localizations, and ideally for the content we might have in the future. Pages can get reworded etc.

@Gauravpadam
Copy link
Member Author

I get your point @sftim, I've removed the background and focused more on the alignments in the recent push. The page would work just fine on most viewports now

Copy link
Contributor

Choose a reason for hiding this comment

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

The new buttons can be a bit wide:
Screenshot

Copy link
Member Author

Choose a reason for hiding this comment

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

Though that's not a standard viewport, I do see the problem here @sftim. I'll figure something out

Copy link
Contributor

Choose a reason for hiding this comment

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

If you need / want to change the HTML templating to help this land, that's fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's more of a css ball game. Should we perhaps try borders if backgrounds don't work? You see the problem here is actually addressing the disconnect between the text alignment and the centred button

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd either use padding on an outer <div> or look at using flexbox. It's CSS though, so there are hundreds of options.

CSS is awesome
😉

@Gauravpadam
Copy link
Member Author

/hold I'd like to try out some ideas

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 25, 2023
@Gauravpadam
Copy link
Member Author

/unhold
Good for review now

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 27, 2023
@Gauravpadam Gauravpadam changed the title SCSS changes to make the docs homepage cards look consistent Changes to make the docs homepage cards look consistent Sep 27, 2023
Reduced padding to make text compatible

Some amendments ; bg removed

Buttons left aligned

Grid is more suitable for context

added a wrapper div with flex
Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

LGTM

I'd like to hear what other reviewers think.

Copy link
Contributor

Choose a reason for hiding this comment

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

Screen shot

One weirdness is that the buttons are different widths (and still quite wide).

I think this is overall an improvement though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I understand that It might look a little off sometimes 😬. While we've tried some other approaches, I personally feel that this one offers the best consistency and alignment over many viewports

Copy link
Contributor

@Goclipse27 Goclipse27 Oct 4, 2023

Choose a reason for hiding this comment

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

LGTM. @sftim - on training https://deploy-preview-43166--kubernetes-io-main-staging.netlify.app/training/. - There was light background for tile with no border, do you think is it worth to get inline with that.

Copy link
Contributor

Choose a reason for hiding this comment

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

There was light background for tile with no border, do you think is it worth to get inline with that.

I don't - the docs have a simpler look whereas the training page is a bit more promotional.

But, thanks for suggesting it.

Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

I'm going to treat #43166 (comment) as LGTM

/lgtm
from that.

/approve
from me

and thank you for the PR!


button {
height: min-content;
width: auto;
Copy link
Contributor

Choose a reason for hiding this comment

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

A bit of CSS calc() here could improve the look further. If you want to put the work in there (it's fine not to!)

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, Might as well try that. If I'll like what I see, A PR will be on it's way

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 5, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aj11anuj, sftim

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 257156edd54fdb7ec524340f41d4992b72369ca9

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 5, 2023
@k8s-ci-robot k8s-ci-robot merged commit 7986211 into kubernetes:main Oct 5, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/docs Categorizes an issue or PR as relevant to SIG Docs. 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.

Poor alignment between tiles and buttons on home page for docs
6 participants