@wordpress/editor 12.6.0 → 12.9.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/CHANGELOG.md +6 -0
- package/build/components/editor-help/help-section-title.native.js +43 -0
- package/build/components/editor-help/help-section-title.native.js.map +1 -0
- package/build/components/editor-help/help-topic-row.native.js +3 -2
- package/build/components/editor-help/help-topic-row.native.js.map +1 -1
- package/build/components/editor-help/icon-move-blocks.native.js +23 -0
- package/build/components/editor-help/icon-move-blocks.native.js.map +1 -0
- package/build/components/editor-help/index.native.js +10 -11
- package/build/components/editor-help/index.native.js.map +1 -1
- package/build/components/editor-help/move-blocks.native.js +14 -2
- package/build/components/editor-help/move-blocks.native.js.map +1 -1
- package/build/components/editor-help/view-sections.native.js +21 -5
- package/build/components/editor-help/view-sections.native.js.map +1 -1
- package/build/components/post-featured-image/index.js +84 -41
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-schedule/index.js +11 -18
- package/build/components/post-schedule/index.js.map +1 -1
- package/build/components/post-taxonomies/flat-term-selector.js +2 -2
- package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/index.js +7 -1
- package/build/components/post-taxonomies/index.js.map +1 -1
- package/build/components/post-text-editor/index.js +12 -1
- package/build/components/post-text-editor/index.js.map +1 -1
- package/build/components/post-visibility/index.js +132 -167
- package/build/components/post-visibility/index.js.map +1 -1
- package/build/components/post-visibility/label.js +5 -22
- package/build/components/post-visibility/label.js.map +1 -1
- package/build/components/post-visibility/utils.js +14 -13
- package/build/components/post-visibility/utils.js.map +1 -1
- package/build/components/provider/index.native.js +3 -1
- package/build/components/provider/index.native.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.js +15 -9
- package/build/components/provider/use-block-editor-settings.js.map +1 -1
- package/build/store/selectors.js +2 -2
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/editor-help/help-section-title.native.js +31 -0
- package/build-module/components/editor-help/help-section-title.native.js.map +1 -0
- package/build-module/components/editor-help/help-topic-row.native.js +3 -2
- package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
- package/build-module/components/editor-help/icon-move-blocks.native.js +13 -0
- package/build-module/components/editor-help/icon-move-blocks.native.js.map +1 -0
- package/build-module/components/editor-help/index.native.js +10 -12
- package/build-module/components/editor-help/index.native.js.map +1 -1
- package/build-module/components/editor-help/move-blocks.native.js +15 -3
- package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/view-sections.native.js +22 -6
- package/build-module/components/editor-help/view-sections.native.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +86 -42
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-schedule/index.js +12 -19
- package/build-module/components/post-schedule/index.js.map +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js +2 -2
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/index.js +7 -1
- package/build-module/components/post-taxonomies/index.js.map +1 -1
- package/build-module/components/post-text-editor/index.js +13 -2
- package/build-module/components/post-text-editor/index.js.map +1 -1
- package/build-module/components/post-visibility/index.js +132 -166
- package/build-module/components/post-visibility/index.js.map +1 -1
- package/build-module/components/post-visibility/label.js +5 -20
- package/build-module/components/post-visibility/label.js.map +1 -1
- package/build-module/components/post-visibility/utils.js +14 -13
- package/build-module/components/post-visibility/utils.js.map +1 -1
- package/build-module/components/provider/index.native.js +2 -1
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.js +16 -10
- package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
- package/build-module/store/selectors.js +2 -2
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +51 -52
- package/build-style/style.css +51 -52
- package/package.json +29 -28
- package/src/components/autosave-monitor/test/index.js +3 -0
- package/src/components/editor-help/help-section-title.native.js +29 -0
- package/src/components/editor-help/help-topic-row.native.js +2 -2
- package/src/components/editor-help/icon-move-blocks.native.js +10 -0
- package/src/components/editor-help/images/drag-and-drop-dark.png +0 -0
- package/src/components/editor-help/images/drag-and-drop-dark@2x.png +0 -0
- package/src/components/editor-help/images/drag-and-drop-dark@3x.png +0 -0
- package/src/components/editor-help/images/drag-and-drop-light.png +0 -0
- package/src/components/editor-help/images/drag-and-drop-light@2x.png +0 -0
- package/src/components/editor-help/images/drag-and-drop-light@3x.png +0 -0
- package/src/components/editor-help/index.native.js +20 -22
- package/src/components/editor-help/move-blocks.native.js +22 -2
- package/src/components/editor-help/style.scss +36 -4
- package/src/components/editor-help/test/index.native.js +1 -1
- package/src/components/editor-help/view-sections.native.js +23 -8
- package/src/components/post-featured-image/index.js +102 -69
- package/src/components/post-saved-state/style.scss +9 -0
- package/src/components/post-schedule/index.js +6 -13
- package/src/components/post-slug/test/index.js +4 -4
- package/src/components/post-taxonomies/flat-term-selector.js +5 -2
- package/src/components/post-taxonomies/index.js +3 -1
- package/src/components/post-text-editor/index.js +13 -1
- package/src/components/post-visibility/index.js +130 -150
- package/src/components/post-visibility/label.js +6 -15
- package/src/components/post-visibility/style.scss +25 -20
- package/src/components/post-visibility/utils.js +7 -12
- package/src/components/provider/index.native.js +2 -1
- package/src/components/provider/use-block-editor-settings.js +28 -12
- package/src/components/table-of-contents/style.scss +1 -3
- package/src/store/selectors.js +4 -2
- package/src/store/test/selectors.js +5 -5
package/build-style/style.css
CHANGED
|
@@ -638,6 +638,14 @@
|
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
640
|
|
|
641
|
+
.editor-post-save-draft.has-text.has-icon svg {
|
|
642
|
+
margin-right: 0;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
:root[dir=rtl] .editor-post-saved-state.has-text.has-icon {
|
|
646
|
+
justify-content: right;
|
|
647
|
+
}
|
|
648
|
+
|
|
641
649
|
.editor-post-taxonomies__hierarchical-terms-list {
|
|
642
650
|
max-height: 14em;
|
|
643
651
|
overflow: auto;
|
|
@@ -740,20 +748,23 @@
|
|
|
740
748
|
color: rgba(30, 30, 30, 0.62);
|
|
741
749
|
}
|
|
742
750
|
|
|
743
|
-
.
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
751
|
+
.editor-post-visibility__close {
|
|
752
|
+
position: absolute;
|
|
753
|
+
right: 16px;
|
|
754
|
+
top: 16px;
|
|
747
755
|
}
|
|
748
|
-
|
|
749
|
-
.editor-post-
|
|
756
|
+
|
|
757
|
+
.editor-post-visibility__fieldset {
|
|
758
|
+
padding: 8px;
|
|
759
|
+
}
|
|
760
|
+
.editor-post-visibility__fieldset .editor-post-visibility__legend {
|
|
750
761
|
font-weight: 600;
|
|
751
|
-
|
|
762
|
+
padding: 1em 0 0 0;
|
|
763
|
+
}
|
|
764
|
+
.editor-post-visibility__fieldset .editor-post-visibility__description {
|
|
752
765
|
margin-top: 0.5em;
|
|
753
|
-
padding: 0;
|
|
754
766
|
}
|
|
755
|
-
.
|
|
756
|
-
.editor-post-visibility__dialog-fieldset .editor-post-visibility__dialog-radio[type=radio] {
|
|
767
|
+
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio] {
|
|
757
768
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
758
769
|
padding: 6px 8px;
|
|
759
770
|
box-shadow: 0 0 0 transparent;
|
|
@@ -773,48 +784,40 @@
|
|
|
773
784
|
margin-top: 2px;
|
|
774
785
|
}
|
|
775
786
|
@media (prefers-reduced-motion: reduce) {
|
|
776
|
-
.
|
|
777
|
-
.editor-post-visibility__dialog-fieldset .editor-post-visibility__dialog-radio[type=radio] {
|
|
787
|
+
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio] {
|
|
778
788
|
transition-duration: 0s;
|
|
779
789
|
transition-delay: 0s;
|
|
780
790
|
}
|
|
781
791
|
}
|
|
782
792
|
@media (min-width: 600px) {
|
|
783
|
-
.
|
|
784
|
-
.editor-post-visibility__dialog-fieldset .editor-post-visibility__dialog-radio[type=radio] {
|
|
793
|
+
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio] {
|
|
785
794
|
font-size: 13px;
|
|
786
795
|
/* Override core line-height. To be reviewed. */
|
|
787
796
|
line-height: normal;
|
|
788
797
|
}
|
|
789
798
|
}
|
|
790
|
-
.
|
|
791
|
-
.editor-post-visibility__dialog-fieldset .editor-post-visibility__dialog-radio[type=radio]:focus {
|
|
799
|
+
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio]:focus {
|
|
792
800
|
border-color: var(--wp-admin-theme-color);
|
|
793
801
|
box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
|
|
794
802
|
outline: 2px solid transparent;
|
|
795
803
|
}
|
|
796
|
-
.
|
|
797
|
-
.editor-post-visibility__dialog-fieldset .editor-post-visibility__dialog-radio[type=radio]::-webkit-input-placeholder {
|
|
804
|
+
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio]::-webkit-input-placeholder {
|
|
798
805
|
color: rgba(30, 30, 30, 0.62);
|
|
799
806
|
}
|
|
800
|
-
.
|
|
801
|
-
.editor-post-visibility__dialog-fieldset .editor-post-visibility__dialog-radio[type=radio]::-moz-placeholder {
|
|
807
|
+
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio]::-moz-placeholder {
|
|
802
808
|
opacity: 1;
|
|
803
809
|
color: rgba(30, 30, 30, 0.62);
|
|
804
810
|
}
|
|
805
|
-
.
|
|
806
|
-
.editor-post-visibility__dialog-fieldset .editor-post-visibility__dialog-radio[type=radio]:-ms-input-placeholder {
|
|
811
|
+
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio]:-ms-input-placeholder {
|
|
807
812
|
color: rgba(30, 30, 30, 0.62);
|
|
808
813
|
}
|
|
809
814
|
@media (min-width: 600px) {
|
|
810
|
-
.
|
|
811
|
-
.editor-post-visibility__dialog-fieldset .editor-post-visibility__dialog-radio[type=radio] {
|
|
815
|
+
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio] {
|
|
812
816
|
height: 20px;
|
|
813
817
|
width: 20px;
|
|
814
818
|
}
|
|
815
819
|
}
|
|
816
|
-
.
|
|
817
|
-
.editor-post-visibility__dialog-fieldset .editor-post-visibility__dialog-radio[type=radio]:checked::before {
|
|
820
|
+
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio]:checked::before {
|
|
818
821
|
box-sizing: inherit;
|
|
819
822
|
width: 8px;
|
|
820
823
|
height: 8px;
|
|
@@ -824,36 +827,32 @@
|
|
|
824
827
|
border: 4px solid #fff;
|
|
825
828
|
}
|
|
826
829
|
@media (min-width: 600px) {
|
|
827
|
-
.
|
|
828
|
-
.editor-post-visibility__dialog-fieldset .editor-post-visibility__dialog-radio[type=radio]:checked::before {
|
|
830
|
+
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio]:checked::before {
|
|
829
831
|
transform: translate(5px, 5px);
|
|
830
832
|
}
|
|
831
833
|
}
|
|
832
|
-
.
|
|
833
|
-
.editor-post-visibility__dialog-fieldset .editor-post-visibility__dialog-radio[type=radio]:focus {
|
|
834
|
+
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio]:focus {
|
|
834
835
|
box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color);
|
|
835
836
|
outline: 2px solid transparent;
|
|
836
837
|
}
|
|
837
|
-
.
|
|
838
|
-
.editor-post-visibility__dialog-fieldset .editor-post-visibility__dialog-radio[type=radio]:checked {
|
|
838
|
+
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio]:checked {
|
|
839
839
|
background: var(--wp-admin-theme-color);
|
|
840
840
|
border-color: var(--wp-admin-theme-color);
|
|
841
841
|
}
|
|
842
|
-
.
|
|
843
|
-
|
|
844
|
-
|
|
842
|
+
.editor-post-visibility__fieldset .editor-post-visibility__info {
|
|
843
|
+
color: #757575;
|
|
844
|
+
margin-left: 36px;
|
|
845
|
+
margin-top: 0.5em;
|
|
845
846
|
}
|
|
846
|
-
|
|
847
|
-
.editor-post-
|
|
848
|
-
|
|
849
|
-
|
|
847
|
+
@media (min-width: 600px) {
|
|
848
|
+
.editor-post-visibility__fieldset .editor-post-visibility__info {
|
|
849
|
+
margin-left: 32px;
|
|
850
|
+
}
|
|
850
851
|
}
|
|
851
|
-
.
|
|
852
|
-
.editor-post-visibility__dialog-fieldset .editor-post-visibility__choice:last-child .editor-post-visibility__dialog-info {
|
|
852
|
+
.editor-post-visibility__fieldset .editor-post-visibility__choice:last-child .editor-post-visibility__info {
|
|
853
853
|
margin-bottom: 0;
|
|
854
854
|
}
|
|
855
|
-
|
|
856
|
-
.editor-post-visibility__dialog-password .editor-post-visibility__dialog-password-input[type=text] {
|
|
855
|
+
.editor-post-visibility__fieldset .editor-post-visibility__password .editor-post-visibility__password-input[type=text] {
|
|
857
856
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
858
857
|
padding: 6px 8px;
|
|
859
858
|
box-shadow: 0 0 0 transparent;
|
|
@@ -864,35 +863,35 @@
|
|
|
864
863
|
font-size: 16px;
|
|
865
864
|
/* Override core line-height. To be reviewed. */
|
|
866
865
|
line-height: normal;
|
|
867
|
-
margin-left:
|
|
868
|
-
|
|
866
|
+
margin-left: 32px;
|
|
867
|
+
width: calc(100% - 32px);
|
|
869
868
|
}
|
|
870
869
|
@media (prefers-reduced-motion: reduce) {
|
|
871
|
-
.editor-post-
|
|
870
|
+
.editor-post-visibility__fieldset .editor-post-visibility__password .editor-post-visibility__password-input[type=text] {
|
|
872
871
|
transition-duration: 0s;
|
|
873
872
|
transition-delay: 0s;
|
|
874
873
|
}
|
|
875
874
|
}
|
|
876
875
|
@media (min-width: 600px) {
|
|
877
|
-
.editor-post-
|
|
876
|
+
.editor-post-visibility__fieldset .editor-post-visibility__password .editor-post-visibility__password-input[type=text] {
|
|
878
877
|
font-size: 13px;
|
|
879
878
|
/* Override core line-height. To be reviewed. */
|
|
880
879
|
line-height: normal;
|
|
881
880
|
}
|
|
882
881
|
}
|
|
883
|
-
.editor-post-
|
|
882
|
+
.editor-post-visibility__fieldset .editor-post-visibility__password .editor-post-visibility__password-input[type=text]:focus {
|
|
884
883
|
border-color: var(--wp-admin-theme-color);
|
|
885
884
|
box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
|
|
886
885
|
outline: 2px solid transparent;
|
|
887
886
|
}
|
|
888
|
-
.editor-post-
|
|
887
|
+
.editor-post-visibility__fieldset .editor-post-visibility__password .editor-post-visibility__password-input[type=text]::-webkit-input-placeholder {
|
|
889
888
|
color: rgba(30, 30, 30, 0.62);
|
|
890
889
|
}
|
|
891
|
-
.editor-post-
|
|
890
|
+
.editor-post-visibility__fieldset .editor-post-visibility__password .editor-post-visibility__password-input[type=text]::-moz-placeholder {
|
|
892
891
|
opacity: 1;
|
|
893
892
|
color: rgba(30, 30, 30, 0.62);
|
|
894
893
|
}
|
|
895
|
-
.editor-post-
|
|
894
|
+
.editor-post-visibility__fieldset .editor-post-visibility__password .editor-post-visibility__password-input[type=text]:-ms-input-placeholder {
|
|
896
895
|
color: rgba(30, 30, 30, 0.62);
|
|
897
896
|
}
|
|
898
897
|
|
|
@@ -925,7 +924,7 @@
|
|
|
925
924
|
z-index: 99998;
|
|
926
925
|
}
|
|
927
926
|
|
|
928
|
-
.table-of-contents__popover .components-popover__content
|
|
927
|
+
.table-of-contents__popover .components-popover__content {
|
|
929
928
|
padding: 16px;
|
|
930
929
|
}
|
|
931
930
|
@media (min-width: 600px) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/editor",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.9.0",
|
|
4
4
|
"description": "Enhanced block editor for WordPress posts.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -31,36 +31,37 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.16.0",
|
|
34
|
-
"@wordpress/a11y": "^3.
|
|
35
|
-
"@wordpress/api-fetch": "^6.
|
|
36
|
-
"@wordpress/
|
|
37
|
-
"@wordpress/
|
|
38
|
-
"@wordpress/
|
|
39
|
-
"@wordpress/
|
|
40
|
-
"@wordpress/
|
|
41
|
-
"@wordpress/data": "^
|
|
42
|
-
"@wordpress/
|
|
43
|
-
"@wordpress/
|
|
44
|
-
"@wordpress/
|
|
45
|
-
"@wordpress/
|
|
46
|
-
"@wordpress/
|
|
47
|
-
"@wordpress/
|
|
48
|
-
"@wordpress/
|
|
49
|
-
"@wordpress/
|
|
50
|
-
"@wordpress/
|
|
51
|
-
"@wordpress/
|
|
52
|
-
"@wordpress/
|
|
53
|
-
"@wordpress/
|
|
54
|
-
"@wordpress/
|
|
55
|
-
"@wordpress/
|
|
56
|
-
"@wordpress/
|
|
57
|
-
"@wordpress/
|
|
58
|
-
"@wordpress/
|
|
34
|
+
"@wordpress/a11y": "^3.10.0",
|
|
35
|
+
"@wordpress/api-fetch": "^6.7.0",
|
|
36
|
+
"@wordpress/blob": "^3.10.0",
|
|
37
|
+
"@wordpress/block-editor": "^9.2.0",
|
|
38
|
+
"@wordpress/blocks": "^11.9.0",
|
|
39
|
+
"@wordpress/components": "^19.12.0",
|
|
40
|
+
"@wordpress/compose": "^5.8.0",
|
|
41
|
+
"@wordpress/core-data": "^4.8.0",
|
|
42
|
+
"@wordpress/data": "^6.10.0",
|
|
43
|
+
"@wordpress/date": "^4.10.0",
|
|
44
|
+
"@wordpress/deprecated": "^3.10.0",
|
|
45
|
+
"@wordpress/element": "^4.8.0",
|
|
46
|
+
"@wordpress/hooks": "^3.10.0",
|
|
47
|
+
"@wordpress/html-entities": "^3.10.0",
|
|
48
|
+
"@wordpress/i18n": "^4.10.0",
|
|
49
|
+
"@wordpress/icons": "^9.1.0",
|
|
50
|
+
"@wordpress/keyboard-shortcuts": "^3.8.0",
|
|
51
|
+
"@wordpress/keycodes": "^3.10.0",
|
|
52
|
+
"@wordpress/media-utils": "^4.1.0",
|
|
53
|
+
"@wordpress/notices": "^3.10.0",
|
|
54
|
+
"@wordpress/preferences": "^2.2.0",
|
|
55
|
+
"@wordpress/reusable-blocks": "^3.8.0",
|
|
56
|
+
"@wordpress/rich-text": "^5.8.0",
|
|
57
|
+
"@wordpress/server-side-render": "^3.8.0",
|
|
58
|
+
"@wordpress/url": "^3.11.0",
|
|
59
|
+
"@wordpress/wordcount": "^3.10.0",
|
|
59
60
|
"classnames": "^2.3.1",
|
|
60
61
|
"lodash": "^4.17.21",
|
|
61
62
|
"memize": "^1.1.0",
|
|
62
63
|
"react-autosize-textarea": "^7.1.0",
|
|
63
|
-
"rememo": "^
|
|
64
|
+
"rememo": "^4.0.0"
|
|
64
65
|
},
|
|
65
66
|
"peerDependencies": {
|
|
66
67
|
"react": "^17.0.0",
|
|
@@ -69,5 +70,5 @@
|
|
|
69
70
|
"publishConfig": {
|
|
70
71
|
"access": "public"
|
|
71
72
|
},
|
|
72
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "a3e0b62091e8a8bdf5e2518e42d60d7098af48cc"
|
|
73
74
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { Text, View } from 'react-native';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* WordPress dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { usePreferredColorSchemeStyle } from '@wordpress/compose';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Internal dependencies
|
|
13
|
+
*/
|
|
14
|
+
import styles from './style.scss';
|
|
15
|
+
|
|
16
|
+
const HelpSectionTitle = ( { children } ) => {
|
|
17
|
+
const helpSectionTitle = usePreferredColorSchemeStyle(
|
|
18
|
+
styles.helpSectionTitle,
|
|
19
|
+
styles.helpSectionTitleDark
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<View style={ styles.helpSectionTitleContainer }>
|
|
24
|
+
<Text style={ helpSectionTitle }>{ children }</Text>
|
|
25
|
+
</View>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default HelpSectionTitle;
|
|
@@ -9,7 +9,7 @@ import { useNavigation } from '@react-navigation/native';
|
|
|
9
9
|
import { TextControl, Icon } from '@wordpress/components';
|
|
10
10
|
import { chevronRight } from '@wordpress/icons';
|
|
11
11
|
|
|
12
|
-
const HelpTopicRow = ( { label, icon, screenName } ) => {
|
|
12
|
+
const HelpTopicRow = ( { label, icon, screenName, isLastItem } ) => {
|
|
13
13
|
const navigation = useNavigation();
|
|
14
14
|
|
|
15
15
|
const openSubSheet = () => {
|
|
@@ -18,7 +18,7 @@ const HelpTopicRow = ( { label, icon, screenName } ) => {
|
|
|
18
18
|
|
|
19
19
|
return (
|
|
20
20
|
<TextControl
|
|
21
|
-
separatorType=
|
|
21
|
+
separatorType={ isLastItem ? 'none' : 'leftMargin' }
|
|
22
22
|
customActionButton
|
|
23
23
|
leftAlign
|
|
24
24
|
onPress={ openSubSheet }
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { SVG, Path } from '@wordpress/primitives';
|
|
5
|
+
|
|
6
|
+
export default (
|
|
7
|
+
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
8
|
+
<Path d="M9.53 17.47 9 16.94 7.94 18l.53.53 2 2 .53.53.53-.53 2-2 .53-.53L13 16.94l-.53.53-.72.72v-4.94h-1.5v4.94l-.72-.72Zm-1.06-14L7.94 4 9 5.06l.53-.53.72-.72v4.94h1.5V3.81l.72.72.53.53L14.06 4l-.53-.53-2-2L11 .94l-.53.53-2 2ZM4.53 9.53 5.06 9 4 7.94l-.53.53-2 2-.53.53.53.53 2 2 .53.53L5.06 13l-.53-.53-.72-.72h4.94v-1.5H3.81l.72-.72Zm14-1.06L18 7.94 16.94 9l.53.53.72.72h-4.94v1.5h4.94l-.72.72-.53.53L18 14.06l.53-.53 2-2 .53-.53-.53-.53-2-2Z" />
|
|
9
|
+
</SVG>
|
|
10
|
+
);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { kebabCase } from 'lodash';
|
|
5
|
-
import {
|
|
5
|
+
import { SafeAreaView, ScrollView, StyleSheet, View } from 'react-native';
|
|
6
6
|
import { TransitionPresets } from '@react-navigation/stack';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -14,16 +14,9 @@ import {
|
|
|
14
14
|
PanelBody,
|
|
15
15
|
} from '@wordpress/components';
|
|
16
16
|
import { __ } from '@wordpress/i18n';
|
|
17
|
-
import {
|
|
18
|
-
helpFilled,
|
|
19
|
-
plusCircleFilled,
|
|
20
|
-
alignJustify,
|
|
21
|
-
trash,
|
|
22
|
-
cog,
|
|
23
|
-
} from '@wordpress/icons';
|
|
17
|
+
import { helpFilled, plusCircleFilled, trash, cog } from '@wordpress/icons';
|
|
24
18
|
import { useSelect } from '@wordpress/data';
|
|
25
19
|
import { store as editorStore } from '@wordpress/editor';
|
|
26
|
-
import { usePreferredColorSchemeStyle } from '@wordpress/compose';
|
|
27
20
|
import {
|
|
28
21
|
requestContactCustomerSupport,
|
|
29
22
|
requestGotoCustomerSupportOptions,
|
|
@@ -41,6 +34,8 @@ import AddBlocks from './add-blocks';
|
|
|
41
34
|
import MoveBlocks from './move-blocks';
|
|
42
35
|
import RemoveBlocks from './remove-blocks';
|
|
43
36
|
import CustomizeBlocks from './customize-blocks';
|
|
37
|
+
import moveBlocksIcon from './icon-move-blocks';
|
|
38
|
+
import HelpSectionTitle from './help-section-title';
|
|
44
39
|
|
|
45
40
|
const HELP_TOPICS = [
|
|
46
41
|
{
|
|
@@ -53,7 +48,7 @@ const HELP_TOPICS = [
|
|
|
53
48
|
icon: plusCircleFilled,
|
|
54
49
|
view: <AddBlocks />,
|
|
55
50
|
},
|
|
56
|
-
{ label: __( 'Move blocks' ), icon:
|
|
51
|
+
{ label: __( 'Move blocks' ), icon: moveBlocksIcon, view: <MoveBlocks /> },
|
|
57
52
|
{ label: __( 'Remove blocks' ), icon: trash, view: <RemoveBlocks /> },
|
|
58
53
|
{
|
|
59
54
|
label: __( 'Customize blocks' ),
|
|
@@ -67,11 +62,6 @@ function EditorHelpTopics( { close, isVisible, onClose } ) {
|
|
|
67
62
|
postType: select( editorStore ).getEditedPostAttribute( 'type' ),
|
|
68
63
|
} ) );
|
|
69
64
|
|
|
70
|
-
const sectionTitle = usePreferredColorSchemeStyle(
|
|
71
|
-
styles.helpDetailSectionHeading,
|
|
72
|
-
styles.helpDetailSectionHeadingDark
|
|
73
|
-
);
|
|
74
|
-
|
|
75
65
|
const title =
|
|
76
66
|
postType === 'page'
|
|
77
67
|
? __( 'How to edit your page' )
|
|
@@ -130,15 +120,22 @@ function EditorHelpTopics( { close, isVisible, onClose } ) {
|
|
|
130
120
|
} }
|
|
131
121
|
>
|
|
132
122
|
<PanelBody>
|
|
133
|
-
<
|
|
123
|
+
<HelpSectionTitle>
|
|
134
124
|
{ __( 'The basics' ) }
|
|
135
|
-
</
|
|
125
|
+
</HelpSectionTitle>
|
|
136
126
|
{ /* Print out help topics. */ }
|
|
137
127
|
{ HELP_TOPICS.map(
|
|
138
|
-
(
|
|
128
|
+
(
|
|
129
|
+
{ label, icon },
|
|
130
|
+
index
|
|
131
|
+
) => {
|
|
139
132
|
const labelSlug = kebabCase(
|
|
140
133
|
label
|
|
141
134
|
);
|
|
135
|
+
const isLastItem =
|
|
136
|
+
index ===
|
|
137
|
+
HELP_TOPICS.length -
|
|
138
|
+
1;
|
|
142
139
|
return (
|
|
143
140
|
<HelpTopicRow
|
|
144
141
|
key={
|
|
@@ -149,16 +146,17 @@ function EditorHelpTopics( { close, isVisible, onClose } ) {
|
|
|
149
146
|
screenName={
|
|
150
147
|
labelSlug
|
|
151
148
|
}
|
|
149
|
+
isLastItem={
|
|
150
|
+
isLastItem
|
|
151
|
+
}
|
|
152
152
|
/>
|
|
153
153
|
);
|
|
154
154
|
}
|
|
155
155
|
) }
|
|
156
156
|
{
|
|
157
|
-
<
|
|
158
|
-
style={ sectionTitle }
|
|
159
|
-
>
|
|
157
|
+
<HelpSectionTitle>
|
|
160
158
|
{ __( 'Get support' ) }
|
|
161
|
-
</
|
|
159
|
+
</HelpSectionTitle>
|
|
162
160
|
}
|
|
163
161
|
{
|
|
164
162
|
<HelpGetSupportButton
|
|
@@ -12,19 +12,39 @@ import { __ } from '@wordpress/i18n';
|
|
|
12
12
|
* Internal dependencies
|
|
13
13
|
*/
|
|
14
14
|
import styles from './style.scss';
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
HelpDetailBodyText,
|
|
17
|
+
HelpDetailImage,
|
|
18
|
+
HelpDetailSectionHeadingText,
|
|
19
|
+
} from './view-sections';
|
|
16
20
|
|
|
17
21
|
const MoveBlocks = () => {
|
|
18
22
|
return (
|
|
19
23
|
<>
|
|
24
|
+
<HelpDetailImage
|
|
25
|
+
source={ require( './images/drag-and-drop-light.png' ) }
|
|
26
|
+
sourceDarkMode={ require( './images/drag-and-drop-dark.png' ) }
|
|
27
|
+
/>
|
|
28
|
+
<View style={ styles.helpDetailContainer }>
|
|
29
|
+
<HelpDetailSectionHeadingText
|
|
30
|
+
text={ __( 'Drag & drop' ) }
|
|
31
|
+
badge={ __( 'NEW' ) }
|
|
32
|
+
/>
|
|
33
|
+
<HelpDetailBodyText
|
|
34
|
+
text={ __(
|
|
35
|
+
'Drag & drop makes rearranging blocks a breeze. Press and hold on a block, then drag it to its new location and release.'
|
|
36
|
+
) }
|
|
37
|
+
/>
|
|
38
|
+
</View>
|
|
20
39
|
<HelpDetailImage
|
|
21
40
|
source={ require( './images/move-light.png' ) }
|
|
22
41
|
sourceDarkMode={ require( './images/move-dark.png' ) }
|
|
23
42
|
/>
|
|
24
43
|
<View style={ styles.helpDetailContainer }>
|
|
44
|
+
<HelpDetailSectionHeadingText text={ __( 'Arrow buttons' ) } />
|
|
25
45
|
<HelpDetailBodyText
|
|
26
46
|
text={ __(
|
|
27
|
-
'You can rearrange blocks by tapping a block and then tapping the up and down arrows that appear on the bottom left side of the block to move it
|
|
47
|
+
'You can also rearrange blocks by tapping a block and then tapping the up and down arrows that appear on the bottom left side of the block to move it up or down.'
|
|
28
48
|
) }
|
|
29
49
|
/>
|
|
30
50
|
</View>
|
|
@@ -31,6 +31,21 @@
|
|
|
31
31
|
padding: 0;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
.helpSectionTitleContainer {
|
|
35
|
+
margin-top: 24px;
|
|
36
|
+
margin-bottom: 16px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.helpSectionTitle {
|
|
40
|
+
color: $light-primary;
|
|
41
|
+
font-weight: 600;
|
|
42
|
+
font-size: 16px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.helpSectionTitleDark {
|
|
46
|
+
color: $dark-secondary;
|
|
47
|
+
}
|
|
48
|
+
|
|
34
49
|
.helpDetailContainer {
|
|
35
50
|
padding: 0 16px;
|
|
36
51
|
}
|
|
@@ -62,14 +77,18 @@
|
|
|
62
77
|
}
|
|
63
78
|
|
|
64
79
|
.helpDetailSectionHeading {
|
|
80
|
+
flex-direction: row;
|
|
81
|
+
align-items: center;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.helpDetailSectionHeadingText {
|
|
65
85
|
color: $light-primary;
|
|
66
|
-
font-weight:
|
|
86
|
+
font-weight: 700;
|
|
67
87
|
font-size: 16px;
|
|
68
|
-
margin-top: 24px;
|
|
69
88
|
}
|
|
70
89
|
|
|
71
|
-
.
|
|
72
|
-
color: $dark-
|
|
90
|
+
.helpDetailSectionHeadingTextDark {
|
|
91
|
+
color: $dark-primary;
|
|
73
92
|
}
|
|
74
93
|
|
|
75
94
|
.helpDetailBody {
|
|
@@ -81,3 +100,16 @@
|
|
|
81
100
|
.helpDetailBodyDark {
|
|
82
101
|
color: $dark-secondary;
|
|
83
102
|
}
|
|
103
|
+
|
|
104
|
+
.helpDetailBadgeContainer {
|
|
105
|
+
padding: 2px 6px;
|
|
106
|
+
margin-right: 8px;
|
|
107
|
+
border-radius: 6px;
|
|
108
|
+
background-color: #c9356e;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.helpDetailBadgeText {
|
|
112
|
+
color: $white;
|
|
113
|
+
font-weight: 500;
|
|
114
|
+
font-size: 12px;
|
|
115
|
+
}
|
|
@@ -35,7 +35,7 @@ it( 'navigates back from help topic detail screen', async () => {
|
|
|
35
35
|
const backButton = screen.getAllByA11yLabel( 'Go back' );
|
|
36
36
|
fireEvent.press( backButton[ backButton.length - 1 ] );
|
|
37
37
|
|
|
38
|
-
// Currently logs `act` warning due to https://
|
|
38
|
+
// Currently logs `act` warning due to https://github.com/callstack/react-native-testing-library/issues/379
|
|
39
39
|
await waitForElementToBeRemoved( () =>
|
|
40
40
|
screen.getByText(
|
|
41
41
|
'Each block has its own settings. To find them, tap on a block. Its settings will appear on the toolbar at the bottom of the screen.'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { Text, Image } from 'react-native';
|
|
4
|
+
import { Text, Image, View } from 'react-native';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -28,15 +28,22 @@ export const HelpDetailBodyText = ( { text } ) => {
|
|
|
28
28
|
);
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
export const HelpDetailSectionHeadingText = ( { text } ) => {
|
|
32
|
-
const
|
|
33
|
-
styles.
|
|
34
|
-
styles.
|
|
31
|
+
export const HelpDetailSectionHeadingText = ( { text, badge } ) => {
|
|
32
|
+
const headingTextStyle = usePreferredColorSchemeStyle(
|
|
33
|
+
styles.helpDetailSectionHeadingText,
|
|
34
|
+
styles.helpDetailSectionHeadingTextDark
|
|
35
35
|
);
|
|
36
36
|
return (
|
|
37
|
-
<
|
|
38
|
-
{ text }
|
|
39
|
-
|
|
37
|
+
<View style={ styles.helpDetailSectionHeading }>
|
|
38
|
+
{ badge && <HelpDetailBadge text={ badge } /> }
|
|
39
|
+
<Text
|
|
40
|
+
accessibilityRole="header"
|
|
41
|
+
selectable
|
|
42
|
+
style={ headingTextStyle }
|
|
43
|
+
>
|
|
44
|
+
{ text }
|
|
45
|
+
</Text>
|
|
46
|
+
</View>
|
|
40
47
|
);
|
|
41
48
|
};
|
|
42
49
|
|
|
@@ -62,3 +69,11 @@ export const HelpDetailImage = ( {
|
|
|
62
69
|
/>
|
|
63
70
|
);
|
|
64
71
|
};
|
|
72
|
+
|
|
73
|
+
const HelpDetailBadge = ( { text } ) => {
|
|
74
|
+
return (
|
|
75
|
+
<View style={ styles.helpDetailBadgeContainer }>
|
|
76
|
+
<Text style={ styles.helpDetailBadgeText }>{ text }</Text>
|
|
77
|
+
</View>
|
|
78
|
+
);
|
|
79
|
+
};
|