-
Notifications
You must be signed in to change notification settings - Fork 199
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
Fix errors and warnings in the course/lesson/question editor #7646
Conversation
Test the previous changes of this PR with WordPress Playground. |
WordPress Dependencies ReportThe
This comment was automatically generated by the |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
import { ToggleControl } from '@wordpress/components'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import SenseiIcon from '../../icons/logo-tree.svg'; | ||
|
||
if ( ! PluginPrePublishPanel ) { |
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.
We still need the old ones here for WP 6.4.
@@ -80,11 +81,9 @@ export const reducers = { | |||
DEFAULT: ( action, state ) => state, | |||
}; | |||
|
|||
export const store = createReduxStore( SENSEI_TOUR_STORE, { |
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.
The store
import is not used anywhere.
Test the previous changes of this PR with WordPress Playground. |
c0c0c7c
to
c82cb2f
Compare
Test the previous changes of this PR with WordPress Playground. |
c82cb2f
to
c594d47
Compare
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
const isTemplate = | ||
'lesson' === postType && editPost.isEditingTemplate(); | ||
toggleBlockRegistration( isTemplate ); | ||
toggleBlockRegistration( false ); |
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.
With the current version of Gutenberg, this has the same effect as the previous code.
Basically, it was checking 'lesson' === postType && 'wp_template' === postType
.
Checking the history of that function, it had some variations, but this should be enough. I tested it in the lesson editor and in the template using WP 6.4 and 6.6, and it seems to be working well (blocks available on the template and not available on the lesson editor).
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
@@ -61,24 +114,7 @@ const IncompleteQuestionsNotice = ( { count, onClick } ) => ( | |||
* @param {Function} props.setMeta | |||
*/ | |||
const QuizValidationResult = ( { clientId, setMeta } ) => { | |||
const incompleteQuestions = useSelect( |
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.
We caught this as part of this PR because it was also causing a warning.
The full commit which also needed to memorize a selector: 993b12a
Test the previous changes of this PR with WordPress Playground. |
8bb0f60
to
993b12a
Compare
3eefd28
to
db0060f
Compare
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
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.
Thanks for working on this, Renatho!
After testing, I've noticed just one warning related to the Course Actions block:
AM9z11.mp4
Overall it looks great but I didn't have time to test everything. I'll continue on Monday if no one picks this up.
Good catch, Miro! Fixed this one too! f38ab70 |
Test the previous changes of this PR with WordPress Playground. |
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.
Part of #7624
Proposed Changes
Known issues
Blocked attempt to show a 'beforeunload' confirmation panel for a frame that never had a user gesture since its load.
. I could isolate it noticing that the warning is not displayed anymore when we remove theTextControl
from the modal.isElevated
), which comes from Calypso.Testing Instructions
trunk
or:2.1. Install the WordPress Beta Tester plugin.
2.2. Switch to the bleeding edge nightly.
Pre-Merge Checklist