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] Extending App to indicate the visibility of the app based on Workspace #6362

Closed
SuZhou-Joe opened this issue Apr 8, 2024 · 0 comments · Fixed by #6427
Closed
Assignees
Labels
enhancement New feature or request workspace

Comments

@SuZhou-Joe
Copy link
Member

SuZhou-Joe commented Apr 8, 2024

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

Home page, which is supposed to be only visited without workspace, now is able to be accessed by clicking the home icon or type the url manually in the browser. There are many other apps that may have the same issue: ISM plugin, alert plugin, security plugin etc. We need a mechanism to prevent user jumping into these non-workspace app within a workspace.

Describe the solution you'd like

Option A: Extending the app types by adding a new field workspaceAccessibility

/**
 * Visibilities of the application based on if user is within a workspace
 *
 * @public
 */
export enum WorkspaceAccessibility {
  /**
   * The application is not accessible when user is in a workspace.
   */
  NO = 0,
  /**
   * The application is only accessible when user is in a workspace.
   */
  YES = 1,
}

interface App<HistoryLocationState = unknown> {
   ...,
   /**
   * Declare if page is accessible when inside a workspace.
   * Defaults to undefined to indicate the application can be accessible within or out of workspace.
   */
  workspaceAccessibility?: WorkspaceAccessibility;
}
  • pros:

    • More clean and won't couple with existing status
  • cons:

    • Introducing a field in App.

Option B: Extending the status types by adding two new enums

export enum AppStatus {
  /**
   * Application is accessible.
   */
  accessible = 0,
  /**
   * Application is not accessible.
   */
  inaccessible = 1,
  /**
   * Application is not accessible in a workspace.
   */
  inaccessible_in_workspace = 2,
}
  • pros:

    • Less changes introduced on current system
  • cons:

    • Coupling workspace-specific status into App['status'].

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

#4944

@SuZhou-Joe SuZhou-Joe added the enhancement New feature or request label Apr 8, 2024
@SuZhou-Joe SuZhou-Joe self-assigned this Apr 9, 2024
@SuZhou-Joe SuZhou-Joe changed the title Extending App to indicate the visibility of the app based on Workspace [Workspace] Extending App to indicate the visibility of the app based on Workspace Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request workspace
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant