@plone/volto 16.5.0 → 16.7.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.draft CHANGED
@@ -1,15 +1,25 @@
1
- ## 16.5.0 (2022-12-16)
1
+ ## 16.7.0 (2023-01-11)
2
2
 
3
3
  ### Feature
4
4
 
5
- - Update pt_BR translation @rafahela [#4121](https://github.com/plone/volto/issues/4121)
5
+ - Show project name and version in control panel @sneridagh [#4176](https://github.com/plone/volto/issues/4176)
6
+ - Enhance Cypress content creation command @sneridagh [#4210](https://github.com/plone/volto/issues/4210)
6
7
 
7
8
  ### Bugfix
8
9
 
9
- - Update SlashMenu to include block title in shortcut search; and prevent default on keydown for Arrows and Enter @danalvrz [#4116](https://github.com/plone/volto/issues/4116)
10
- - Fix removing of toast notification of logout when user login once again. @iFlameing [#4125](https://github.com/plone/volto/issues/4125)
10
+ - Improve matching in keyboard slash menu. [davisagli] [#4187](https://github.com/plone/volto/issues/4187)
11
+ - (fix): sidebar is not displaying correctly when clicking on a lead image field. @dobri1408 [#4191](https://github.com/plone/volto/issues/4191)
12
+ - Cleanup `package.json` scripts section @sneridagh [#4193](https://github.com/plone/volto/issues/4193)
13
+ - Fixed condition to select without vocabulary @SaraBianchi [#4200](https://github.com/plone/volto/issues/4200)
14
+ - fix iframe covering the page due to a react-error-overlay bug @reebalazs [#4242](https://github.com/plone/volto/issues/4242)
11
15
 
12
- ### Internal
16
+ ### Documentation
13
17
 
14
- - Upgrade testbed and convenience api folder to Plone 6 final @sneridagh [#4105](https://github.com/plone/volto/issues/4105)
18
+ - Add description for different types of blocks. @MAX-786 [#3827](https://github.com/plone/volto/issues/3827)
19
+ - Update makefile to use Vale for spell, grammar, and style checking. Fix linkcheckbroken to return the correct exit code for broken links. Fix broken links. [stevepiercy] [#4181](https://github.com/plone/volto/issues/4181)
20
+ - Add todo regarding management of Plone's backend. Update versions. [stevepiercy] [#4198](https://github.com/plone/volto/issues/4198)
21
+ - Pin Sphinx<5,>=3 due to sphinx-book-theme 0.3.3 requirement. [stevepiercy] [#4199](https://github.com/plone/volto/issues/4199)
22
+ - Add message about the status of Volto and Plone 6 Installation docs, directing the reader to the main Plone 6 docs. [stevepiercy] [#4209](https://github.com/plone/volto/issues/4209)
23
+ - Clean up Glossary and integrate with main docs. See https://github.com/plone/documentation/issues/1415. [stevepiercy] [#4211](https://github.com/plone/volto/issues/4211)
24
+ - Add some instructions for dealing with untranspiled add-ons and a lazy loading example for functional components. [cguardia] [#4233](https://github.com/plone/volto/issues/4233)
15
25
 
Binary file
package/CHANGELOG.md CHANGED
@@ -8,6 +8,51 @@
8
8
 
9
9
  <!-- towncrier release notes start -->
10
10
 
11
+ ## 16.7.0 (2023-01-11)
12
+
13
+ ### Feature
14
+
15
+ - Show project name and version in control panel @sneridagh [#4176](https://github.com/plone/volto/issues/4176)
16
+ - Enhance Cypress content creation command @sneridagh [#4210](https://github.com/plone/volto/issues/4210)
17
+
18
+ ### Bugfix
19
+
20
+ - Improve matching in keyboard slash menu. [davisagli] [#4187](https://github.com/plone/volto/issues/4187)
21
+ - (fix): sidebar is not displaying correctly when clicking on a lead image field. @dobri1408 [#4191](https://github.com/plone/volto/issues/4191)
22
+ - Cleanup `package.json` scripts section @sneridagh [#4193](https://github.com/plone/volto/issues/4193)
23
+ - Fixed condition to select without vocabulary @SaraBianchi [#4200](https://github.com/plone/volto/issues/4200)
24
+ - fix iframe covering the page due to a react-error-overlay bug @reebalazs [#4242](https://github.com/plone/volto/issues/4242)
25
+
26
+ ### Documentation
27
+
28
+ - Add description for different types of blocks. @MAX-786 [#3827](https://github.com/plone/volto/issues/3827)
29
+ - Update makefile to use Vale for spell, grammar, and style checking. Fix linkcheckbroken to return the correct exit code for broken links. Fix broken links. [stevepiercy] [#4181](https://github.com/plone/volto/issues/4181)
30
+ - Add todo regarding management of Plone's backend. Update versions. [stevepiercy] [#4198](https://github.com/plone/volto/issues/4198)
31
+ - Pin Sphinx<5,>=3 due to sphinx-book-theme 0.3.3 requirement. [stevepiercy] [#4199](https://github.com/plone/volto/issues/4199)
32
+ - Add message about the status of Volto and Plone 6 Installation docs, directing the reader to the main Plone 6 docs. [stevepiercy] [#4209](https://github.com/plone/volto/issues/4209)
33
+ - Clean up Glossary and integrate with main docs. See https://github.com/plone/documentation/issues/1415. [stevepiercy] [#4211](https://github.com/plone/volto/issues/4211)
34
+ - Add some instructions for dealing with untranspiled add-ons and a lazy loading example for functional components. [cguardia] [#4233](https://github.com/plone/volto/issues/4233)
35
+
36
+
37
+ ## 16.6.0 (2022-12-23)
38
+
39
+ ### Feature
40
+
41
+ - Allow passing the `step` prop to NumberWidget @tiberiuichim [#4152](https://github.com/plone/volto/issues/4152)
42
+
43
+ ### Bugfix
44
+
45
+ - Fix categorization list is not readable when there are longer values or filtering @iFlameing [#4113](https://github.com/plone/volto/issues/4113)
46
+ - Add scroll into view settings @robgietema [#4140](https://github.com/plone/volto/issues/4140)
47
+ - Remove searching capabilities of SortOn component of Search Block @iFlameing [#4162](https://github.com/plone/volto/issues/4162)
48
+ - Fixed externalRoutes short version @pnicolli [#4182](https://github.com/plone/volto/issues/4182)
49
+
50
+ ### Documentation
51
+
52
+ - Fix URLs to Plone 6 docs. @stevepiercy [#4143](https://github.com/plone/volto/issues/4143)
53
+ - Fix Sphinx warning Document headings start at H2, not H1 [myst.header]. @stevepiercy [#4145](https://github.com/plone/volto/issues/4145)
54
+
55
+
11
56
  ## 16.5.0 (2022-12-16)
12
57
 
13
58
  ### Feature
@@ -65,7 +110,7 @@
65
110
 
66
111
  ### Feature
67
112
 
68
- - Add towncrier support. Create RELEASING.md and move and update Releasing section from README.md into it. @sneridagh @stevepiercy [#3985](https://github.com/plone/volto/issues/3985)
113
+ - Add towncrier support. Create `RELEASING.md` and move and update Releasing section from `README.md` into it. @sneridagh @stevepiercy [#3985](https://github.com/plone/volto/issues/3985)
69
114
  - Translation of roles in user and group control panel. Fix https://github.com/plone/volto/issues/4002 @wesleybl [#4002](https://github.com/plone/volto/issues/4002)
70
115
  - Use the component registry for `Container` component in DefaultView @sneridagh [#4032](https://github.com/plone/volto/issues/4032)
71
116
  - Update missing german translations @steffenri
@@ -141,7 +186,7 @@
141
186
  - Staticize Poppins font to be compliant with EU privacy. Import from GoogleFont is disabled in site.variables. @giuliaghisini
142
187
  - Remove the `callout` button (the one with the megaphone icon) from the slate toolbar since it has the same styling as `blockquote`. If you need it anyway, you can bring it back in your addon. @sneridagh
143
188
  - Using volto-slate Headline / Subheadline buttons strips all elements in the selection @tiberiuichim
144
- - Use `Cypress` 10.3.0 (migrate from 9.x.x). Cypress 10 has some interesting goodies, being the native support of Apple Silicon Computers the main of it. See https://docs.voltocms.com/upgrade-guide/ for more information. @sneridagh
189
+ - Use `Cypress` 10.3.0 (migrate from 9.x.x). Cypress 10 has some interesting goodies, being the native support of Apple Silicon Computers the main of it. See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information. @sneridagh
145
190
  - The complete configuration registry is passed to the add-ons and the project configuration pipeline @sneridagh
146
191
  - Refactor the component registry API in the configuration registry @sneridagh @tiberiuichim
147
192
  - change password-reset url to be consistent with Plone configuration @erral
@@ -441,8 +486,8 @@ See https://6.dev-docs.plone.org/volto/upgrade-guide/index.html for more informa
441
486
  - Improve English grammar and syntax in backend docs. @stevepiercy
442
487
  - Fix JSX syntax highlighting. Remove duplicate heading. @stevepiercy
443
488
  - fix make task `docs-linkcheckbroken` if grep has exit code 1 (no lines found)
444
- - Updated simple.md @MdSahil-oss
445
- - Fix indentation in nginx configuration in simple.md @stevepiercy
489
+ - Updated `simple.md` @MdSahil-oss
490
+ - Fix indentation in nginx configuration in `simple.md` @stevepiercy
446
491
  - Remove sphinx_sitemap configuration because Volto's docs are now imported into the main docs, making this setting unnecessary. @stevepiercy
447
492
  - Set the ogp_site_url to main docs, instead of training. @stevepiercy
448
493
  - `aria-*` attributes are now parsed correctly by jsx-lexer 2.0. @stevepiercy
@@ -1079,7 +1124,7 @@ See https://6.dev-docs.plone.org/volto/upgrade-guide/index.html for more informa
1079
1124
  ### Breaking
1080
1125
 
1081
1126
  - The complete configuration registry is passed to the add-ons and the project configuration pipeline
1082
- See https://docs.voltocms.com/upgrade-guide/ for more information. @sneridagh
1127
+ See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information. @sneridagh
1083
1128
  - Refactor the component registry API in the configuration registry @sneridagh @tiberiuichim
1084
1129
 
1085
1130
  ### Bugfix
@@ -1104,7 +1149,7 @@ See https://6.dev-docs.plone.org/volto/upgrade-guide/index.html for more informa
1104
1149
 
1105
1150
  ### Breaking
1106
1151
 
1107
- - Use `Cypress` 10.3.0 (migrate from 9.x.x). Cypress 10 has some interesting goodies, being the native support of Apple Silicon Computers the main of it. See https://docs.voltocms.com/upgrade-guide/ for more information. @sneridagh
1152
+ - Use `Cypress` 10.3.0 (migrate from 9.x.x). Cypress 10 has some interesting goodies, being the native support of Apple Silicon Computers the main of it. See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information. @sneridagh
1108
1153
 
1109
1154
  ### Bugfix
1110
1155
 
@@ -1368,8 +1413,8 @@ Use next release instead: https://github.com/plone/volto/releases/tag/16.0.0-alp
1368
1413
 
1369
1414
  ### Documentation
1370
1415
 
1371
- - Updated simple.md @MdSahil-oss
1372
- - Fix indentation in nginx configuration in simple.md @stevepiercy
1416
+ - Updated `simple.md` @MdSahil-oss
1417
+ - Fix indentation in nginx configuration in `simple.md` @stevepiercy
1373
1418
 
1374
1419
  ## 16.0.0-alpha.3 (2022-05-16)
1375
1420
 
@@ -1623,7 +1668,7 @@ Use next release instead: https://github.com/plone/volto/releases/tag/16.0.0-alp
1623
1668
 
1624
1669
  ### Documentation
1625
1670
 
1626
- - Updated README.md @ktsrivastava29
1671
+ - Updated `README.md` @ktsrivastava29
1627
1672
  - Added language to code-blocks in md files @ktsrivastava29
1628
1673
  - Added html_meta values and labels for Intersphinx cross-references from Trainings. @stevepiercy
1629
1674
  - Replaced `docs.voltocms.com` with MyST references. @stevepiercy
@@ -1839,7 +1884,7 @@ Use next release instead: https://github.com/plone/volto/releases/tag/16.0.0-alp
1839
1884
  ### Breaking
1840
1885
 
1841
1886
  - Lazyload draftjs library. See the upgrade guide on how that impacts you, in case you have extended the rich text editor configuration @tiberiuichim @kreafox
1842
- See https://docs.voltocms.com/upgrade-guide/ for more information.
1887
+ See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information.
1843
1888
 
1844
1889
  ### Feature
1845
1890
 
@@ -1852,7 +1897,7 @@ Use next release instead: https://github.com/plone/volto/releases/tag/16.0.0-alp
1852
1897
  - Markup change in `LinkView` component.
1853
1898
  - Rename `core-sandbox` to `coresandbox` for sake of consistency @sneridagh
1854
1899
  - Extend the original intent and rename `RAZZLE_TESTING_ADDONS` to `ADDONS`. @sneridagh
1855
- See https://docs.voltocms.com/upgrade-guide/ for more information.
1900
+ See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information.
1856
1901
 
1857
1902
  ### Internal
1858
1903
 
@@ -1898,7 +1943,7 @@ Use next release instead: https://github.com/plone/volto/releases/tag/16.0.0-alp
1898
1943
  ### Breaking
1899
1944
 
1900
1945
  - Upgrade `react-cookie` to latest version. @sneridagh @robgietema
1901
- See https://docs.voltocms.com/upgrade-guide/ for more information.
1946
+ See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information.
1902
1947
 
1903
1948
  ## 14.10.0 (2022-02-08)
1904
1949
 
@@ -2027,7 +2072,7 @@ new users/evaluators. @fredvd
2027
2072
  ### Internal
2028
2073
 
2029
2074
  - Fix URL for Climate-Energy, a Volto website @tiberiuichim
2030
- - Fix quirky Cypress test in "DX control panel schema" (see https://github.com/plone/volto/runs/4803206906?check_suite_focus=true) @sneridagh
2075
+ - Fix quirky Cypress test in "DX control panel schema" (see https://github.com/plone/volto/actions/runs/1692689792/jobs/2306969715) @sneridagh
2031
2076
 
2032
2077
  ## 14.2.1 (2022-01-12)
2033
2078
 
@@ -2091,11 +2136,11 @@ new users/evaluators. @fredvd
2091
2136
 
2092
2137
  ### Breaking
2093
2138
 
2094
- - Remove compatibility for old configuration (based on imports) system. Migrate your configuration to the new configuration system for your project before upgrading to Volto 14. See https://docs.voltocms.com/upgrade-guide/#volto-configuration-registry @sneridagh
2139
+ - Remove compatibility for old configuration (based on imports) system. Migrate your configuration to the new configuration system for your project before upgrading to Volto 14. See https://6.docs.plone.org/volto/upgrade-guide/index.html#volto-configuration-registry @sneridagh
2095
2140
  - Content locking is not a breaking change, but it's worth noting that Volto 14 comes with locking support enabled by default. Latest `plone.restapi` version is required. @avoinea
2096
2141
  - Revisited, rethought and refactored Seamless mode @sneridagh
2097
2142
  For more information, please read the deploying guide
2098
- https://docs.voltocms.com/deploying/seamless-mode/
2143
+ https://6.docs.plone.org/volto/deploying/seamless-mode.html
2099
2144
  - Listing block no longer use `fullobjects` to retrieve backend data. It uses the catalog data instead. This improves the performance of the listing block. @plone/volto-team
2100
2145
  - Removed pagination in vocabularies widgets (SelectWidget, ArrayWidget, TokenWidget) and introduced subrequest to vocabulary action. @giuliaghisini
2101
2146
  - Use the block's title as the source of the translation instead of using the id of the block. See upgrade guide for more information @sneridagh
@@ -2107,14 +2152,14 @@ new users/evaluators. @fredvd
2107
2152
  - Use title instead of id as a source of translation in "Variation" field in block enhancers @sneridagh
2108
2153
  - Move `theme.js` import to top of the client code, so it take precedence over any other inline imported CSS. This is not an strict breaking change, but it's worth to mention it as might be important and kept in mind. @sneridagh
2109
2154
 
2110
- See https://docs.voltocms.com/upgrade-guide/ for more information about all the breaking changes.
2155
+ See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information about all the breaking changes.
2111
2156
 
2112
2157
  ### Feature
2113
2158
 
2114
2159
  - Support Node 16 @timo
2115
2160
  - Content locking support for Plone (`plone.locking`) @avoinea
2116
2161
  - Add the new search block @tiberiuichim @kreafox @sneridagh
2117
- - Provide Server-Side Rendering capabilities for blocks with async-based content (such as the listing block). A block needs to provide its own `getAsyncData` implementation, which is similar to an `asyncConnect` wrapper promise. @tiberiuichim @sneridagh
2162
+ - Provide server-side rendering capabilities for blocks with async-based content (such as the listing block). A block needs to provide its own `getAsyncData` implementation, which is similar to an `asyncConnect` wrapper promise. @tiberiuichim @sneridagh
2118
2163
  - Defaults are observed in block data if `InlineForm` or `BlockDataForm` are used. @sneridagh @tiberiuichim
2119
2164
  - Apply form defaults from RenderBlocks and block Edit using a new helper, `applyBlockDefaults` @tiberiuichim
2120
2165
  - Now each block config object can declare a schema factory (a function that can produce a schema) and this will be used to derive the default data for the block @tiberiuichim
@@ -2467,7 +2512,7 @@ See https://docs.voltocms.com/upgrade-guide/ for more information about all the
2467
2512
 
2468
2513
  ### Feature
2469
2514
 
2470
- - Provide Server-Side Rendering capabilities for blocks with async-based content (such as the listing block). A block needs to provide its own `getAsyncData` implementation, which is similar to an `asyncConnect` wrapper promise. @tiberiuichim @sneridagh
2515
+ - Provide server-side rendering capabilities for blocks with async-based content (such as the listing block). A block needs to provide its own `getAsyncData` implementation, which is similar to an `asyncConnect` wrapper promise. @tiberiuichim @sneridagh
2471
2516
 
2472
2517
  ## 14.0.0-alpha.25 (2021-11-01)
2473
2518
 
@@ -2542,10 +2587,10 @@ See https://docs.voltocms.com/upgrade-guide/ for more information about all the
2542
2587
 
2543
2588
  - Revisited, rethought and refactored Seamless mode @sneridagh
2544
2589
  For more information, please read the deploying guide
2545
- https://docs.voltocms.com/deploying/seamless-mode/
2590
+ https://6.docs.plone.org/volto/deploying/seamless-mode.html
2546
2591
 
2547
- and the upgrade guide
2548
- https://docs.voltocms.com/upgrade-guide/
2592
+ and the upgrade guide
2593
+ https://6.docs.plone.org/volto/upgrade-guide/index.html
2549
2594
 
2550
2595
  ### Bugfix
2551
2596
 
@@ -2589,7 +2634,7 @@ https://docs.voltocms.com/upgrade-guide/
2589
2634
  - Adjusted main `Logo` component styling @sneridagh
2590
2635
 
2591
2636
  For more information, please read the upgrade guide
2592
- https://docs.voltocms.com/upgrade-guide/
2637
+ https://6.docs.plone.org/volto/upgrade-guide/index.html
2593
2638
 
2594
2639
  ### Feature
2595
2640
 
@@ -2600,7 +2645,7 @@ https://docs.voltocms.com/upgrade-guide/
2600
2645
  - Improved developer documentation. Proof read several chapters, most importantly the upgrade guide @ichim-david
2601
2646
  - Use Plone logo (Closes #2632) @ericof
2602
2647
  - Updated Brazilian Portuguese translations @ericof
2603
- - Footer: Point to plone.org instead of plone.com @ericof
2648
+ - Footer: Point to `plone.org` instead of `plone.com` @ericof
2604
2649
  - Fix "make start-frontend" @tisto
2605
2650
  - Update all the tests infrastructure for the new `volto-guillotina` addon @sneridagh
2606
2651
 
@@ -2733,8 +2778,8 @@ https://docs.voltocms.com/upgrade-guide/
2733
2778
 
2734
2779
  ### Breaking
2735
2780
 
2736
- - Remove compatibility for old configuration (based on imports) system. Migrate your configuration to the new configuration system for your project before upgrading to Volto 14. See https://docs.voltocms.com/upgrade-guide/#volto-configuration-registry @sneridagh
2737
- - Content locking is not a breaking change, but it's worth noting that Volto 14 comes with locking support enabled by default. Latest `plone.restapi` versions is required. See https://docs.voltocms.com/upgrade-guide/ for more information
2781
+ - Remove compatibility for old configuration (based on imports) system. Migrate your configuration to the new configuration system for your project before upgrading to Volto 14. See https://6.docs.plone.org/volto/upgrade-guide/index.html#volto-configuration-registry @sneridagh
2782
+ - Content locking is not a breaking change, but it's worth noting that Volto 14 comes with locking support enabled by default. Latest `plone.restapi` versions is required. See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information
2738
2783
 
2739
2784
  ### Feature
2740
2785
 
@@ -2784,7 +2829,7 @@ https://docs.voltocms.com/upgrade-guide/
2784
2829
 
2785
2830
  - Disabled all the other configuration options when user did not choose any criteria in listing block @iFlameing
2786
2831
  - Updated Brazilian Portuguese translations @ericof
2787
- - Footer: Point to plone.org instead of plone.com @ericof
2832
+ - Footer: Point to `plone.org` instead of `plone.com` @ericof
2788
2833
  - Array and token widget available as named widget @nzambello
2789
2834
 
2790
2835
  ## 13.12.0 (2021-08-20)
@@ -3057,7 +3102,7 @@ https://docs.voltocms.com/upgrade-guide/
3057
3102
  - Refactored `Listing` block using the new `src/components/manage/Widgets/QuerystringWidget`. Introducing a new `showLinkMore` block option opt-in for the additional feature instead of always-in. Deprecated `ListingSidebar` and `src/components/manage/Blocks/Listing/QuerystringWidget` in favor of the new `src/components/manage/Widgets/QuerystringWidget` @sneridagh
3058
3103
 
3059
3104
  For a more information, please read the upgrade guide
3060
- https://docs.voltocms.com/upgrade-guide/
3105
+ https://6.docs.plone.org/volto/upgrade-guide/index.html
3061
3106
 
3062
3107
  ### Feature
3063
3108
 
@@ -3171,7 +3216,7 @@ https://docs.voltocms.com/upgrade-guide/
3171
3216
  - Refactored `Listing` block using the new `src/components/manage/Widgets/QuerystringWidget`. Introducing a new `showLinkMore` block option opt-in for the additional feature instead of always-in. Deprecated `ListingSidebar` and `src/components/manage/Blocks/Listing/QuerystringWidget` in favor of the new `src/components/manage/Widgets/QuerystringWidget` @sneridagh
3172
3217
 
3173
3218
  For a more information, please read the upgrade guide
3174
- https://docs.voltocms.com/upgrade-guide/
3219
+ https://6.docs.plone.org/volto/upgrade-guide/index.html
3175
3220
 
3176
3221
  ### Bugfix
3177
3222
 
@@ -3221,7 +3266,7 @@ https://docs.voltocms.com/upgrade-guide/
3221
3266
  - Get rid of the font icons in the control panels overview @sneridagh
3222
3267
 
3223
3268
  For a complete list of actions to follow, please read the upgrade guide
3224
- https://docs.voltocms.com/upgrade-guide/
3269
+ https://6.docs.plone.org/volto/upgrade-guide/index.html
3225
3270
 
3226
3271
  ### Feature
3227
3272
 
@@ -3372,7 +3417,7 @@ https://docs.voltocms.com/upgrade-guide/
3372
3417
 
3373
3418
  ### Internal
3374
3419
 
3375
- - Add Storybook to the main docs (docs.voltocms.com/storybook) build @sneridagh
3420
+ - Add Storybook to the main docs (https://6.docs.plone.org/storybook/) build @sneridagh
3376
3421
 
3377
3422
  ## 12.5.0 (2021-03-31)
3378
3423
 
@@ -3520,7 +3565,7 @@ https://docs.voltocms.com/upgrade-guide/
3520
3565
  ### Breaking
3521
3566
 
3522
3567
  - Introduction of the new Volto Configuration Registry @sneridagh @tiberiuichim
3523
- For more information about this breaking change: https://docs.voltocms.com/upgrade-guide/#upgrading-to-volto-12xx
3568
+ For more information about this breaking change: https://6.docs.plone.org/volto/upgrade-guide/index.html#upgrading-to-volto-12-x-x
3524
3569
 
3525
3570
  ### Feature
3526
3571
 
@@ -3535,7 +3580,7 @@ https://docs.voltocms.com/upgrade-guide/
3535
3580
  ### Breaking
3536
3581
 
3537
3582
  - Introduction of the new Volto Configuration Registry @sneridagh @tiberiuichim
3538
- For more information about this breaking change: https://docs.voltocms.com/upgrade-guide/#upgrading-to-volto-12xx
3583
+ For more information about this breaking change: https://6.docs.plone.org/volto/upgrade-guide/index.html#upgrading-to-volto-12-x-x
3539
3584
 
3540
3585
  ## 11.1.0 (2021-02-08)
3541
3586
 
@@ -3815,7 +3860,7 @@ https://docs.voltocms.com/upgrade-guide/
3815
3860
  ### Breaking
3816
3861
 
3817
3862
  - Removal of the Razzle patch that was introduced in 9.0.0 @sneridagh
3818
- See https://docs.voltocms.com/upgrade-guide/ for more details.
3863
+ See https://6.docs.plone.org/volto/upgrade-guide/index.html for more details.
3819
3864
  - Fetched content with `getContent` no longer includes fullobjects by default @tiberiuichim
3820
3865
 
3821
3866
  ### Bugfix
@@ -3835,7 +3880,7 @@ https://docs.voltocms.com/upgrade-guide/
3835
3880
  ## 9.2.0 (2020-11-24)
3836
3881
 
3837
3882
  **This is a brown bag release and should not be used, upgrade to Volto 10.x.x instead.**
3838
- See https://docs.voltocms.com/upgrade-guide/ for more information.
3883
+ See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information.
3839
3884
 
3840
3885
  ### Feature
3841
3886
 
@@ -3896,7 +3941,7 @@ See https://docs.voltocms.com/upgrade-guide/ for more information.
3896
3941
  - @babel/plugin-proposal-function-sent
3897
3942
 
3898
3943
  For a complete list of actions to follow, please read the upgrade guide
3899
- https://docs.voltocms.com/upgrade-guide/
3944
+ https://6.docs.plone.org/volto/upgrade-guide/index.html
3900
3945
 
3901
3946
  ### Feature
3902
3947
 
@@ -3982,7 +4027,7 @@ https://docs.voltocms.com/upgrade-guide/
3982
4027
 
3983
4028
  ### Feature
3984
4029
 
3985
- - Add support for the new active LTS NodeJS version 14. NodeJS 10 eol will happen on 2021-04-30 and Volto will update accordingly. More information on https://nodejs.org/en/about/releases @sneridagh
4030
+ - Add support for the new active LTS NodeJS version 14. NodeJS 10 eol will happen on 2021-04-30 and Volto will update accordingly. More information on https://github.com/nodejs/release#release-schedule @sneridagh
3986
4031
 
3987
4032
  ## 8.7.1 (2020-10-29)
3988
4033
 
@@ -4506,7 +4551,7 @@ https://docs.voltocms.com/upgrade-guide/
4506
4551
 
4507
4552
  ### Feature
4508
4553
 
4509
- - Provide a new webpack alias, `volto-themes`, which points to Volto's theme folder. See details in the https://docs.voltocms.com/upgrade-guide/
4554
+ - Provide a new webpack alias, `volto-themes`, which points to Volto's theme folder. See details in the https://6.docs.plone.org/volto/upgrade-guide/index.html
4510
4555
 
4511
4556
  ### Internal
4512
4557
 
@@ -4655,7 +4700,7 @@ https://docs.voltocms.com/upgrade-guide/
4655
4700
  ### Breaking
4656
4701
 
4657
4702
  - Removed support for CSS modules, since Razzle 3.1.x do not support them @sneridagh
4658
- - Updated Volto dependencies - See https://docs.voltocms.com/upgrade-guide/ for more information @sneridagh
4703
+ - Updated Volto dependencies - See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information @sneridagh
4659
4704
  - By adding `react-beautiful-dnd` in the block editor we are introducing new wrappers
4660
4705
  (belonging to the lib machinery) in the structure. The original structure and class
4661
4706
  names are still in there for maintain maximum backwards compatibility. Those might be
@@ -5125,7 +5170,7 @@ refer to all of them in https://github.com/plone/volto/releases
5125
5170
 
5126
5171
  ### Internal
5127
5172
 
5128
- - Added forest.eea.europa.eu as deployed Volto in production @tiberiuichim
5173
+ - Added `forest.eea.europa.eu` as deployed Volto in production @tiberiuichim
5129
5174
  - Add SemanticUI responsive variables to the responsive utils @sneridagh
5130
5175
  - Added `yarnhook` to the build @sneridagh
5131
5176
 
@@ -5172,7 +5217,7 @@ refer to all of them in https://github.com/plone/volto/releases
5172
5217
 
5173
5218
  ### Added
5174
5219
 
5175
- - Lead image behavior block @sneridagh sponsored by CMSCOM.jp @terapyon
5220
+ - Lead image behavior block @sneridagh sponsored by `CMSCOM.jp` @terapyon
5176
5221
 
5177
5222
  ### Changes
5178
5223
 
@@ -5484,7 +5529,7 @@ refer to all of them in https://github.com/plone/volto/releases
5484
5529
  ### Internal
5485
5530
 
5486
5531
  - Add complete husky config @sneridagh
5487
- - Add COC.md file @timo
5532
+ - Add `COC.md` file @timo
5488
5533
 
5489
5534
  ## 4.0.0-alpha.5 (2019-09-28)
5490
5535
 
@@ -46,10 +46,12 @@ Cypress.Commands.add(
46
46
  contentType,
47
47
  contentId,
48
48
  contentTitle,
49
+ contentDescription,
49
50
  path = '',
50
51
  allow_discussion = false,
51
52
  transition = '',
52
53
  bodyModifier = (body) => body,
54
+ image = false,
53
55
  }) => {
54
56
  let api_url, auth;
55
57
  if (Cypress.env('API') === 'guillotina') {
@@ -62,40 +64,44 @@ Cypress.Commands.add(
62
64
  api_url = PLONE_API_URL;
63
65
  auth = ploneAuthObj;
64
66
  }
67
+
68
+ const defaultParams = {
69
+ method: 'POST',
70
+ url: `${api_url}/${path}`,
71
+ headers: {
72
+ Accept: 'application/json',
73
+ },
74
+ auth: auth,
75
+ body: {
76
+ '@type': contentType,
77
+ id: contentId,
78
+ title: contentTitle,
79
+ description: contentDescription,
80
+ allow_discussion: allow_discussion,
81
+ },
82
+ };
83
+
65
84
  if (contentType === 'File') {
66
- return cy.request({
67
- method: 'POST',
68
- url: `${api_url}/${path}`,
69
- headers: {
70
- Accept: 'application/json',
71
- },
72
- auth: auth,
85
+ const params = {
86
+ ...defaultParams,
73
87
  body: bodyModifier({
74
- '@type': contentType,
75
- id: contentId,
76
- title: contentTitle,
88
+ ...defaultParams.body,
77
89
  file: {
78
90
  data: 'dGVzdGZpbGUK',
79
91
  encoding: 'base64',
80
92
  filename: 'lorem.txt',
81
93
  'content-type': 'text/plain',
82
94
  },
83
- allow_discussion: allow_discussion,
84
95
  }),
85
- });
96
+ };
97
+
98
+ return cy.request(params);
86
99
  }
87
100
  if (contentType === 'Image') {
88
- return cy.request({
89
- method: 'POST',
90
- url: `${api_url}/${path}`,
91
- headers: {
92
- Accept: 'application/json',
93
- },
94
- auth: auth,
101
+ const params = {
102
+ ...defaultParams,
95
103
  body: bodyModifier({
96
- '@type': contentType,
97
- id: contentId,
98
- title: contentTitle,
104
+ ...defaultParams.body,
99
105
  image: {
100
106
  data:
101
107
  'iVBORw0KGgoAAAANSUhEUgAAANcAAAA4CAMAAABZsZ3QAAAAM1BMVEX29fK42OU+oMvn7u9drtIPisHI4OhstdWZyt4fkcXX5+sAg74umMhNp86p0eJ7vNiKw9v/UV4wAAAAAXRSTlMAQObYZgAABBxJREFUeF7tmuty4yAMhZG4X2zn/Z92J5tsBJwWXG/i3XR6frW2Y/SBLIRAfaQUDNt8E5tLUt9BycfcKfq3R6Mlfyimtx4rzp+K3dtibXkor99zsEqLYZltblTecciogoh+TXfY1Ve4dn07rCDGG9dHSEEOg/GmXl0U1XDxTKxNK5De7BxsyyBr6gGm2/vPxKJ8F6f7BXKfRMp1xIWK9A+5ks25alSb353dWnDJN1k35EL5f8dVGifTf/4tjUuuFq7u4srmXC60yAmldLXIWbg65RKU87lcGxJCFqUPv0IacW0PmSivOZFLE908inPToMmii/roG+MRV/O8FU88i8tFsxV3a06MFUw0Qu7RmAtdV5/HVVaOVMTWNOWSwMljLhzhcB6XIS7OK5V6AvRDNN7t5VJWQs1J40UmalbK56usBG/CuCHSYuc+rkUGeMCViNRARPrzW52N3oQLe6WifNliSuuGaH3czbVNudI9s7ZLUCLHVwWlyES522o1t14uvmbblmVTKqFjaZYJFSTPP4dLL1kU1z7p0lzdbRulmEWLxoQX+z9ce7A8GqEEucllLxePuZwdJl1Lezu0hoswvTPt61DrFcRuujV/2cmlxaGBC7Aw6cpovGANwRiSdOAWJ5AGy4gLL64dl0QhUEAuEUNws+XxV+OKGPdw/hESGYF9XEGaFC7sNLMSXWJjHsnanYi87VK428N2uxpOjOFANcagLM5l+7mSycM8KknZpKLcGi6jmzWGr/vLurZ/0g4u9AZuAoeb5r1ceQhyiTPY1E4wUR6u/F3H2ojSpXMMriBPT9cezTto8Cx+MsglHL4fv1Rxrb1LVw9yvyQpJ3AhFnLZfuRLH2QsOG3FGGD20X/th/u5bFAt16Bt308KjF+MNOXgl/SquIEySX3GhaZvc67KZbDxcCDORz2N8yCWPaY5lyQZO7lQ29fnZbt3Xu6qoge4+DjXl/MocySPOp9rlvdyznahRyHEYd77v3LhugOXDv4J65QXfl803BDAdaWBEDhfVx7nKofjoVCgxnUAqw/UAUDPn788BDvQuG4TDtdtUPvzjSlXAB8DvaDOhhrmhwbywylXAm8CvaouikJTL93gs3y7Yy4VYbIxOHrcMizPqWOjqO9l3Uz52kibQy4xxOgqhJvD+w5rvokOcAlGvNCfeqCv1ste1stzLm0f71Iq3ZfTrPfuE5nhPtF+LvQE2lffQC7pYtQy3tdzdrKvd5TLVVzDetScS3nEKmmwDyt1Cev1kX3YfbvzNK4fzrlw+cB6vm+uiUgf2zdXI62241LawCb7Pi5FXFPF8KpzDoF/Sw2lg+GrHNbno1mhPu+VCF/vfMnw06PnUl6j48dVHD3jHNHPua+fc3o/5yp/zsGi0vYtzi3Pz5mHd4T6BWMIlewacd63AAAAAElFTkSuQmCC',
@@ -104,37 +110,74 @@ Cypress.Commands.add(
104
110
  'content-type': 'image/png',
105
111
  },
106
112
  }),
107
- });
113
+ };
114
+
115
+ return cy.request(params);
108
116
  }
109
117
  if (
110
118
  ['Document', 'News Item', 'Folder', 'CMSFolder'].includes(contentType)
111
119
  ) {
112
- return cy
113
- .request({
114
- method: 'POST',
115
- url: `${api_url}/${path}`,
116
- headers: {
117
- Accept: 'application/json',
120
+ const params = {
121
+ ...defaultParams,
122
+ body: {
123
+ ...defaultParams.body,
124
+ blocks: {
125
+ 'd3f1c443-583f-4e8e-a682-3bf25752a300': { '@type': 'title' },
126
+ '7624cf59-05d0-4055-8f55-5fd6597d84b0': { '@type': 'slate' },
118
127
  },
119
- auth: auth,
128
+ blocks_layout: {
129
+ items: [
130
+ 'd3f1c443-583f-4e8e-a682-3bf25752a300',
131
+ '7624cf59-05d0-4055-8f55-5fd6597d84b0',
132
+ ],
133
+ },
134
+ },
135
+ };
136
+
137
+ if (image) {
138
+ let sourceFilename = 'cypress/fixtures/halfdome2022.jpg';
139
+ let imageObject = {
140
+ encoding: 'base64',
141
+ filename: 'image.jpg',
142
+ 'content-type': 'image/jpg',
143
+ };
144
+ if (typeof image === 'object') {
145
+ sourceFilename = image.sourceFilename;
146
+ imageObject = {
147
+ ...imageObject,
148
+ ...image,
149
+ };
150
+ }
151
+ cy.readFile(sourceFilename, 'base64').then((encodedImage) => {
152
+ const withImageParams = {
153
+ ...params,
154
+ body: bodyModifier({
155
+ ...params.body,
156
+ preview_image: {
157
+ ...imageObject,
158
+ data: encodedImage,
159
+ },
160
+ }),
161
+ };
162
+
163
+ return cy.request(withImageParams).then(() => {
164
+ if (transition) {
165
+ cy.setWorkflow({
166
+ path: path || contentId,
167
+ review_state: transition,
168
+ });
169
+ }
170
+ console.log(`${contentType} created`);
171
+ });
172
+ });
173
+ } else {
174
+ const documentParams = {
175
+ ...params,
120
176
  body: bodyModifier({
121
- '@type': contentType,
122
- id: contentId,
123
- title: contentTitle,
124
- blocks: {
125
- 'd3f1c443-583f-4e8e-a682-3bf25752a300': { '@type': 'title' },
126
- '7624cf59-05d0-4055-8f55-5fd6597d84b0': { '@type': 'slate' },
127
- },
128
- blocks_layout: {
129
- items: [
130
- 'd3f1c443-583f-4e8e-a682-3bf25752a300',
131
- '7624cf59-05d0-4055-8f55-5fd6597d84b0',
132
- ],
133
- },
134
- allow_discussion: allow_discussion,
177
+ ...params.body,
135
178
  }),
136
- })
137
- .then(() => {
179
+ };
180
+ return cy.request(documentParams).then(() => {
138
181
  if (transition) {
139
182
  cy.setWorkflow({
140
183
  path: path || contentId,
@@ -143,6 +186,7 @@ Cypress.Commands.add(
143
186
  }
144
187
  console.log(`${contentType} created`);
145
188
  });
189
+ }
146
190
  } else {
147
191
  return cy
148
192
  .request({
package/news/4160.bug ADDED
@@ -0,0 +1,2 @@
1
+ Use Grid instead of Table in Diffview
2
+ [erral]
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "16.5.0",
12
+ "version": "16.7.0",
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git@github.com:plone/volto.git"
@@ -53,16 +53,12 @@
53
53
  "lint:fix": "./node_modules/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx,json}'",
54
54
  "i18n": "rm -rf build/messages && NODE_ENV=production i18n",
55
55
  "i18n:ci": "yarn i18n && git diff -G'^[^\"POT]' --exit-code",
56
- "stylelint:patches": "patch -p0 -N node_modules/stylelint/lib/getPostcssResult.js < patches/fixstylelint.patch || true",
57
- "patches": "/bin/bash patches/patchit.sh > /dev/null 2>&1 ||true",
58
- "deduplicate": "yarn-deduplicate yarn.lock",
59
56
  "dry-release": "release-it --dry-run",
60
57
  "release": "release-it",
61
58
  "release-major-alpha": "release-it major --preRelease=alpha",
62
59
  "release-alpha": "release-it --preRelease=alpha",
63
60
  "storybook": "start-storybook -p 6006",
64
- "build-storybook": "build-storybook",
65
- "cypress:open": "NODE_ENV=production cypress open"
61
+ "build-storybook": "build-storybook"
66
62
  },
67
63
  "bundlewatch": {
68
64
  "files": [
@@ -412,6 +408,7 @@
412
408
  "identity-obj-proxy": "3.0.0",
413
409
  "jest": "26.6.3",
414
410
  "jest-environment-jsdom": "^26",
411
+ "react-error-overlay": "6.0.9",
415
412
  "react-is": "^16.13.1",
416
413
  "release-it": "^15.1.3",
417
414
  "tmp": "0.2.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plone/volto-slate",
3
- "version": "16.5.0",
3
+ "version": "16.7.0",
4
4
  "description": "Slate.js integration with Volto",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -35,15 +35,11 @@ const SlashMenu = ({
35
35
  availableBlocks,
36
36
  }) => {
37
37
  const intl = useIntl();
38
- // Filter out slate block
39
- const filteredAvailableBlocks = availableBlocks.filter(
40
- (block) => block.id !== 'slate',
41
- );
42
38
 
43
39
  return (
44
40
  <div className="power-user-menu">
45
41
  <Menu vertical fluid borderless>
46
- {filteredAvailableBlocks.map((block, index) => (
42
+ {availableBlocks.map((block, index) => (
47
43
  <Menu.Item
48
44
  key={block.id}
49
45
  className={block.id}
@@ -61,7 +57,7 @@ const SlashMenu = ({
61
57
  })}
62
58
  </Menu.Item>
63
59
  ))}
64
- {filteredAvailableBlocks.length === 0 && (
60
+ {availableBlocks.length === 0 && (
65
61
  <Menu.Item>
66
62
  <FormattedMessage
67
63
  id="No matching blocks"
@@ -81,11 +77,25 @@ SlashMenu.propTypes = {
81
77
  blocksConfig: PropTypes.arrayOf(PropTypes.any),
82
78
  };
83
79
 
80
+ const translateBlockTitle = (block, intl) =>
81
+ intl.formatMessage({
82
+ id: block.title,
83
+ defaultMessage: block.title,
84
+ });
85
+ const scoreBlock = (block, slashCommand, intl) => {
86
+ if (!slashCommand) return 0;
87
+ const title = translateBlockTitle(block, intl).toLowerCase();
88
+ // prefer initial title matches, then title substring matches
89
+ if (title.indexOf(slashCommand[1]) === 0) return 2;
90
+ if (title.indexOf(slashCommand[1]) !== -1) return 1;
91
+ };
92
+
84
93
  /**
85
94
  * A SlashMenu wrapper implemented as a volto-slate PersistentHelper.
86
95
  */
87
96
  const PersistentSlashMenu = ({ editor }) => {
88
97
  const props = editor.getBlockProps();
98
+ const intl = useIntl();
89
99
  const {
90
100
  block,
91
101
  blocksConfig,
@@ -115,14 +125,33 @@ const PersistentSlashMenu = ({ editor }) => {
115
125
  ? !item.restricted({ properties, block: item })
116
126
  : !item.restricted,
117
127
  )
118
- .filter(
119
- (block) =>
128
+ .filter((block) => {
129
+ // typed text is a substring of the title or id
130
+ const title = translateBlockTitle(block, intl).toLowerCase();
131
+ return (
132
+ block.id !== 'slate' &&
120
133
  slashCommand &&
121
- (block.id.indexOf(slashCommand[1]) === 0 ||
122
- block.title.toLowerCase().indexOf(slashCommand[1]) === 0),
123
- )
124
- .sort((a, b) => (a.title < b.title ? -1 : 1)),
125
- [allowedBlocks, blocksConfig, properties, slashCommand, useAllowedBlocks],
134
+ title.indexOf(slashCommand[1]) !== -1
135
+ );
136
+ })
137
+ .sort((a, b) => {
138
+ const scoreDiff =
139
+ scoreBlock(b, slashCommand, intl) -
140
+ scoreBlock(a, slashCommand, intl);
141
+ if (scoreDiff) return scoreDiff;
142
+ // sort equally scored blocks by title
143
+ return translateBlockTitle(a, intl).localeCompare(
144
+ translateBlockTitle(b, intl),
145
+ );
146
+ }),
147
+ [
148
+ allowedBlocks,
149
+ blocksConfig,
150
+ intl,
151
+ properties,
152
+ slashCommand,
153
+ useAllowedBlocks,
154
+ ],
126
155
  );
127
156
 
128
157
  const slashMenuSize = availableBlocks.length;
@@ -34,6 +34,8 @@ export default (config) => {
34
34
  'styleMenu',
35
35
  ];
36
36
 
37
+ config.settings.slate.scrollIntoView = false;
38
+
37
39
  config.addonReducers = {
38
40
  ...config.addonReducers,
39
41
  ...slateReducers,
@@ -64,7 +64,11 @@ class Edit extends Component {
64
64
  * @memberof Edit
65
65
  */
66
66
  shouldComponentUpdate(nextProps) {
67
- return this.props.selected || !isEqual(this.props.data, nextProps.data);
67
+ return (
68
+ this.props.selected ||
69
+ nextProps.selected ||
70
+ !isEqual(this.props.data, nextProps.data)
71
+ );
68
72
  }
69
73
 
70
74
  node = React.createRef();
@@ -80,6 +80,7 @@ const SortOn = (props) => {
80
80
  label: sortable_indexes[k]?.title || k,
81
81
  })),
82
82
  ]}
83
+ isSearchable={false}
83
84
  value={value}
84
85
  onChange={(data) => {
85
86
  !isEditMode && setSortOn(data.value);
@@ -7,7 +7,14 @@ import React from 'react';
7
7
  import { FormattedMessage } from 'react-intl';
8
8
  import { isEmpty } from 'lodash';
9
9
 
10
- import { version as voltoVersion } from '../../../../package.json';
10
+ import {
11
+ version as voltoVersion,
12
+ name as voltoName,
13
+ } from '../../../../package.json';
14
+ import {
15
+ version as projectVersion,
16
+ name as projectName,
17
+ } from '@root/../package.json';
11
18
 
12
19
  import { defineMessages, useIntl } from 'react-intl';
13
20
  import config from '@plone/volto/registry';
@@ -30,6 +37,7 @@ const VersionOverview = ({
30
37
  }) => {
31
38
  const intl = useIntl();
32
39
  const { addonsInfo } = config.settings;
40
+ const isProject = voltoName !== projectName;
33
41
 
34
42
  return (
35
43
  <>
@@ -40,6 +48,11 @@ const VersionOverview = ({
40
48
  paddingLeft: '1rem',
41
49
  }}
42
50
  >
51
+ {isProject ? (
52
+ <li>
53
+ {projectName} {projectVersion}
54
+ </li>
55
+ ) : null}
43
56
  {voltoVersion && <li>Volto {voltoVersion}</li>}
44
57
  <li>Plone {plone_version}</li>
45
58
  <li>plone.restapi {plone_restapi_version}</li>
@@ -7,7 +7,7 @@ import React from 'react';
7
7
  // import { diffWords as dWords } from 'diff';
8
8
  import { join, map } from 'lodash';
9
9
  import PropTypes from 'prop-types';
10
- import { Table } from 'semantic-ui-react';
10
+ import { Grid } from 'semantic-ui-react';
11
11
  import ReactDOMServer from 'react-dom/server';
12
12
  import { Provider } from 'react-intl-redux';
13
13
  import { createBrowserHistory } from 'history';
@@ -105,75 +105,72 @@ const DiffField = ({
105
105
  parts = diffWords(one?.title || one, two?.title || two);
106
106
  }
107
107
  return (
108
- <Table compact data-testid="DiffField">
109
- <Table.Header>
110
- <Table.Row>
111
- <Table.HeaderCell colSpan={2}>{schema.title}</Table.HeaderCell>
112
- </Table.Row>
113
- </Table.Header>
114
- <Table.Body>
115
- {view === 'split' && (
116
- <Table.Row>
117
- <Table.Cell width={8} verticalAlign="top">
118
- <span
119
- dangerouslySetInnerHTML={{
120
- __html: join(
121
- map(
122
- parts,
123
- (part) =>
124
- (part.removed &&
125
- `<span class="deletion">${part.value}</span>`) ||
126
- (!part.added && `<span>${part.value}</span>`) ||
127
- '',
128
- ),
129
- '',
108
+ <Grid data-testid="DiffField">
109
+ <Grid.Row>
110
+ <Grid.Column width={12}>{schema.title}</Grid.Column>
111
+ </Grid.Row>
112
+
113
+ {view === 'split' && (
114
+ <Grid.Row>
115
+ <Grid.Column width={6} verticalAlign="top">
116
+ <span
117
+ dangerouslySetInnerHTML={{
118
+ __html: join(
119
+ map(
120
+ parts,
121
+ (part) =>
122
+ (part.removed &&
123
+ `<span class="deletion">${part.value}</span>`) ||
124
+ (!part.added && `<span>${part.value}</span>`) ||
125
+ '',
130
126
  ),
131
- }}
132
- />
133
- </Table.Cell>
134
- <Table.Cell width={8} verticalAlign="top">
135
- <span
136
- dangerouslySetInnerHTML={{
137
- __html: join(
138
- map(
139
- parts,
140
- (part) =>
141
- (part.added &&
142
- `<span class="addition">${part.value}</span>`) ||
143
- (!part.removed && `<span>${part.value}</span>`) ||
144
- '',
145
- ),
146
- '',
127
+ '',
128
+ ),
129
+ }}
130
+ />
131
+ </Grid.Column>
132
+ <Grid.Column width={6} verticalAlign="top">
133
+ <span
134
+ dangerouslySetInnerHTML={{
135
+ __html: join(
136
+ map(
137
+ parts,
138
+ (part) =>
139
+ (part.added &&
140
+ `<span class="addition">${part.value}</span>`) ||
141
+ (!part.removed && `<span>${part.value}</span>`) ||
142
+ '',
147
143
  ),
148
- }}
149
- />
150
- </Table.Cell>
151
- </Table.Row>
152
- )}
153
- {view === 'unified' && (
154
- <Table.Row>
155
- <Table.Cell width={16} verticalAlign="top">
156
- <span
157
- dangerouslySetInnerHTML={{
158
- __html: join(
159
- map(
160
- parts,
161
- (part) =>
162
- (part.removed &&
163
- `<span class="deletion">${part.value}</span>`) ||
164
- (part.added &&
165
- `<span class="addition">${part.value}</span>`) ||
166
- (!part.added && `<span>${part.value}</span>`),
167
- ),
168
- '',
144
+ '',
145
+ ),
146
+ }}
147
+ />
148
+ </Grid.Column>
149
+ </Grid.Row>
150
+ )}
151
+ {view === 'unified' && (
152
+ <Grid.Row>
153
+ <Grid.Column width={16} verticalAlign="top">
154
+ <span
155
+ dangerouslySetInnerHTML={{
156
+ __html: join(
157
+ map(
158
+ parts,
159
+ (part) =>
160
+ (part.removed &&
161
+ `<span class="deletion">${part.value}</span>`) ||
162
+ (part.added &&
163
+ `<span class="addition">${part.value}</span>`) ||
164
+ (!part.added && `<span>${part.value}</span>`),
169
165
  ),
170
- }}
171
- />
172
- </Table.Cell>
173
- </Table.Row>
174
- )}
175
- </Table.Body>
176
- </Table>
166
+ '',
167
+ ),
168
+ }}
169
+ />
170
+ </Grid.Column>
171
+ </Grid.Row>
172
+ )}
173
+ </Grid>
177
174
  );
178
175
  };
179
176
 
@@ -236,7 +236,8 @@ class ArrayWidget extends Component {
236
236
  !this.props.items?.choices?.length &&
237
237
  !this.props.choices?.length &&
238
238
  this.props.vocabLoading === undefined &&
239
- !this.props.vocabLoaded
239
+ !this.props.vocabLoaded &&
240
+ this.props.vocabBaseUrl
240
241
  ) {
241
242
  this.props.getVocabulary({
242
243
  vocabNameOrURL: this.props.vocabBaseUrl,
@@ -32,6 +32,7 @@ const NumberWidget = (props) => {
32
32
  maximum,
33
33
  minimum,
34
34
  placeholder,
35
+ step,
35
36
  } = props;
36
37
 
37
38
  return (
@@ -43,6 +44,7 @@ const NumberWidget = (props) => {
43
44
  disabled={isDisabled}
44
45
  min={minimum || null}
45
46
  max={maximum || null}
47
+ step={step}
46
48
  value={value ?? ''}
47
49
  placeholder={placeholder}
48
50
  onChange={({ target }) =>
@@ -65,7 +67,7 @@ const NumberWidget = (props) => {
65
67
  NumberWidget.propTypes = {
66
68
  id: PropTypes.string.isRequired,
67
69
  title: PropTypes.string.isRequired,
68
- description: PropTypes.string,
70
+ description: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
69
71
  required: PropTypes.bool,
70
72
  error: PropTypes.arrayOf(PropTypes.string),
71
73
  value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
@@ -73,6 +75,7 @@ NumberWidget.propTypes = {
73
75
  wrapped: PropTypes.bool,
74
76
  maximum: PropTypes.number,
75
77
  minimum: PropTypes.number,
78
+ step: PropTypes.number,
76
79
  placeholder: PropTypes.string,
77
80
  };
78
81
 
package/src/routes.js CHANGED
@@ -2,6 +2,8 @@
2
2
  * Routes.
3
3
  * @module routes
4
4
  */
5
+ import debug from 'debug';
6
+ import { compact } from 'lodash';
5
7
  import {
6
8
  Add,
7
9
  AddonsControlpanel,
@@ -93,12 +95,36 @@ export const multilingualRoutes = [
93
95
  },
94
96
  ];
95
97
 
98
+ export function getExternalRoutes() {
99
+ return compact(
100
+ (config.settings?.externalRoutes || []).map((route) => {
101
+ const newRoute = {
102
+ component: NotFound,
103
+ };
104
+ if (typeof route.match === 'string') {
105
+ newRoute.path = route.match;
106
+ return newRoute;
107
+ } else if (
108
+ typeof route.match === 'object' &&
109
+ !Array.isArray(route.match)
110
+ ) {
111
+ return {
112
+ ...newRoute,
113
+ ...route.match,
114
+ };
115
+ } else {
116
+ debug('routes')(
117
+ 'Got invalid externalRoute, please check the configuration.',
118
+ );
119
+ return null;
120
+ }
121
+ }),
122
+ );
123
+ }
124
+
96
125
  export const defaultRoutes = [
97
126
  // redirect to external links if path is in blacklist
98
- ...(config.settings?.externalRoutes || []).map((route) => ({
99
- ...route.match,
100
- component: NotFound,
101
- })),
127
+ ...getExternalRoutes(),
102
128
  ...((config.settings?.isMultilingual && multilingualRoutes) || []),
103
129
  {
104
130
  path: '/',
@@ -0,0 +1,34 @@
1
+ import config from './registry';
2
+ import { getExternalRoutes } from './routes';
3
+
4
+ describe('externalRoutes', () => {
5
+ it('computes regular externalRoutes correctly', () => {
6
+ config.settings.externalRoutes = [
7
+ {
8
+ match: {
9
+ path: '/test',
10
+ },
11
+ },
12
+ ];
13
+ const testRoute = getExternalRoutes().find((r) => r.path === '/test');
14
+ expect(testRoute).not.toBeUndefined();
15
+ });
16
+ it('computes shorthand externalRoutes correctly', () => {
17
+ config.settings.externalRoutes = [{ match: '/test' }];
18
+ const testRoute = getExternalRoutes().find((r) => r.path === '/test');
19
+ expect(testRoute).not.toBeUndefined();
20
+ });
21
+ it('ignores invalid routes', () => {
22
+ config.settings.externalRoutes = [
23
+ '/test',
24
+ { '/test': true },
25
+ ['/test'],
26
+ { match: ['/test'] },
27
+ { match: 123 },
28
+ ];
29
+ const externalRoutes = getExternalRoutes();
30
+ const testRoute = externalRoutes.find((r) => r.path === '/test');
31
+ expect(testRoute).toBeUndefined();
32
+ expect(externalRoutes.length).toEqual(0);
33
+ });
34
+ });
package/news/4113.bug DELETED
@@ -1 +0,0 @@
1
- Fix categorization list is not readable when there are longer values or filtering @iFlameing