-
Notifications
You must be signed in to change notification settings - Fork 917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Workspace] fix apps are missing when updating a workspace #6459
Changes from all commits
8e5930a
79da6af
f3cbe9a
0cf8afe
9334f20
72baa1d
e4b5b5a
e34e02c
7d84f03
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,21 +19,20 @@ import { PublicAppInfo } from '../../../../../core/public'; | |
import { isWorkspaceFeatureGroup, convertApplicationsToFeaturesOrGroups } from './utils'; | ||
|
||
export interface WorkspaceFeatureSelectorProps { | ||
applications: Array< | ||
Pick<PublicAppInfo, 'id' | 'title' | 'category' | 'chromeless' | 'navLinkStatus'> | ||
>; | ||
selectedFeatures: string[]; | ||
onChange: (newFeatures: string[]) => void; | ||
workspaceConfigurableApps?: PublicAppInfo[]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems we only need id, title and category for workspaceConfigurableApps here. Could we change to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually I don't see a strong need to turn it into I'm not holding a strong opinion, what else concerns do you have? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not a big issue. We can keep current implementation. |
||
} | ||
|
||
export const WorkspaceFeatureSelector = ({ | ||
applications, | ||
selectedFeatures, | ||
onChange, | ||
workspaceConfigurableApps, | ||
}: WorkspaceFeatureSelectorProps) => { | ||
const featuresOrGroups = useMemo(() => convertApplicationsToFeaturesOrGroups(applications), [ | ||
applications, | ||
]); | ||
const featuresOrGroups = useMemo( | ||
() => convertApplicationsToFeaturesOrGroups(workspaceConfigurableApps ?? []), | ||
[workspaceConfigurableApps] | ||
); | ||
|
||
const handleFeatureChange = useCallback<EuiCheckboxGroupProps['onChange']>( | ||
(featureId) => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the applications only need id, title and category. Can we remove navLinkStatus and chromeless?