Commit Graph

7 Commits

Author SHA1 Message Date
jordi fita mas e39ee28b9f Move enableComplementaryArea call to Sidebar
It makes more sense, i believe, to enable the sidebar complementary
area from within the sidebar component, as this is called when the
component is included in the hierarchy.

I also moved the scope string to a constants file, so i can find where
it is used with code analysis instead of relaying on grep.
2024-06-15 03:37:34 +02:00
jordi fita mas b6665b67ba Always show the sidebar 2024-06-15 01:48:12 +02:00
jordi fita mas 9916afc768 Add the side bar with all the “complementary area” added complexity 2024-06-14 20:36:37 +02:00
jordi fita mas 79bdee916b Add a missing parameter to useSelect call 2024-06-14 19:41:17 +02:00
jordi fita mas 26e3268579 Use InterfaceSkelete to start building a WordPress-like editor
I want this only to later on show the sidebars with the inserter and
inspector, but for now, since i do not understand yet how i am
supposed to use ComplementaryArea, i add the interface with the
breadcrumb at the bottom.

The FullscreenMode block is to “cancel out” the 160px margin on the
left, and 32px on the top, that @wordpress/interface’s style add by
default.
2024-06-14 18:04:59 +02:00
jordi fita mas bd237d43e5 Remove a console.log call 2024-06-14 17:37:36 +02:00
jordi fita mas 88025b57a4 Replace isolated-block-editor in favor of @wordpress/block-editor
Despite the fact that Gutenberg developers did not care at all about
uses of this library outside WordPress until last year[0], and that it
is almost impossible to do something that goes beyond the very basic
without using “private APIs”, they insist that the isolated block
editor should be “deprecated”[1].

I do not particularly care much about the isolated block editor, as it
_does_ use all these private APIs and, thus, it is very difficult to
use unless you use the exact same dependencies, otherwise it emits a
weird error regarding “unlocking” things that are not “locked” (i.e.,
the new-fangled way of “protecting” private APIs[2]).  And,
apparently, things got easier with Gutenberg 18.5 with the
introduction of the BlockCanvas.

However, it is still a very frustrating experience, and the
documentation for most components and packages is next to
non-existent.

Nevertheless, i managed to get a barely functional editor that still
has some missing features, like the color of rich texts’ highlight
format[3], but it i believe it is a good base to grow the custom
editor on top of.

[0]: https://github.com/WordPress/gutenberg/issues/53874
[1]: https://github.com/WordPress/gutenberg/issues/57672#issuecomment-1883119040
[2]: https://developer.wordpress.org/block-editor/reference-guides/packages/packages-private-apis/
[3]: https://github.com/WordPress/gutenberg/issues/55036
2024-06-14 03:24:07 +02:00