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

Upgrade docsy to 0.7.2 #569

Merged
merged 4 commits into from
Jan 31, 2025
Merged

Conversation

SayakMukhopadhyay
Copy link
Contributor

@SayakMukhopadhyay SayakMukhopadhyay commented Jan 30, 2025

This PR upgrades Docsy from 0.6 to 0.7.2.

This is a a big change in Docsy as it upgraded to Bootstrap 5.2 and introduced breaking changes. See the complete change notes in https://github.com/google/docsy/releases/tag/v0.7.2

In details, the following are the changes:

  • Upgraded Docsy npm dependency to 0.7.2
  • Updated dependencies in the package.json to the latest autoprefixer and postcss-cli.
  • Layouts updated
    • Changed bootstrap class pl-* to ps-* in layouts/calendar/baseof.html, layouts/community/baseof.html and layouts/resources/baseof.html. See https://getbootstrap.com/docs/5.2/migration/#utilities
    • In the cover page, the color parameter is removed else it is setting the wrong text color.
    • _default/content, and the list.html layouts have been updated to make them the same as the ones in Docsy, apart from the needed customisations.
    • The navbar.html partial has been deleted. As mentioned in the file, it was a 1:1 copy but without minification and was ok to be deleted once tdewolff/minify was updated to >=2.7.3. Since the dependency is not updated, the override is no longer needed.
  • _variables_project.scss has been updated with some customisations that are needed to override some Bootstrap defaults.
  • _styles_project.scss adds any custom styles that is needed. For this release, Docsy doesn't capitalise the title in the navbar by default and capitalising it with CSS is the simplest way instead of copying the whole navbar partial.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 30, 2025
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jan 30, 2025
@SayakMukhopadhyay SayakMukhopadhyay marked this pull request as ready for review January 30, 2025 12:56
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 30, 2025
@SayakMukhopadhyay
Copy link
Contributor Author

Stylistically, I have tried to keep things looking the same. Except the RSS button in the blog page. Docsy has changed its look in the PR google/docsy#1521 and this is the comparison

Before:
image
After:
image

Do note, that the RSS button just had the default behaviour of Docsy and no customisation was done. If this change is not wanted, I can add the customisations necessary for changing the colour back to Orange. Or maybe we would prefer using the k8s blue.

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.

Thanks!

/lgtm
/approve

/hold
for additional reviews. OK to unhold through lazy consensus after 2025-01-01 or if there is a second /lgtm.

@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 Jan 30, 2025
@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 30, 2025
Copy link
Contributor

@chalin chalin left a comment

Choose a reason for hiding this comment

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

Wow, great work @SayakMukhopadhyay!

Inline comments are mainly suggestions to align with the new Docsy defaults. Otherwise ...

/lgtm

Comment on lines +1 to +3
.navbar-brand__name {
text-transform: uppercase;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Unless there's a feeling that this is tied to a brand-style identity (which it is not IMHO), I'd suggest that we align with the new Docsy default and drop the ALLCAPS.

Comment on lines +3 to +11

$display-font-sizes: (
1: 3rem,
2: 2.5rem,
3: 2rem,
4: 1.75rem
);

$display-font-weight: $font-weight-bold;
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, I'd vote to align with the Docsy/Bootstrap defaults; even if this means looking slightly different from the pre-upgrade version of the site. WDYT?

@k8s-ci-robot
Copy link
Contributor

@chalin: changing LGTM is restricted to collaborators

In response to this:

Wow, great work @SayakMukhopadhyay!

Inline comments are mainly suggestions to align with the new Docsy defaults. Otherwise ...

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chalin, SayakMukhopadhyay, 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

@chalin
Copy link
Contributor

chalin commented Jan 30, 2025

On a related note, the instructions in https://github.com/kubernetes/contributor-site/blame/148e2934d70ecc89ab2a770407defb973dbab8d4/README.md#L66-L73 are out of date since #531.

@sftim
Copy link
Contributor

sftim commented Jan 31, 2025

@chalin as a Docsy maintainer providing /lgtm is grounds enough for me.

/hold cancel

@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 Jan 31, 2025
@k8s-ci-robot k8s-ci-robot merged commit 753a068 into kubernetes:master Jan 31, 2025
6 checks passed
@SayakMukhopadhyay SayakMukhopadhyay deleted the docsy-0.7 branch January 31, 2025 06:12
@SayakMukhopadhyay
Copy link
Contributor Author

On a related note, the instructions in https://github.com/kubernetes/contributor-site/blame/148e2934d70ecc89ab2a770407defb973dbab8d4/README.md#L66-L73 are out of date since #531.

I will fix it in the next update.

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. 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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants