feat(FR-2915): add showOpen/showCreate/showRefresh buttons to BAIVFolderSelect#7468
Closed
agatha197 wants to merge 1 commit into
Conversation
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
4 tasks
Contributor
Coverage Report for backend-ai-ui-coverage (./packages/backend.ai-ui)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Contributor
Coverage Report for react-coverage (./react)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Resolves #7467 (FR-2915)
Summary
Adds the three action-button props (
showOpenButton,showCreateButton,showRefreshButton) from the legacyreact/src/components/VFolderSelect.tsxonto the sharedBAIVFolderSelectfragment inbackend.ai-ui, and wires them in both modes ofDeploymentAddRevisionModal.BAIVFolderSelectSpace.Compactwith up to three buttons next to the select.toLocalIdwhenvaluePropName === 'id') to thefolderURL search param (react-router-dom'suseSearchParams— mirrorsuseFolderExplorerOpener).FolderCreateModalV2(cross-package import, same pattern asBAIDynamicStepInputNumber) pre-filled withusage_mode: 'model'. On success the paginated query refetches under a transition.useFetchKey/startRefetchTransitionplumbing.WithActionButtonsstory.comp:BAIVFolderSelect.OpenFolder,CreateANewStorageFolder,Refreshto all 21backend.ai-uilocale files, reusing wording from the mainresources/i18ntranslations where they already exist.DeploymentAddRevisionModalBAIVFolderSelectusages (preset and advanced modes) now passshowOpenButton showCreateButton showRefreshButton.Stacked on top of #7465 (FR-2914 — scope add-revision model folder picker to the current project).
Test plan
Fragments/BAIVFolderSelectWithActionButtonsstory renders the three buttons next to the select.DeploymentAddRevisionModal(preset and advanced modes):FolderCreateModalV2; creating a new model folder refetches and the new folder appears in the list.?folder=<uuid>so the explorer opens that folder.