-
Notifications
You must be signed in to change notification settings - Fork 384
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
Fallback to AMP Legacy Reader theme if active Reader theme is unavailable #5159
Conversation
e50a6a2
to
aeeb22e
Compare
# Conflicts: # src/Admin/ReaderThemes.php
Plugin builds for 810ec5f are ready 🛎️!
|
Investigating the test failures… |
Already fixed the E2E ones; pushing fix now. |
…d AMP settings screen
@pierlon There's a condition here that may not be accounted for. If I have a plugin present that adding Neve via The only way for me to proceed I believe is to select a non-Neve theme and then re-select Neve, which isn't expected. In the case of Neve still being among the selectable Reader themes but not being installed anymore, the Legacy theme should be selected in that case as well, I suppose? |
Good catch.
Yep that's right. Currently it's only checking if the theme data exists, but it should be instead checking if the theme exists. |
@westonruter e5e086f should fix the issue. |
ef95ca8
to
9364a51
Compare
9364a51
to
3f005bf
Compare
Co-authored-by: Weston Ruter <westonruter@google.com>
delete_site_transient( 'theme_roots' ); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't appear that this does anything anymore:
delete_site_transient( 'theme_roots' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
@@ -18,6 +18,9 @@ module.exports = { | |||
'<rootDir>/build/', | |||
'<rootDir>/tests/shared', | |||
], | |||
modulePathIgnorePatterns: [ | |||
'<rootDir>/assets/src/components/.*/__mocks__', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I received the following warning while running the JS tests:
jest-haste-map: duplicate manual mock found: index
The following files share their name; please delete one of them:
* <rootDir>/assets/src/components/options-context-provider/__mocks__/index.js
* <rootDir>/assets/src/components/reader-themes-context-provider/__mocks__/index.js
It seems Jest doesn't allow mocks with the same base name for some weird reason. It's been filed as a bug for quite some time now.
Ignoring the mocks in assets/src/components
seems to resolve the issue, but I'd like to get a second opinion from @johnwatkins0 on this.
Summary
Screenshots:
Fixes #5070
Fixes #5136
Checklist