Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocks Layout Navigator #5642

Merged
merged 27 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
fce543f
Main feature working
sneridagh Jan 16, 2024
4efa7cb
Change icons and lables.
robgietema May 15, 2024
b779c97
Change icons and lables.
robgietema May 15, 2024
645d315
Fix portals.
robgietema May 15, 2024
98b08f6
Refactor navigator.
robgietema May 16, 2024
f3a330f
Add verification.
robgietema May 16, 2024
3abc064
Make dnd-kit loadable.
robgietema Jun 5, 2024
a800a95
Add translation.
robgietema Jun 5, 2024
090c70f
Added news.
robgietema Jun 5, 2024
677fef4
Fix form test.
robgietema Jun 5, 2024
e78d645
Fix tests.
robgietema Jun 5, 2024
8dc80f7
Fix snap.
robgietema Jun 5, 2024
05fef26
Fix snap.
robgietema Jun 5, 2024
d223743
Fix form test.
robgietema Jun 5, 2024
e84a626
Fix portal test.
robgietema Jun 5, 2024
7783360
Set portals.
robgietema Jun 5, 2024
69f56ae
Fix BlocksForm.test - Bring back the code to remove dangling non-vali…
sneridagh Jun 6, 2024
321129a
Fix the remaining test
sneridagh Jun 6, 2024
f5ebd56
Fix dx layout tab
sneridagh Jun 6, 2024
32916c1
Merge branch 'main' into blocks-layout-navigator
sneridagh Jun 6, 2024
f044a99
Merge branch 'main' into blocks-layout-navigator
sneridagh Jun 9, 2024
26b5632
Fix last test, comment out the onFocus that was stealing the focus fr…
sneridagh Jun 9, 2024
c16ece9
Italian translation
pnicolli Jun 10, 2024
11341e9
Fix drag handle in FF
sneridagh Jun 11, 2024
f7a387c
Remove lodash whenever possible
sneridagh Jun 12, 2024
13dea0c
Merge branch 'main' into blocks-layout-navigator
sneridagh Jun 12, 2024
b74d0f1
update test
sneridagh Jun 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ describe('ControlPanel: Dexterity Content-Types Layout', () => {
);
cy.get('#page-controlpanel-layout button').click();

cy.get('#sidebar .formtabs').contains('Settings').click();

// Wait a bit for draftjs to load, without this the title block
// custom placeholder is missing and cypress gives a timeout error
cy.wait(1000);
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/ca/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2481,6 +2481,11 @@ msgstr "Obre el menú"
msgid "Open object browser"
msgstr "Obre el navegador d'objectes"

#. Default: "Order"
#: components/manage/Sidebar/Sidebar
msgid "Order"
msgstr ""

#. Default: "Ordered"
#: components/manage/Blocks/ToC/Schema
msgid "Ordered"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2480,6 +2480,11 @@ msgstr "Menü öffnen"
msgid "Open object browser"
msgstr "Objekt-Browser öffnen"

#. Default: "Order"
#: components/manage/Sidebar/Sidebar
msgid "Order"
msgstr ""

#. Default: "Ordered"
#: components/manage/Blocks/ToC/Schema
msgid "Ordered"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2475,6 +2475,11 @@ msgstr ""
msgid "Open object browser"
msgstr ""

#. Default: "Order"
#: components/manage/Sidebar/Sidebar
msgid "Order"
msgstr ""

#. Default: "Ordered"
#: components/manage/Blocks/ToC/Schema
msgid "Ordered"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2482,6 +2482,11 @@ msgstr "Abrir menú"
msgid "Open object browser"
msgstr "Abrir buscador de objetos"

#. Default: "Order"
#: components/manage/Sidebar/Sidebar
msgid "Order"
msgstr ""

#. Default: "Ordered"
#: components/manage/Blocks/ToC/Schema
msgid "Ordered"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/eu/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2482,6 +2482,11 @@ msgstr "Menua ireki"
msgid "Open object browser"
msgstr "Ireki elementu bilatzailea"

#. Default: "Order"
#: components/manage/Sidebar/Sidebar
msgid "Order"
msgstr ""

#. Default: "Ordered"
#: components/manage/Blocks/ToC/Schema
msgid "Ordered"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/fi/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2480,6 +2480,11 @@ msgstr "Avaa valikko"
msgid "Open object browser"
msgstr ""

#. Default: "Order"
#: components/manage/Sidebar/Sidebar
msgid "Order"
msgstr ""

#. Default: "Ordered"
#: components/manage/Blocks/ToC/Schema
msgid "Ordered"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2482,6 +2482,11 @@ msgstr "Ouvrir le menu"
msgid "Open object browser"
msgstr "Ouvrir le navigateur d'objets"

#. Default: "Order"
#: components/manage/Sidebar/Sidebar
msgid "Order"
msgstr ""

#. Default: "Ordered"
#: components/manage/Blocks/ToC/Schema
msgid "Ordered"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/hi/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2475,6 +2475,11 @@ msgstr "मेन्यू खोलें"
msgid "Open object browser"
msgstr "ऑब्जेक्ट ब्राउज़र खोलें"

#. Default: "Order"
#: components/manage/Sidebar/Sidebar
msgid "Order"
msgstr ""

#. Default: "Ordered"
#: components/manage/Blocks/ToC/Schema
msgid "Ordered"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2475,6 +2475,11 @@ msgstr "Apri menu"
msgid "Open object browser"
msgstr "Apri object browser"

#. Default: "Order"
#: components/manage/Sidebar/Sidebar
msgid "Order"
msgstr "Ordine"

#. Default: "Ordered"
#: components/manage/Blocks/ToC/Schema
msgid "Ordered"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/ja/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2480,6 +2480,11 @@ msgstr "メニューを開く"
msgid "Open object browser"
msgstr "オブジェクトブラウザを開く"

#. Default: "Order"
#: components/manage/Sidebar/Sidebar
msgid "Order"
msgstr ""

#. Default: "Ordered"
#: components/manage/Blocks/ToC/Schema
msgid "Ordered"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/nl/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2479,6 +2479,11 @@ msgstr ""
msgid "Open object browser"
msgstr ""

#. Default: "Order"
#: components/manage/Sidebar/Sidebar
msgid "Order"
msgstr ""

#. Default: "Ordered"
#: components/manage/Blocks/ToC/Schema
msgid "Ordered"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/pt/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2480,6 +2480,11 @@ msgstr "Abrir menu"
msgid "Open object browser"
msgstr ""

#. Default: "Order"
#: components/manage/Sidebar/Sidebar
msgid "Order"
msgstr ""

#. Default: "Ordered"
#: components/manage/Blocks/ToC/Schema
msgid "Ordered"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/pt_BR/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2481,6 +2481,11 @@ msgstr "Abrir menu"
msgid "Open object browser"
msgstr "Abrir navegador de objetos"

#. Default: "Order"
#: components/manage/Sidebar/Sidebar
msgid "Order"
msgstr ""

#. Default: "Ordered"
#: components/manage/Blocks/ToC/Schema
msgid "Ordered"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/ro/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2475,6 +2475,11 @@ msgstr "Deschideți meniul"
msgid "Open object browser"
msgstr "Deschideți browserul de obiecte"

#. Default: "Order"
#: components/manage/Sidebar/Sidebar
msgid "Order"
msgstr ""

#. Default: "Ordered"
#: components/manage/Blocks/ToC/Schema
msgid "Ordered"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/volto.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2477,6 +2477,11 @@ msgstr ""
msgid "Open object browser"
msgstr ""

#. Default: "Order"
#: components/manage/Sidebar/Sidebar
msgid "Order"
msgstr ""

#. Default: "Ordered"
#: components/manage/Blocks/ToC/Schema
msgid "Ordered"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/zh_CN/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2481,6 +2481,11 @@ msgstr "打开菜单"
msgid "Open object browser"
msgstr "打开目标浏览器"

#. Default: "Order"
#: components/manage/Sidebar/Sidebar
msgid "Order"
msgstr ""

#. Default: "Ordered"
#: components/manage/Blocks/ToC/Schema
msgid "Ordered"
Expand Down
1 change: 1 addition & 0 deletions packages/volto/news/5642.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added blocks layout navigator @robgietema @sneridagh
3 changes: 3 additions & 0 deletions packages/volto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@
"@babel/types": "7.20.5",
"@fiverr/afterbuild-webpack-plugin": "^1.0.0",
"@jest/globals": "^29.7.0",
"@dnd-kit/core": "6.0.8",
"@dnd-kit/sortable": "7.0.2",
"@dnd-kit/utilities": "3.2.2",
"@loadable/babel-plugin": "5.13.2",
"@loadable/webpack-plugin": "5.15.2",
"@plone/types": "workspace:*",
Expand Down
20 changes: 18 additions & 2 deletions packages/volto/src/actions/form/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,33 @@
* @module actions/form/form
*/

import { SET_FORM_DATA } from '@plone/volto/constants/ActionTypes';
import {
SET_FORM_DATA,
SET_UI_STATE,
} from '@plone/volto/constants/ActionTypes';

/**
* Set form data function.
* @function setFormData
* @param {Object} data New form data.
* @returns {Object} Set sidebar action.
* @returns {Object} Set form data action.
*/
export function setFormData(data) {
return {
type: SET_FORM_DATA,
data,
};
}

/**
* Set ui state function.
* @function setUIState
* @param {Object} ui New ui state.
* @returns {Object} Set ui state action.
*/
export function setUIState(ui) {
return {
type: SET_UI_STATE,
ui,
};
}
2 changes: 1 addition & 1 deletion packages/volto/src/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export {
resetMetadataFocus,
setSidebarTab,
} from '@plone/volto/actions/sidebar/sidebar';
export { setFormData } from '@plone/volto/actions/form/form';
export { setFormData, setUIState } from '@plone/volto/actions/form/form';
export {
deleteLinkTranslation,
getTranslationLocator,
Expand Down
Loading
Loading