Commit 64f7bfe
authored
feat: mo.ui.file_browser show spinner when listing is slow (#7155)
## 📝 Summary
Adds a spinner to `mo.ui.file_browser` if listing files takes more than
200ms.
## 🔍 Description of Changes
I was using `mo.ui.file_browser` with S3, browsing a medium size
directory and the initial load takes something like 20 seconds without
any indication for what's happening. Felt a bit broken so this changes
that.
The delay is there to avoid flashing the spinner when listing is quick.
Here's a demo with the change:
https://github.com/user-attachments/assets/b68722e9-d157-4342-befc-090f5b367d4a
## 📋 Checklist
- [x] I have read the [contributor
guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md).
- [ ] For large changes, or changes that affect the public API: this
change was discussed or approved through an issue, on
[Discord](https://marimo.io/discord?ref=pr), or the community
[discussions](https://github.com/marimo-team/marimo/discussions) (Please
provide a link if applicable).
- [ ] I have added tests for the changes made.
- [x] I have run the code and verified that it works as expected.
I have read the CLA Document and I hereby sign the CLA.1 parent 46f6719 commit 64f7bfe
1 file changed
+30
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| 149 | + | |
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
| |||
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
| 158 | + | |
156 | 159 | | |
157 | | - | |
158 | | - | |
159 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
160 | 174 | | |
161 | 175 | | |
162 | 176 | | |
| |||
459 | 473 | | |
460 | 474 | | |
461 | 475 | | |
462 | | - | |
| 476 | + | |
463 | 477 | | |
| 478 | + | |
| 479 | + | |
464 | 480 | | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
465 | 490 | | |
466 | 491 | | |
467 | 492 | | |
| |||
0 commit comments