When the command palette is built without a prescribed list of commands, the horizontal rule is added to the list of entity types, if it is configured via enableHorizontalRule. If the command palette is built by passing a list of commands, though, enableHorizontalRule is ignored and the HR is not added to the list of entity types.
This seems inadvertent and causes the HR to get dropped even if it has been configured. This seems to be the cause of https://github.com/wagtail/wagtail/issues/9707, unless I am misunderstanding how this code is supposed to work.
The fix in Wagtail's bakerydemo:
Before
After
(Note: there is likely a DRYer way to implement this without repeating code from above, but my TypeScript skills are pretty basic. Any better suggestions would be appreciated!)
When the command palette is built without a prescribed list of commands, the horizontal rule is added to the list of entity types, if it is configured via
enableHorizontalRule
. If the command palette is built by passing a list of commands, though,enableHorizontalRule
is ignored and the HR is not added to the list of entity types.This seems inadvertent and causes the HR to get dropped even if it has been configured. This seems to be the cause of https://github.com/wagtail/wagtail/issues/9707, unless I am misunderstanding how this code is supposed to work.
The fix in Wagtail's bakerydemo:
(Note: there is likely a DRYer way to implement this without repeating code from above, but my TypeScript skills are pretty basic. Any better suggestions would be appreciated!)