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

Regenerate saved style on theme change #1827

Merged
merged 3 commits into from
Aug 31, 2023
Merged

Conversation

Soare-Robert-Daniel
Copy link
Contributor

@Soare-Robert-Daniel Soare-Robert-Daniel commented Aug 23, 2023

Closes #1673

Summary

Added the regenerate_styles function in the hook that triggers when the theme changes.

Screenshots


Test instructions

  1. Import content from Template Cloud. Change some blocks on the Home page.
  2. When you change to a FSE theme, check the Home page frontend.
  3. All changes made before changing the theme should be visible in the Frontend

Checklist before the final review

  • Included E2E or unit tests for the changes in this PR.
  • Visual elements are not affected by independent changes.
  • It is at least compatible with the minimum WordPress version.
  • It loads additional script in frontend only if it is required.
  • Does not impact the Core Web Vitals.
  • In case of deprecation, old blocks are safely migrated.
  • It is usable in Widgets and FSE.
  • Copy/Paste is working if the attributes are modified.
  • PR is following the best practices

@Soare-Robert-Daniel Soare-Robert-Daniel added the pr-checklist-skip Allow this Pull Request to skip checklist. label Aug 23, 2023
@Soare-Robert-Daniel Soare-Robert-Daniel marked this pull request as ready for review August 23, 2023 13:05
@Soare-Robert-Daniel Soare-Robert-Daniel linked an issue Aug 23, 2023 that may be closed by this pull request
@pirate-bot
Copy link
Contributor

pirate-bot commented Aug 23, 2023

Plugin build for 544881c is ready 🛎️!

@pirate-bot
Copy link
Contributor

Bundle Size Diff

Package Old Size New Size Diff
Animations 270.78 KB 270.78 KB 0 B (0.00%)
Blocks 1.42 MB 1.42 MB 0 B (0.00%)
CSS 85.28 KB 85.28 KB 0 B (0.00%)
Dashboard 122.49 KB 122.49 KB 0 B (0.00%)
Export Import 83.17 KB 83.17 KB 0 B (0.00%)
Pro 303.27 KB 303.27 KB 0 B (0.00%)

@pirate-bot
Copy link
Contributor

pirate-bot commented Aug 23, 2023

E2E Summary

Typing

Test Average Time (ms) Standard Deviation (ms) Median Time (ms) Quantile for soft limit (%) Quantile for hard limit (%)
Typing 92.45 6.69 90.29 0 (60ms) 5.26 (80ms)
Values above 60ms "0 - 98.33, 1 - 87.96, 2 - 100.23, 3 - 98.58, 4 - 83.80, 5 - 89.53, 6 - 79.08, 7 - 97.05, 8 - 87.17, 9 - 93.40, 10 - 96.87, 11 - 89.10, 12 - 89.49, 13 - 85.35, 14 - 90.29, 15 - 89.56, 16 - 103.19, 17 - 92.22, 18 - 105.39"

Copy link
Member

@HardeepAsrani HardeepAsrani left a comment

Choose a reason for hiding this comment

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

We can fix the PHPStan error and get this merged as it does seem useful too @Soare-Robert-Daniel

@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Aug 28, 2023
@HardeepAsrani HardeepAsrani merged commit 1004e7e into development Aug 31, 2023
12 checks passed
@HardeepAsrani HardeepAsrani deleted the fix/theme-switch branch August 31, 2023 07:25
@pirate-bot
Copy link
Contributor

🎉 This PR is included in version 2.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist. released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSS is not generated when switching to a FSE theme
3 participants