fix: only show loading in FileSelectComponent when listing files#3157
fix: only show loading in FileSelectComponent when listing files#3157dl-alexandre wants to merge 9 commits into
Conversation
|
Only one nitpick and we're good to go |
|
Hi @aleDsz and @jonatanklosko, Thank you both for the thorough reviews! I've addressed the feedback: Changes made:
Regarding testing the intermediate Please let me know if you'd like any additional changes! |
|
@dl-alexandre Could you rebase your PR with the main branch? Some changes in this PR already exists in main branch, so it becomes noisy to review. |
d1d6740 to
d349ea1
Compare
|
@@aleDsz Done! I've rebased the PR with the main branch. What was cleaned up:
Files changed:
The PR is now clean and ready for review! |
|
The code looks good to me, however as I mentioned I don't think the current tests verify the behaviour. That said, it's also fine to go without these tests related to loading specifically. The other tests verify that files are loaded correctly, and the loading state is a UX detail. |
d349ea1 to
162fb51
Compare
|
@aleDsz @jonatanklosko Thank you both for the thorough reviews. The PR has been rebased and cleaned up: Addressed feedback:
Regarding test coverage of loading state: The PR is now clean with only 2 files changed. Ready for another look when you have a moment. |
Moves loading state management from event handlers into update_file_infos/2 to ensure loading indicator only appears when actually fetching directory listings, not when running_files changes (e.g., notebooks start/stop). - Remove upfront loading assignments in set_file_system and set_path - Set loading only when dir != current_dir in update_file_infos - Add tests for loading behavior with directory vs running_files changes Fixes livebook-dev#3111
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
162fb51 to
d89b3fe
Compare
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
…nt (addresses review feedback on loading state management)
|
Thanks for the detailed review @jonatanklosko and @aleDsz! Reordered loading: true assignment before start_async per the suggestion (now explicit at the start of the pipe). Other points noted; loading behavior is scoped to this component as intended by the PR. PTAL on the update. |
Ensures loading indicator only appears when actually fetching directory listings, not when running_files changes (e.g., notebooks start/stop).
Fixes #3111