Go to file
jordi fita mas 7e0b57c2e4 Add header with “pinned items”
I only wanted to have a button to open and close the sidebar, like
“regular” site editor does in WordPress.  Apparently, this is done via
a “pinned” slot/fill thing, that make the visibility of that button a
user decision, by default—WordPress removes the pin button to avoid
that.

The thing is that it does not work: ComplementaryArea adds a
ComplementaryAreaToggle in the PinnedItems fill, and that toggle is a
button-like compenent that calls enableComplementaryArea or
disableComplementaryArea on the interface store, however
disableComplementaryArea does **not** update the interface store,
instead updates preferences, meaning that the useSelect inside the
toggle, that only subscribes to the interface store, is never called
when the area is disabled, and can not be enabled again with that
toggle button.

I worked around the issue by adding

dispatch({
    type: 'ENABLE_COMPLEMENTARY_AREA',
    scope,
    area: undefined
 });

at the end of disableComplementaryArea.  I suspect this is not the
proper solution, and that there must be another way, because WordPress
does not exhibit that behaviour, however it signals that there _is_ an
error in the library, but i could not find any bug report within the
5k+ issues currently reported to Gutenberg’s project.

For now, it will do.
2024-06-15 03:40:14 +02:00
cmd/tipus Add the minimal golang web application to login users 2023-06-04 23:59:50 +02:00
deploy Add authentication relations, views, and functions for PostgreSQL 2023-06-04 22:45:44 +02:00
editor Add header with “pinned items” 2024-06-15 03:40:14 +02:00
pkg Add Isolated Block Editor to build our own Gutenberg-based editor 2023-06-09 14:18:10 +02:00
po Try to localize Gutenberg to Spanish, as an i18n test 2023-06-11 03:50:35 +02:00
revert Add authentication relations, views, and functions for PostgreSQL 2023-06-04 22:45:44 +02:00
test Add authentication relations, views, and functions for PostgreSQL 2023-06-04 22:45:44 +02:00
verify Add authentication relations, views, and functions for PostgreSQL 2023-06-04 22:45:44 +02:00
web Add Isolated Block Editor to build our own Gutenberg-based editor 2023-06-09 14:18:10 +02:00
.gitignore Replace isolated-block-editor in favor of @wordpress/block-editor 2024-06-14 03:24:07 +02:00
COPYING Add GPLv3 license text 2023-06-04 20:58:17 +02:00
Makefile Try to localize Gutenberg to Spanish, as an i18n test 2023-06-11 03:50:35 +02:00
go.mod Add the minimal golang web application to login users 2023-06-04 23:59:50 +02:00
go.sum Add the minimal golang web application to login users 2023-06-04 23:59:50 +02:00
package-lock.json Set icon to sidebar’s complementary area 2024-06-15 03:37:34 +02:00
package.json Set icon to sidebar’s complementary area 2024-06-15 03:37:34 +02:00
sqitch.conf Add authentication relations, views, and functions for PostgreSQL 2023-06-04 22:45:44 +02:00
sqitch.plan Add authentication relations, views, and functions for PostgreSQL 2023-06-04 22:45:44 +02:00
vite.config.mjs Replace isolated-block-editor in favor of @wordpress/block-editor 2024-06-14 03:24:07 +02:00