Skip to content

Add showOpenButton/showCreateButton/showRefreshButton props to BAIVFolderSelect #7467

@agatha197

Description

@agatha197

Port the action-button props (showOpenButton, showCreateButton, showRefreshButton) from react/src/components/VFolderSelect.tsx onto the shared BAIVFolderSelect fragment in backend.ai-ui. Wire them in the deployment add-revision modal so both preset and advanced (custom) modes get the same open / create / refresh affordances next to the model folder picker.

Why This Work is Needed

BAIVFolderSelect is the canonical vfolder picker in the design system, but it lacked the three action buttons that the legacy VFolderSelect exposes. Without them, screens that adopt BAIVFolderSelect (e.g. the deployment add-revision modal scoped in FR-2914) regress compared to the older picker — users can't jump into the folder explorer, create a new model folder, or refresh the list without leaving the modal.

Expected Outcomes

  • BAIVFolderSelect accepts the same three boolean props (showOpenButton, showCreateButton, showRefreshButton) and renders the matching buttons in a Space.Compact next to the select.
  • Open button writes the selected folder UUID to the folder URL search param (mimics useFolderExplorerOpener).
  • Create button opens FolderCreateModalV2 pre-filled with usage_mode: 'model'; on success the list refetches.
  • Refresh button re-fetches the paginated query under a transition.
  • Storybook docs and a new WithActionButtons story document the new props.
  • i18n keys added to all 21 backend.ai-ui locale files.
  • Both BAIVFolderSelect usages in DeploymentAddRevisionModal.tsx pass the three new flags.

JIRA Issue: FR-2915

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions