-
Notifications
You must be signed in to change notification settings - Fork 78
feat(FR-1695): improve BAIFileExplorer UX with refresh functionality and loading optimization #4664
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
feat(FR-1695): improve BAIFileExplorer UX with refresh functionality and loading optimization #4664
Conversation
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. |
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 55.12% (+5.49% 🔼) |
167/303 |
| 🔴 | Branches | 33.9% (+3.94% 🔼) |
99/292 |
| 🔴 | Functions | 43.84% (+10.5% 🔼) |
32/73 |
| 🔴 | Lines | 57.2% (+5.25% 🔼) |
151/264 |
Show new covered files 🐣
St.❔ |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| 🔴 | ... / matchMedia.mock.js |
50% | 100% | 0% | 50% |
| 🟢 | ... / useIntervalValue.tsx |
97.14% | 76% | 100% | 96.77% |
Test suite run success
62 tests passing in 4 suites.
Report generated by 🧪jest coverage report action from 71d1e09
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 4.46% | 517/11591 |
| 🔴 | Branches | 3.62% | 297/8210 |
| 🔴 | Functions | 2.59% | 92/3551 |
| 🔴 | Lines | 4.44% | 503/11338 |
Test suite run success
118 tests passing in 13 suites.
Report generated by 🧪jest coverage report action from 71d1e09
141bcc3 to
f030f7c
Compare
8ebf1de to
845dc36
Compare
agatha197
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ironAiken2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
845dc36 to
1b46ac6
Compare
f030f7c to
cfd868a
Compare
Merge activity
|
…and loading optimization (#4664) Resolves #4662 ([FR-1695](https://lablup.atlassian.net/browse/FR-1695)) ## Problem & Motivation Users frequently need to check for updated files in their virtual folders, especially after uploading files or when collaborating with others. Currently, BAIFileExplorer lacks an intuitive manual refresh mechanism, forcing users to close and reopen the modal or navigate away and back to see updated content. ## User Impact ### Before: - Users cannot easily verify if their file uploads completed successfully - Collaborators cannot see newly shared files without reopening the folder - The loading experience feels unresponsive and unclear - Users are unsure whether the file list is currently updating or showing stale data ### After: - Users can manually refresh at any time with a single click - Clear visual feedback shows when data was last updated (e.g., "Last Updated: 2 minutes ago") - Loading states are optimized: spinner for first load, subtle opacity change for refreshes - Users maintain context and control over their file browsing experience ## Changes 1. **Refresh Button Integration**: Added BAIFetchKeyButton to ExplorerActionControls with loading state feedback 2. **Loading State Optimization**: - Spinner loading for initial file list load - Opacity-based loading for subsequent refreshes - Distinguish between `isFirstFetching` and `isFetching` states 3. **Component Migration**: Moved BAIFetchKeyButton and useIntervalValue hooks to backend.ai-ui package for reusability 4. **i18n Support**: Added translations in 20+ languages following `comp:ComponentName.Key` pattern ## Test Plan - [ ] Verify refresh button appears in file explorer - [ ] Check that clicking refresh updates the file list - [ ] Confirm "Last Updated" timestamp displays correctly - [ ] Test initial loading shows spinner - [ ] Test refresh shows opacity change (not spinner) - [ ] Verify functionality works after file upload - [ ] Test in both light and dark themes [FR-1695]: https://lablup.atlassian.net/browse/FR-1695?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
cfd868a to
71d1e09
Compare

Resolves #4662 (FR-1695)
Problem & Motivation
Users frequently need to check for updated files in their virtual folders, especially after uploading files or when collaborating with others. Currently, BAIFileExplorer lacks an intuitive manual refresh mechanism, forcing users to close and reopen the modal or navigate away and back to see updated content.
User Impact
Before:
After:
Changes
isFirstFetchingandisFetchingstatescomp:ComponentName.KeypatternTest Plan