@wordpress/edit-post 6.0.1 → 6.1.0-next.e230fbab09.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/block-manager/category.js +2 -2
- package/build/components/block-manager/category.js.map +1 -1
- package/build/components/block-manager/index.js +2 -2
- package/build/components/block-manager/index.js.map +1 -1
- package/build/components/header/fullscreen-mode-close/index.js +11 -4
- package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build/components/header/header-toolbar/index.js +1 -1
- package/build/components/header/header-toolbar/index.js.map +1 -1
- package/build/components/header/header-toolbar/index.native.js +1 -1
- package/build/components/header/header-toolbar/index.native.js.map +1 -1
- package/build/components/header/index.js +3 -1
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/more-menu/index.js +0 -6
- package/build/components/header/more-menu/index.js.map +1 -1
- package/build/components/header/template-title/delete-template.js +29 -20
- package/build/components/header/template-title/delete-template.js.map +1 -1
- package/build/components/header/writing-menu/index.js +7 -7
- package/build/components/header/writing-menu/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +5 -0
- package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/index.native.js +1 -1
- package/build/components/layout/index.native.js.map +1 -1
- package/build/components/preferences-modal/index.js +14 -136
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preferences-modal/meta-boxes-section.js +2 -4
- package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build/components/preferences-modal/options/enable-custom-fields.js +2 -8
- package/build/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
- package/build/components/preferences-modal/options/enable-feature.js +2 -4
- package/build/components/preferences-modal/options/enable-feature.js.map +1 -1
- package/build/components/preferences-modal/options/enable-panel.js +2 -4
- package/build/components/preferences-modal/options/enable-panel.js.map +1 -1
- package/build/components/preferences-modal/options/enable-publish-sidebar.js +2 -8
- package/build/components/preferences-modal/options/enable-publish-sidebar.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +0 -11
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/post-link/index.js +1 -1
- package/build/components/sidebar/post-link/index.js.map +1 -1
- package/build/editor.js +4 -3
- package/build/editor.js.map +1 -1
- package/build/editor.native.js +8 -8
- package/build/editor.native.js.map +1 -1
- package/build/hooks/validate-multiple-use/index.js +1 -1
- package/build/hooks/validate-multiple-use/index.js.map +1 -1
- package/build/index.js +5 -4
- package/build/index.js.map +1 -1
- package/build/plugins/welcome-guide-menu-item/index.js +3 -3
- package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build/store/actions.js +173 -113
- package/build/store/actions.js.map +1 -1
- package/build/store/index.js +0 -3
- package/build/store/index.js.map +1 -1
- package/build/store/reducer.js +0 -12
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +44 -10
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/block-manager/category.js +2 -2
- package/build-module/components/block-manager/category.js.map +1 -1
- package/build-module/components/block-manager/index.js +2 -2
- package/build-module/components/block-manager/index.js.map +1 -1
- package/build-module/components/header/fullscreen-mode-close/index.js +8 -4
- package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.js +1 -1
- package/build-module/components/header/header-toolbar/index.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.native.js +1 -1
- package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
- package/build-module/components/header/index.js +3 -1
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/more-menu/index.js +0 -5
- package/build-module/components/header/more-menu/index.js.map +1 -1
- package/build-module/components/header/template-title/delete-template.js +32 -22
- package/build-module/components/header/template-title/delete-template.js.map +1 -1
- package/build-module/components/header/writing-menu/index.js +7 -7
- package/build-module/components/header/writing-menu/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +5 -0
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build-module/components/layout/index.js +2 -2
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/index.native.js +1 -1
- package/build-module/components/layout/index.native.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +15 -135
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preferences-modal/meta-boxes-section.js +2 -2
- package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-custom-fields.js +1 -5
- package/build-module/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-feature.js +1 -1
- package/build-module/components/preferences-modal/options/enable-feature.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-panel.js +1 -1
- package/build-module/components/preferences-modal/options/enable-panel.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-publish-sidebar.js +1 -5
- package/build-module/components/preferences-modal/options/enable-publish-sidebar.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -12
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/post-link/index.js +2 -2
- package/build-module/components/sidebar/post-link/index.js.map +1 -1
- package/build-module/editor.js +5 -4
- package/build-module/editor.js.map +1 -1
- package/build-module/editor.native.js +8 -8
- package/build-module/editor.native.js.map +1 -1
- package/build-module/hooks/validate-multiple-use/index.js +1 -1
- package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
- package/build-module/index.js +5 -4
- package/build-module/index.js.map +1 -1
- package/build-module/plugins/welcome-guide-menu-item/index.js +3 -3
- package/build-module/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build-module/store/actions.js +143 -102
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/index.js +0 -2
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/reducer.js +1 -13
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +36 -6
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +105 -139
- package/build-style/style.css +105 -139
- package/package.json +30 -25
- package/src/components/block-manager/category.js +2 -2
- package/src/components/block-manager/index.js +2 -2
- package/src/components/header/fullscreen-mode-close/index.js +9 -4
- package/src/components/header/fullscreen-mode-close/style.scss +5 -1
- package/src/components/header/fullscreen-mode-close/test/index.js +1 -1
- package/src/components/header/header-toolbar/index.js +1 -1
- package/src/components/header/header-toolbar/index.native.js +1 -1
- package/src/components/header/index.js +1 -1
- package/src/components/header/more-menu/index.js +0 -6
- package/src/components/header/style.scss +1 -1
- package/src/components/header/template-title/delete-template.js +57 -46
- package/src/components/header/writing-menu/index.js +7 -7
- package/src/components/keyboard-shortcut-help-modal/config.js +4 -0
- package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +6 -0
- package/src/components/layout/index.js +2 -2
- package/src/components/layout/index.native.js +1 -1
- package/src/components/preferences-modal/index.js +24 -178
- package/src/components/preferences-modal/meta-boxes-section.js +3 -3
- package/src/components/preferences-modal/options/enable-custom-fields.js +1 -5
- package/src/components/preferences-modal/options/enable-feature.js +1 -1
- package/src/components/preferences-modal/options/enable-panel.js +1 -1
- package/src/components/preferences-modal/options/enable-publish-sidebar.js +1 -5
- package/src/components/preferences-modal/options/test/__snapshots__/enable-custom-fields.js.snap +4 -4
- package/src/components/preferences-modal/options/test/enable-custom-fields.js +1 -1
- package/src/components/preferences-modal/test/__snapshots__/index.js.snap +235 -357
- package/src/components/preferences-modal/test/index.js +6 -6
- package/src/components/secondary-sidebar/list-view-sidebar.js +1 -11
- package/src/components/sidebar/post-link/index.js +2 -2
- package/src/editor.js +4 -3
- package/src/editor.native.js +7 -7
- package/src/hooks/validate-multiple-use/index.js +1 -1
- package/src/index.js +5 -4
- package/src/plugins/welcome-guide-menu-item/index.js +3 -3
- package/src/store/actions.js +129 -149
- package/src/store/index.js +0 -2
- package/src/store/reducer.js +1 -12
- package/src/store/selectors.js +56 -8
- package/src/store/test/actions.js +252 -79
- package/src/store/test/reducer.js +0 -28
- package/src/style.scss +0 -2
- package/src/test/editor.native.js +2 -2
- package/build/components/preferences-modal/options/base.js +0 -35
- package/build/components/preferences-modal/options/base.js.map +0 -1
- package/build/components/preferences-modal/section.js +0 -27
- package/build/components/preferences-modal/section.js.map +0 -1
- package/build-module/components/preferences-modal/options/base.js +0 -27
- package/build-module/components/preferences-modal/options/base.js.map +0 -1
- package/build-module/components/preferences-modal/section.js +0 -19
- package/build-module/components/preferences-modal/section.js.map +0 -1
- package/src/components/header/more-menu/style.scss +0 -35
- package/src/components/preferences-modal/options/base.js +0 -20
- package/src/components/preferences-modal/section.js +0 -15
- package/src/components/preferences-modal/style.scss +0 -112
|
@@ -1,384 +1,262 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
closeLabel="Close"
|
|
7
|
-
onRequestClose={[Function]}
|
|
8
|
-
title="Preferences"
|
|
3
|
+
exports[`EditPostPreferencesModal should match snapshot when the modal is active large viewports 1`] = `
|
|
4
|
+
<PreferencesModal
|
|
5
|
+
closeModal={[Function]}
|
|
9
6
|
>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
onSelect={[Function]}
|
|
13
|
-
orientation="vertical"
|
|
14
|
-
tabs={
|
|
7
|
+
<PreferencesModalTabs
|
|
8
|
+
sections={
|
|
15
9
|
Array [
|
|
16
10
|
Object {
|
|
11
|
+
"content": <React.Fragment>
|
|
12
|
+
<Section
|
|
13
|
+
description="Change options related to publishing."
|
|
14
|
+
title="Publishing"
|
|
15
|
+
>
|
|
16
|
+
<WithSelect(WithDispatch(IfViewportMatches(BaseOption)))
|
|
17
|
+
help="Review settings, such as visibility and tags."
|
|
18
|
+
label="Include pre-publish checklist"
|
|
19
|
+
/>
|
|
20
|
+
</Section>
|
|
21
|
+
<Section
|
|
22
|
+
description="Customize options related to the block editor interface and editing flow."
|
|
23
|
+
title="Appearance"
|
|
24
|
+
>
|
|
25
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
26
|
+
featureName="reducedUI"
|
|
27
|
+
help="Compacts options and outlines in the toolbar."
|
|
28
|
+
label="Reduce the interface"
|
|
29
|
+
/>
|
|
30
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
31
|
+
featureName="focusMode"
|
|
32
|
+
help="Highlights the current block and fades other content."
|
|
33
|
+
label="Spotlight mode"
|
|
34
|
+
/>
|
|
35
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
36
|
+
featureName="showIconLabels"
|
|
37
|
+
help="Shows text instead of icons."
|
|
38
|
+
label="Display button labels"
|
|
39
|
+
/>
|
|
40
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
41
|
+
featureName="themeStyles"
|
|
42
|
+
help="Make the editor look like your theme."
|
|
43
|
+
label="Use theme styles"
|
|
44
|
+
/>
|
|
45
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
46
|
+
featureName="showBlockBreadcrumbs"
|
|
47
|
+
help="Shows block breadcrumbs at the bottom of the editor."
|
|
48
|
+
label="Display block breadcrumbs"
|
|
49
|
+
/>
|
|
50
|
+
</Section>
|
|
51
|
+
</React.Fragment>,
|
|
17
52
|
"name": "general",
|
|
18
|
-
"
|
|
53
|
+
"tabLabel": "General",
|
|
19
54
|
},
|
|
20
55
|
Object {
|
|
56
|
+
"content": <React.Fragment>
|
|
57
|
+
<Section
|
|
58
|
+
description="Customize how you interact with blocks in the block library and editing canvas."
|
|
59
|
+
title="Block interactions"
|
|
60
|
+
>
|
|
61
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
62
|
+
featureName="mostUsedBlocks"
|
|
63
|
+
help="Places the most frequent blocks in the block library."
|
|
64
|
+
label="Show most used blocks"
|
|
65
|
+
/>
|
|
66
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
67
|
+
featureName="keepCaretInsideBlock"
|
|
68
|
+
help="Aids screen readers by stopping text caret from leaving blocks."
|
|
69
|
+
label="Contain text cursor inside block"
|
|
70
|
+
/>
|
|
71
|
+
</Section>
|
|
72
|
+
<Section
|
|
73
|
+
description="Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."
|
|
74
|
+
title="Visible blocks"
|
|
75
|
+
>
|
|
76
|
+
<WithSelect(BlockManager) />
|
|
77
|
+
</Section>
|
|
78
|
+
</React.Fragment>,
|
|
21
79
|
"name": "blocks",
|
|
22
|
-
"
|
|
80
|
+
"tabLabel": "Blocks",
|
|
23
81
|
},
|
|
24
82
|
Object {
|
|
83
|
+
"content": <React.Fragment>
|
|
84
|
+
<Section
|
|
85
|
+
description="Choose what displays in the panel."
|
|
86
|
+
title="Document settings"
|
|
87
|
+
>
|
|
88
|
+
<EnablePluginDocumentSettingPanelOptionSlot />
|
|
89
|
+
<WithSelect(PostTaxonomies)
|
|
90
|
+
taxonomyWrapper={[Function]}
|
|
91
|
+
/>
|
|
92
|
+
<PostFeaturedImageCheck>
|
|
93
|
+
<WithSelect(IfCondition(WithDispatch(BaseOption)))
|
|
94
|
+
label="Featured image"
|
|
95
|
+
panelName="featured-image"
|
|
96
|
+
/>
|
|
97
|
+
</PostFeaturedImageCheck>
|
|
98
|
+
<PostExcerptCheck>
|
|
99
|
+
<WithSelect(IfCondition(WithDispatch(BaseOption)))
|
|
100
|
+
label="Excerpt"
|
|
101
|
+
panelName="post-excerpt"
|
|
102
|
+
/>
|
|
103
|
+
</PostExcerptCheck>
|
|
104
|
+
<WithSelect(PostTypeSupportCheck)
|
|
105
|
+
supportKeys={
|
|
106
|
+
Array [
|
|
107
|
+
"comments",
|
|
108
|
+
"trackbacks",
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
>
|
|
112
|
+
<WithSelect(IfCondition(WithDispatch(BaseOption)))
|
|
113
|
+
label="Discussion"
|
|
114
|
+
panelName="discussion-panel"
|
|
115
|
+
/>
|
|
116
|
+
</WithSelect(PostTypeSupportCheck)>
|
|
117
|
+
<PageAttributesCheck>
|
|
118
|
+
<WithSelect(IfCondition(WithDispatch(BaseOption)))
|
|
119
|
+
label="Page attributes"
|
|
120
|
+
panelName="page-attributes"
|
|
121
|
+
/>
|
|
122
|
+
</PageAttributesCheck>
|
|
123
|
+
</Section>
|
|
124
|
+
<WithSelect(MetaBoxesSection)
|
|
125
|
+
description="Add extra areas to the editor."
|
|
126
|
+
title="Additional"
|
|
127
|
+
/>
|
|
128
|
+
</React.Fragment>,
|
|
25
129
|
"name": "panels",
|
|
26
|
-
"
|
|
130
|
+
"tabLabel": "Panels",
|
|
27
131
|
},
|
|
28
132
|
]
|
|
29
133
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</TabPanel>
|
|
33
|
-
</ForwardRef(Modal)>
|
|
134
|
+
/>
|
|
135
|
+
</PreferencesModal>
|
|
34
136
|
`;
|
|
35
137
|
|
|
36
|
-
exports[`
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
closeLabel="Close"
|
|
40
|
-
onRequestClose={[Function]}
|
|
41
|
-
title="Preferences"
|
|
138
|
+
exports[`EditPostPreferencesModal should match snapshot when the modal is active small viewports 1`] = `
|
|
139
|
+
<PreferencesModal
|
|
140
|
+
closeModal={[Function]}
|
|
42
141
|
>
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
size="small"
|
|
52
|
-
>
|
|
53
|
-
<CardBody>
|
|
54
|
-
<ItemGroup>
|
|
55
|
-
<NavigationButton
|
|
56
|
-
as={
|
|
57
|
-
Object {
|
|
58
|
-
"$$typeof": Symbol(react.forward_ref),
|
|
59
|
-
"__contextSystemKey__": Array [
|
|
60
|
-
"Item",
|
|
61
|
-
],
|
|
62
|
-
"render": [Function],
|
|
63
|
-
"selector": ".components-item",
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
isAction={true}
|
|
67
|
-
key="general"
|
|
68
|
-
path="general"
|
|
142
|
+
<PreferencesModalTabs
|
|
143
|
+
sections={
|
|
144
|
+
Array [
|
|
145
|
+
Object {
|
|
146
|
+
"content": <React.Fragment>
|
|
147
|
+
<Section
|
|
148
|
+
description="Customize options related to the block editor interface and editing flow."
|
|
149
|
+
title="Appearance"
|
|
69
150
|
>
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
isAction={true}
|
|
106
|
-
key="blocks"
|
|
107
|
-
path="blocks"
|
|
151
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
152
|
+
featureName="reducedUI"
|
|
153
|
+
help="Compacts options and outlines in the toolbar."
|
|
154
|
+
label="Reduce the interface"
|
|
155
|
+
/>
|
|
156
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
157
|
+
featureName="focusMode"
|
|
158
|
+
help="Highlights the current block and fades other content."
|
|
159
|
+
label="Spotlight mode"
|
|
160
|
+
/>
|
|
161
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
162
|
+
featureName="showIconLabels"
|
|
163
|
+
help="Shows text instead of icons."
|
|
164
|
+
label="Display button labels"
|
|
165
|
+
/>
|
|
166
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
167
|
+
featureName="themeStyles"
|
|
168
|
+
help="Make the editor look like your theme."
|
|
169
|
+
label="Use theme styles"
|
|
170
|
+
/>
|
|
171
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
172
|
+
featureName="showBlockBreadcrumbs"
|
|
173
|
+
help="Shows block breadcrumbs at the bottom of the editor."
|
|
174
|
+
label="Display block breadcrumbs"
|
|
175
|
+
/>
|
|
176
|
+
</Section>
|
|
177
|
+
</React.Fragment>,
|
|
178
|
+
"name": "general",
|
|
179
|
+
"tabLabel": "General",
|
|
180
|
+
},
|
|
181
|
+
Object {
|
|
182
|
+
"content": <React.Fragment>
|
|
183
|
+
<Section
|
|
184
|
+
description="Customize how you interact with blocks in the block library and editing canvas."
|
|
185
|
+
title="Block interactions"
|
|
108
186
|
>
|
|
109
|
-
<
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
>
|
|
124
|
-
<Path
|
|
125
|
-
d="M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
|
|
126
|
-
/>
|
|
127
|
-
</SVG>
|
|
128
|
-
}
|
|
129
|
-
/>
|
|
130
|
-
</FlexItem>
|
|
131
|
-
</HStack>
|
|
132
|
-
</NavigationButton>
|
|
133
|
-
<NavigationButton
|
|
134
|
-
as={
|
|
135
|
-
Object {
|
|
136
|
-
"$$typeof": Symbol(react.forward_ref),
|
|
137
|
-
"__contextSystemKey__": Array [
|
|
138
|
-
"Item",
|
|
139
|
-
],
|
|
140
|
-
"render": [Function],
|
|
141
|
-
"selector": ".components-item",
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
isAction={true}
|
|
145
|
-
key="panels"
|
|
146
|
-
path="panels"
|
|
187
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
188
|
+
featureName="mostUsedBlocks"
|
|
189
|
+
help="Places the most frequent blocks in the block library."
|
|
190
|
+
label="Show most used blocks"
|
|
191
|
+
/>
|
|
192
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
193
|
+
featureName="keepCaretInsideBlock"
|
|
194
|
+
help="Aids screen readers by stopping text caret from leaving blocks."
|
|
195
|
+
label="Contain text cursor inside block"
|
|
196
|
+
/>
|
|
197
|
+
</Section>
|
|
198
|
+
<Section
|
|
199
|
+
description="Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."
|
|
200
|
+
title="Visible blocks"
|
|
147
201
|
>
|
|
148
|
-
<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
/>
|
|
169
|
-
</FlexItem>
|
|
170
|
-
</HStack>
|
|
171
|
-
</NavigationButton>
|
|
172
|
-
</ItemGroup>
|
|
173
|
-
</CardBody>
|
|
174
|
-
</Card>
|
|
175
|
-
</NavigatorScreen>
|
|
176
|
-
<NavigatorScreen
|
|
177
|
-
key="general-menu"
|
|
178
|
-
path="general"
|
|
179
|
-
>
|
|
180
|
-
<Card
|
|
181
|
-
isBorderless={true}
|
|
182
|
-
size="large"
|
|
183
|
-
>
|
|
184
|
-
<CardHeader
|
|
185
|
-
gap="6"
|
|
186
|
-
isBorderless={false}
|
|
187
|
-
justify="left"
|
|
188
|
-
size="small"
|
|
189
|
-
>
|
|
190
|
-
<NavigationBackButton
|
|
191
|
-
aria-label="Navigate to the previous view"
|
|
192
|
-
icon={
|
|
193
|
-
<SVG
|
|
194
|
-
viewBox="0 0 24 24"
|
|
195
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
196
|
-
>
|
|
197
|
-
<Path
|
|
198
|
-
d="M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
|
|
202
|
+
<WithSelect(BlockManager) />
|
|
203
|
+
</Section>
|
|
204
|
+
</React.Fragment>,
|
|
205
|
+
"name": "blocks",
|
|
206
|
+
"tabLabel": "Blocks",
|
|
207
|
+
},
|
|
208
|
+
Object {
|
|
209
|
+
"content": <React.Fragment>
|
|
210
|
+
<Section
|
|
211
|
+
description="Choose what displays in the panel."
|
|
212
|
+
title="Document settings"
|
|
213
|
+
>
|
|
214
|
+
<EnablePluginDocumentSettingPanelOptionSlot />
|
|
215
|
+
<WithSelect(PostTaxonomies)
|
|
216
|
+
taxonomyWrapper={[Function]}
|
|
217
|
+
/>
|
|
218
|
+
<PostFeaturedImageCheck>
|
|
219
|
+
<WithSelect(IfCondition(WithDispatch(BaseOption)))
|
|
220
|
+
label="Featured image"
|
|
221
|
+
panelName="featured-image"
|
|
199
222
|
/>
|
|
200
|
-
</
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
>
|
|
206
|
-
General
|
|
207
|
-
</Text>
|
|
208
|
-
</CardHeader>
|
|
209
|
-
<CardBody>
|
|
210
|
-
<Section
|
|
211
|
-
description="Customize options related to the block editor interface and editing flow."
|
|
212
|
-
title="Appearance"
|
|
213
|
-
>
|
|
214
|
-
<WithSelect(WithDispatch(BaseOption))
|
|
215
|
-
featureName="reducedUI"
|
|
216
|
-
help="Compacts options and outlines in the toolbar."
|
|
217
|
-
label="Reduce the interface"
|
|
218
|
-
/>
|
|
219
|
-
<WithSelect(WithDispatch(BaseOption))
|
|
220
|
-
featureName="focusMode"
|
|
221
|
-
help="Highlights the current block and fades other content."
|
|
222
|
-
label="Spotlight mode"
|
|
223
|
-
/>
|
|
224
|
-
<WithSelect(WithDispatch(BaseOption))
|
|
225
|
-
featureName="showIconLabels"
|
|
226
|
-
help="Shows text instead of icons."
|
|
227
|
-
label="Display button labels"
|
|
228
|
-
/>
|
|
229
|
-
<WithSelect(WithDispatch(BaseOption))
|
|
230
|
-
featureName="themeStyles"
|
|
231
|
-
help="Make the editor look like your theme."
|
|
232
|
-
label="Use theme styles"
|
|
233
|
-
/>
|
|
234
|
-
<WithSelect(WithDispatch(BaseOption))
|
|
235
|
-
featureName="showBlockBreadcrumbs"
|
|
236
|
-
help="Shows block breadcrumbs at the bottom of the editor."
|
|
237
|
-
label="Display block breadcrumbs"
|
|
238
|
-
/>
|
|
239
|
-
</Section>
|
|
240
|
-
</CardBody>
|
|
241
|
-
</Card>
|
|
242
|
-
</NavigatorScreen>
|
|
243
|
-
<NavigatorScreen
|
|
244
|
-
key="blocks-menu"
|
|
245
|
-
path="blocks"
|
|
246
|
-
>
|
|
247
|
-
<Card
|
|
248
|
-
isBorderless={true}
|
|
249
|
-
size="large"
|
|
250
|
-
>
|
|
251
|
-
<CardHeader
|
|
252
|
-
gap="6"
|
|
253
|
-
isBorderless={false}
|
|
254
|
-
justify="left"
|
|
255
|
-
size="small"
|
|
256
|
-
>
|
|
257
|
-
<NavigationBackButton
|
|
258
|
-
aria-label="Navigate to the previous view"
|
|
259
|
-
icon={
|
|
260
|
-
<SVG
|
|
261
|
-
viewBox="0 0 24 24"
|
|
262
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
263
|
-
>
|
|
264
|
-
<Path
|
|
265
|
-
d="M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
|
|
223
|
+
</PostFeaturedImageCheck>
|
|
224
|
+
<PostExcerptCheck>
|
|
225
|
+
<WithSelect(IfCondition(WithDispatch(BaseOption)))
|
|
226
|
+
label="Excerpt"
|
|
227
|
+
panelName="post-excerpt"
|
|
266
228
|
/>
|
|
267
|
-
</
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
</CardHeader>
|
|
276
|
-
<CardBody>
|
|
277
|
-
<Section
|
|
278
|
-
description="Customize how you interact with blocks in the block library and editing canvas."
|
|
279
|
-
title="Block interactions"
|
|
280
|
-
>
|
|
281
|
-
<WithSelect(WithDispatch(BaseOption))
|
|
282
|
-
featureName="mostUsedBlocks"
|
|
283
|
-
help="Places the most frequent blocks in the block library."
|
|
284
|
-
label="Show most used blocks"
|
|
285
|
-
/>
|
|
286
|
-
<WithSelect(WithDispatch(BaseOption))
|
|
287
|
-
featureName="keepCaretInsideBlock"
|
|
288
|
-
help="Aids screen readers by stopping text caret from leaving blocks."
|
|
289
|
-
label="Contain text cursor inside block"
|
|
290
|
-
/>
|
|
291
|
-
</Section>
|
|
292
|
-
<Section
|
|
293
|
-
description="Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."
|
|
294
|
-
title="Visible blocks"
|
|
295
|
-
>
|
|
296
|
-
<WithSelect(BlockManager) />
|
|
297
|
-
</Section>
|
|
298
|
-
</CardBody>
|
|
299
|
-
</Card>
|
|
300
|
-
</NavigatorScreen>
|
|
301
|
-
<NavigatorScreen
|
|
302
|
-
key="panels-menu"
|
|
303
|
-
path="panels"
|
|
304
|
-
>
|
|
305
|
-
<Card
|
|
306
|
-
isBorderless={true}
|
|
307
|
-
size="large"
|
|
308
|
-
>
|
|
309
|
-
<CardHeader
|
|
310
|
-
gap="6"
|
|
311
|
-
isBorderless={false}
|
|
312
|
-
justify="left"
|
|
313
|
-
size="small"
|
|
314
|
-
>
|
|
315
|
-
<NavigationBackButton
|
|
316
|
-
aria-label="Navigate to the previous view"
|
|
317
|
-
icon={
|
|
318
|
-
<SVG
|
|
319
|
-
viewBox="0 0 24 24"
|
|
320
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
229
|
+
</PostExcerptCheck>
|
|
230
|
+
<WithSelect(PostTypeSupportCheck)
|
|
231
|
+
supportKeys={
|
|
232
|
+
Array [
|
|
233
|
+
"comments",
|
|
234
|
+
"trackbacks",
|
|
235
|
+
]
|
|
236
|
+
}
|
|
321
237
|
>
|
|
322
|
-
<
|
|
323
|
-
|
|
238
|
+
<WithSelect(IfCondition(WithDispatch(BaseOption)))
|
|
239
|
+
label="Discussion"
|
|
240
|
+
panelName="discussion-panel"
|
|
324
241
|
/>
|
|
325
|
-
</
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
description="Choose what displays in the panel."
|
|
337
|
-
title="Document settings"
|
|
338
|
-
>
|
|
339
|
-
<EnablePluginDocumentSettingPanelOptionSlot />
|
|
340
|
-
<WithSelect(PostTaxonomies)
|
|
341
|
-
taxonomyWrapper={[Function]}
|
|
242
|
+
</WithSelect(PostTypeSupportCheck)>
|
|
243
|
+
<PageAttributesCheck>
|
|
244
|
+
<WithSelect(IfCondition(WithDispatch(BaseOption)))
|
|
245
|
+
label="Page attributes"
|
|
246
|
+
panelName="page-attributes"
|
|
247
|
+
/>
|
|
248
|
+
</PageAttributesCheck>
|
|
249
|
+
</Section>
|
|
250
|
+
<WithSelect(MetaBoxesSection)
|
|
251
|
+
description="Add extra areas to the editor."
|
|
252
|
+
title="Additional"
|
|
342
253
|
/>
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
label="Excerpt"
|
|
352
|
-
panelName="post-excerpt"
|
|
353
|
-
/>
|
|
354
|
-
</PostExcerptCheck>
|
|
355
|
-
<WithSelect(PostTypeSupportCheck)
|
|
356
|
-
supportKeys={
|
|
357
|
-
Array [
|
|
358
|
-
"comments",
|
|
359
|
-
"trackbacks",
|
|
360
|
-
]
|
|
361
|
-
}
|
|
362
|
-
>
|
|
363
|
-
<WithSelect(IfCondition(WithDispatch(BaseOption)))
|
|
364
|
-
label="Discussion"
|
|
365
|
-
panelName="discussion-panel"
|
|
366
|
-
/>
|
|
367
|
-
</WithSelect(PostTypeSupportCheck)>
|
|
368
|
-
<PageAttributesCheck>
|
|
369
|
-
<WithSelect(IfCondition(WithDispatch(BaseOption)))
|
|
370
|
-
label="Page attributes"
|
|
371
|
-
panelName="page-attributes"
|
|
372
|
-
/>
|
|
373
|
-
</PageAttributesCheck>
|
|
374
|
-
</Section>
|
|
375
|
-
<WithSelect(MetaBoxesSection)
|
|
376
|
-
description="Add extra areas to the editor."
|
|
377
|
-
title="Additional"
|
|
378
|
-
/>
|
|
379
|
-
</CardBody>
|
|
380
|
-
</Card>
|
|
381
|
-
</NavigatorScreen>
|
|
382
|
-
</NavigatorProvider>
|
|
383
|
-
</ForwardRef(Modal)>
|
|
254
|
+
</React.Fragment>,
|
|
255
|
+
"name": "panels",
|
|
256
|
+
"tabLabel": "Panels",
|
|
257
|
+
},
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
/>
|
|
261
|
+
</PreferencesModal>
|
|
384
262
|
`;
|
|
@@ -12,31 +12,31 @@ import { useViewportMatch } from '@wordpress/compose';
|
|
|
12
12
|
/**
|
|
13
13
|
* Internal dependencies
|
|
14
14
|
*/
|
|
15
|
-
import
|
|
15
|
+
import EditPostPreferencesModal from '../';
|
|
16
16
|
|
|
17
|
-
// This allows us to tweak the returned value on each test
|
|
17
|
+
// This allows us to tweak the returned value on each test.
|
|
18
18
|
jest.mock( '@wordpress/data/src/components/use-select', () => jest.fn() );
|
|
19
19
|
jest.mock( '@wordpress/compose/src/hooks/use-viewport-match', () => jest.fn() );
|
|
20
20
|
|
|
21
|
-
describe( '
|
|
21
|
+
describe( 'EditPostPreferencesModal', () => {
|
|
22
22
|
describe( 'should match snapshot when the modal is active', () => {
|
|
23
23
|
it( 'large viewports', () => {
|
|
24
24
|
useSelect.mockImplementation( () => ( { isModalActive: true } ) );
|
|
25
25
|
useViewportMatch.mockImplementation( () => true );
|
|
26
|
-
const wrapper = shallow( <
|
|
26
|
+
const wrapper = shallow( <EditPostPreferencesModal /> );
|
|
27
27
|
expect( wrapper ).toMatchSnapshot();
|
|
28
28
|
} );
|
|
29
29
|
it( 'small viewports', () => {
|
|
30
30
|
useSelect.mockImplementation( () => ( { isModalActive: true } ) );
|
|
31
31
|
useViewportMatch.mockImplementation( () => false );
|
|
32
|
-
const wrapper = shallow( <
|
|
32
|
+
const wrapper = shallow( <EditPostPreferencesModal /> );
|
|
33
33
|
expect( wrapper ).toMatchSnapshot();
|
|
34
34
|
} );
|
|
35
35
|
} );
|
|
36
36
|
|
|
37
37
|
it( 'should not render when the modal is not active', () => {
|
|
38
38
|
useSelect.mockImplementation( () => ( { isModalActive: false } ) );
|
|
39
|
-
const wrapper = shallow( <
|
|
39
|
+
const wrapper = shallow( <EditPostPreferencesModal /> );
|
|
40
40
|
expect( wrapper.isEmptyRender() ).toBe( true );
|
|
41
41
|
} );
|
|
42
42
|
} );
|