fix: allow experimental editors if component is installed regardless of feature state
This commit is contained in:
@@ -34,8 +34,6 @@ export type EditorMenuItem = {
|
||||
name: string;
|
||||
component?: SNComponent;
|
||||
isEntitled: boolean;
|
||||
isExperimental: boolean;
|
||||
isExperimentalEnabled: boolean;
|
||||
};
|
||||
|
||||
export type EditorMenuGroup = AccordionMenuGroup<EditorMenuItem>;
|
||||
|
||||
@@ -223,10 +223,6 @@ export const ChangeEditorMenu: FunctionComponent<ChangeEditorMenuProps> = ({
|
||||
selectEditor(item);
|
||||
};
|
||||
|
||||
if (item.isExperimental && !item.isExperimentalEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
return (
|
||||
<MenuItem
|
||||
type={MenuItemType.RadioButton}
|
||||
|
||||
@@ -41,8 +41,6 @@ export const createEditorMenuGroups = (
|
||||
{
|
||||
name: PLAIN_EDITOR_NAME,
|
||||
isEntitled: true,
|
||||
isExperimental: false,
|
||||
isExperimentalEnabled: false,
|
||||
},
|
||||
],
|
||||
'rich-text': [],
|
||||
@@ -69,13 +67,6 @@ export const createEditorMenuGroups = (
|
||||
editorItems[getEditorGroup(editorFeature)].push({
|
||||
name: editorFeature.name as string,
|
||||
isEntitled: false,
|
||||
isExperimental: application.features.isExperimentalFeature(
|
||||
editorFeature.identifier
|
||||
),
|
||||
isExperimentalEnabled:
|
||||
application.features.isExperimentalFeatureEnabled(
|
||||
editorFeature.identifier
|
||||
),
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -87,12 +78,6 @@ export const createEditorMenuGroups = (
|
||||
isEntitled:
|
||||
application.features.getFeatureStatus(editor.identifier) ===
|
||||
FeatureStatus.Entitled,
|
||||
isExperimental: application.features.isExperimentalFeature(
|
||||
editor.identifier
|
||||
),
|
||||
isExperimentalEnabled: application.features.isExperimentalFeatureEnabled(
|
||||
editor.identifier
|
||||
),
|
||||
};
|
||||
|
||||
editorItems[getEditorGroup(editor.package_info)].push(editorItem);
|
||||
|
||||
Reference in New Issue
Block a user