fix: allow experimental editors if component is installed regardless of feature state
This commit is contained in:
@@ -171,7 +171,7 @@ export const AttachedFilesPopover: FunctionComponent<Props> = observer(
|
||||
{currentTab === PopoverTabs.AttachedFiles ? 'Attach' : 'Upload'}{' '}
|
||||
files
|
||||
</Button>
|
||||
<div className="text-xs color-grey-0 mt-2">
|
||||
<div className="text-xs color-grey-0 mt-3">
|
||||
Or drop your files here
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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