Skip to content

Conversation

caponetto
Copy link

@caponetto caponetto commented Jun 11, 2025

Closes #359

In this PR:

  • Add WorkspaceKindSummary page that shows data according to filters
  • Go to WorkspaceKindSummary from WorkspaceKinds page with filters by namespace, Pod config and Image
  • Extract the workspace table into a reusable WorkspaceTable component
  • Isolate workspace actions into a dedicated context
  • Isolate table row actions into a dedicated hook
  • Add a polling mechanism to refresh workspace data (every 10s at the moment)
  • Add simple components for LoadError and LoadingState to be improved later
  • Add more workspaces to the mocked data so that the table is populated
  • Fix the response data of Pause/Start backend actions
  • Improve the Filter component to work with initial filters
  • Other minor adjustments

@paulovmr
Copy link

/ok-to-test

caponetto and others added 19 commits June 16, 2025 18:23
Signed-off-by: Guilherme Caponetto <[email protected]>
…b to workspace kinds details page (#2)

Signed-off-by: Paulo Rego <[email protected]>
Signed-off-by: Guilherme Caponetto <[email protected]>
- Introduced WorkspaceActionsContext to manage workspace actions such as view, edit, delete, start, restart, and stop.
- Created WorkspaceActionsContextProvider to encapsulate the context logic and provide it to child components.
- Implemented WorkspaceKindSummary and Workspaces components to utilize the new context for handling workspace actions.
- Added polling for refreshing workspaces at a default interval.
- Enhanced WorkspaceTable to support row actions for workspaces.
- Updated various components to include sortable and filterable data fields.
- Refactored WorkspaceStartActionModal and WorkspaceStopActionModal to handle optional onActionDone callback.
- Added loading and error handling components for better user experience.

Signed-off-by: Guilherme Caponetto <[email protected]>
…kspaces and WorkspaceKindSummary components

Signed-off-by: Guilherme Caponetto <[email protected]>
…workspace actions visibility in Workspaces component

Signed-off-by: Guilherme Caponetto <[email protected]>
Signed-off-by: Guilherme Caponetto <[email protected]>
…pabilities

- Added 'namespace', 'gpu', and 'idleGpu' columns to WorkspaceTable.
- Updated filtering logic to support new columns in WorkspaceTable.
- Refactored useWorkspaces hook to remove unnecessary parameters related to idle and GPU filtering.
- Modified WorkspaceKindSummary and its expandable card to utilize new filtering functionality.
- Updated WorkspaceUtils to include a method for formatting workspace idle state.
- Adjusted Filter component to support generic filtered column types.
- Updated Workspaces page to hide new columns as needed.

Signed-off-by: Guilherme Caponetto <[email protected]>
…g specific types for sortable columns

Signed-off-by: Guilherme Caponetto <[email protected]>
Signed-off-by: Guilherme Caponetto <[email protected]>
Signed-off-by: Guilherme Caponetto <[email protected]>
Copy link

@paulovmr paulovmr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@ederign
Copy link
Member

ederign commented Jun 17, 2025

@caponetto, do you mind including some screenshots/video in the next PRs?

@ederign
Copy link
Member

ederign commented Jun 17, 2025

/lgtm
/approve

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ederign

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 09f8f37 into kubeflow:notebooks-v2 Jun 17, 2025
7 checks passed
@github-project-automation github-project-automation bot moved this from Needs Triage to Done in Kubeflow Notebooks Jun 17, 2025
bhaktinarvekar pushed a commit to bhaktinarvekar/notebooks that referenced this pull request Sep 14, 2025
…nd it (kubeflow#415)

* Minor refactorings and initial work for the Workspace Kind summary page

Signed-off-by: Guilherme Caponetto <[email protected]>

* feat(ws): added links from workspace kind details drawer to workspace kinds details page (kubeflow#1)

Signed-off-by: Paulo Rego <[email protected]>

* Enable workspace filtering by namespace in the WorkspaceKind summary page

Signed-off-by: Guilherme Caponetto <[email protected]>

* Update Pause/Start action response types according to backend

Signed-off-by: Guilherme Caponetto <[email protected]>

* Fix WorkspaceKind logo href

Signed-off-by: Guilherme Caponetto <[email protected]>

* Replace placeholders for GPU data with real values in WorkspaceKind summary page

Signed-off-by: Guilherme Caponetto <[email protected]>

* Allow columns to be hidden in the WorkspaceTable

Signed-off-by: Guilherme Caponetto <[email protected]>

* feat(ws): added links from workspace kind details drawer namespace tab to workspace kinds details page (kubeflow#2)

Signed-off-by: Paulo Rego <[email protected]>

* Improve types around Filter component

Signed-off-by: Guilherme Caponetto <[email protected]>

* feat: Add Workspace Actions Context and related components

- Introduced WorkspaceActionsContext to manage workspace actions such as view, edit, delete, start, restart, and stop.
- Created WorkspaceActionsContextProvider to encapsulate the context logic and provide it to child components.
- Implemented WorkspaceKindSummary and Workspaces components to utilize the new context for handling workspace actions.
- Added polling for refreshing workspaces at a default interval.
- Enhanced WorkspaceTable to support row actions for workspaces.
- Updated various components to include sortable and filterable data fields.
- Refactored WorkspaceStartActionModal and WorkspaceStopActionModal to handle optional onActionDone callback.
- Added loading and error handling components for better user experience.

Signed-off-by: Guilherme Caponetto <[email protected]>

* feat: Add buildWorkspaceList function and integrate into mockAllWorkspaces

Signed-off-by: Guilherme Caponetto <[email protected]>

* refactor: Update mock data and formatting for workspace activity timestamps

Signed-off-by: Guilherme Caponetto <[email protected]>

* feat: Implement usePolling hook and refactor workspace actions in Workspaces and WorkspaceKindSummary components

Signed-off-by: Guilherme Caponetto <[email protected]>

* refactor: Update column key usage in ExpandedWorkspaceRow and adjust workspace actions visibility in Workspaces component

Signed-off-by: Guilherme Caponetto <[email protected]>

* Make mocked workspace list deterministic

Signed-off-by: Guilherme Caponetto <[email protected]>

* feat: Enhance WorkspaceTable with additional columns and filtering capabilities

- Added 'namespace', 'gpu', and 'idleGpu' columns to WorkspaceTable.
- Updated filtering logic to support new columns in WorkspaceTable.
- Refactored useWorkspaces hook to remove unnecessary parameters related to idle and GPU filtering.
- Modified WorkspaceKindSummary and its expandable card to utilize new filtering functionality.
- Updated WorkspaceUtils to include a method for formatting workspace idle state.
- Adjusted Filter component to support generic filtered column types.
- Updated Workspaces page to hide new columns as needed.

Signed-off-by: Guilherme Caponetto <[email protected]>

* refactor: Improve sorting functionality in WorkspaceTable by utilizing specific types for sortable columns

Signed-off-by: Guilherme Caponetto <[email protected]>

* Adjustments after rebase

Signed-off-by: Guilherme Caponetto <[email protected]>

* Format with prettier

Signed-off-by: Guilherme Caponetto <[email protected]>

---------

Signed-off-by: Guilherme Caponetto <[email protected]>
Signed-off-by: Paulo Rego <[email protected]>
Co-authored-by: Paulo Rego <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants