When I create a new block list data type with “inline mode” turned off, and I click the “Add …” button, it still brings up the catalog to select which type of block even though there is only one available. Here’s an image after creating a fresh install and adding a couple properties:
I narrowed the issue to here in src/Umbraco.Web.UI.Client/src/packages/block/block-list/context/block-list-entries.context.ts
getPathForCreateBlock(index: number) {
const pathBuilder = this._catalogueRouteBuilderState.getValue();
if (!pathBuilder) return undefined;
if (!this._manager) return undefined;
const blockTypes = this._manager.getBlockTypes();
if (blockTypes.length === 1) {
if (this._manager.getInlineEditingMode()) {
return undefined;
}
}
return pathBuilder?.({ view: 'create', index: index });
}
Why does it skip creating the path only for the inline editing mode? I would think if there is only one option it should just skip that screen for both options. Is this intentional or a bug?
I am constrained to not using inline mode because of a separate issue: Newly added block renders empty until collapse/expand in nested block list · Issue #22444 · umbraco/Umbraco-CMS · GitHub
