Skip to content
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] Use registered nav group as workspace use cases #7222

Closed
wanglam opened this issue Jul 11, 2024 · 0 comments
Closed

[Workspace] Use registered nav group as workspace use cases #7222

wanglam opened this issue Jul 11, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@wanglam
Copy link
Contributor

wanglam commented Jul 11, 2024

Is your feature request related to a problem? Please describe.

This is a features request. The new concept of nav group was been introduced in #7060 . The workspace use cases should follow these registered nav groups when nav group enabled. These nav groups should be displayed as use case card in the workspace form except the system nav groups. For workspace selected use cases, all features under these use cases and all features under systematic use cases should be accessible.

Describe the solution you'd like

  • Add availableUseCases property to WorkspaceUseCase
    For now there are a set of static use cases inside workspace form. The WorkspaceUseCase component will import these static use cases and filter them by the available applications in current OSD. This filter logic only works when nav group disabled. It should be moved to outside. The availableUseCases will be added to the WorkspaceUseCase component. It will includes all available use cases in OSD. The WorkspaceUseCase need to filter out systematic use case and render all cases as card. All other behaviors are the same as before.

  • Add UseCaseService
    Add a new UseCaseService, this service will provide a getRegisterUseCases$ in the start method response. The getRegisterUseCases$ method will return a observable object of static use cases filter by available applications when nav group disabled. It will call getNavGroupsMap$ in chrome.navGroup to get an observable nav groups map when nav group enabled. Then it will convert nav group to workspace use case and sort by order. The workspace use cases will be return as registered use cases.

  • Pass availableUseCases to WorkspaceUseCase
    The workspace plugin will add a new UseCaseService instance. It will call the getRegisterUseCases$ method of use case instance and store the registerUseCases$ in workspace plugin. The registerUseCases$ will be passed to workspace create, update and overview page and be used in the WorkspaceUseCase component.

  • Set features of use cases accessible
    The isAppAccessibleInWorkspace was been used to determine if one application was accessible in workspace. It's using the static use cases to check if feature in specific use case. The isAppAccessibleInWorkspace should add a new use cases parameter, all the registered use cases should passed to it. Beside this, the app updater should add a new logic to check if it's a systematic use case. All features under systematic use cases should be accessible.

Describe alternatives you've considered

N/A

Additional context

#4944
#7027

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant