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

Use version as query param to cache bust theme styles #5943

Merged
merged 1 commit into from
May 10, 2023

Conversation

Waseem826
Copy link
Contributor

What this PR does / why we need it:
Since theme files (dark.scss, light.scss, custom.scss) don't have any hash in their names (like styles.*.scss) and we have to load them manually on the basis of selected theme, these files are cached by browser and sometimes lead to unexpected behaviour.
This PR adds current release tag inside the file URL to bust the cache and load latest version of these files.

For example (note file size):

v2.22.0:

Screenshot 2023-05-08 at 4 11 35 PM

v2.22.2:
Screenshot 2023-05-08 at 4 11 48 PM

Which issue(s) this PR fixes:

Fixes #5583

What type of PR is this?

/kind bug

Special notes for your reviewer:

Does this PR introduce a user-facing change? Then add your Release Note here:

Add cache busting mechanism for theme styles.

Documentation:

NONE

@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. docs/none Denotes a PR that doesn't need documentation (changes). kind/bug Categorizes issue or PR as related to a bug. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 8, 2023
Copy link
Member

@ahmedwaleedmalik ahmedwaleedmalik left a comment

Choose a reason for hiding this comment

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

/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label May 10, 2023
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: b1908581e2064f613d7aaa95abd782f9df3ebce3

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahmedwaleedmalik, Waseem826

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

@kubermatic-bot kubermatic-bot merged commit fd92c2d into kubermatic:main May 10, 2023
8 of 10 checks passed
@kubermatic-bot kubermatic-bot added this to the KKP 2.23 milestone May 10, 2023
@Waseem826 Waseem826 deleted the 5583-cache-bust-theme-css branch May 11, 2023 10:16
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. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/none Denotes a PR that doesn't need documentation (changes). kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dark.css is being cached and will lead to a suboptimal experience after KKP updates where it contained changes
3 participants