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
Provider views rewrite (.files, .folders => .partialTree) #5050
base: main
Are you sure you want to change the base?
Conversation
GoogleDrive - travelling down into folders works - checking a file works - breadcrumbs DONT work
…tead of `ourItem`
Just makes it easier to read the structure of TagFile
(remove the dependency on provider, just pass a callback)
…l order in tests
…owser/> to avoid repetition
Moves stuff closer to where it's used, prevents props drilling
When it's set to 5 pages you have to reduce the browser window to make it scrollable
@nqst, as per our call - I will describe my questions about restrictions UI. Situation 1
I check a folder that has 4 files in it, but we don't yet know about it. I open that folder, and we find out that it has 4 files inside! What should happen here. My ideas:
Situation 2
I check a folder, which has thousands of files in it. I don't yet know how many - we will discover it upon scrolling. I open it, and all files are marked as checked. As I keep scrolling, we stumple upon the 2000ths file. Situation 3
I check some folders. I never open any of these folders, and we do not know how many files there are. I click "Select (2)". There are 1000 files inside of those folders, which violates our restrictions. My ideas:
Situation 4
I check 1 file. and then I shift-click to the 5th file What should happen? Situation 5
I check 3 files. What should happen, should other checkboxes grey out like they currently do? How to play with it locallyYou can checkout this branch to play with it if it helps! I set GoogleDrive's page limit to 10 files so that it's easy to test both the scrolling behaviour and opening the folder behaviour. |
Won't we eliminate a whole set of problems and a lot of code complexity by simply not allowing folders to be checked? Instead we offer a "select all" checkbox which checks as many as possible within the current folder up until the limit with the current sorting? I feel like we starting to over-engineer this, causing many different UI states which are more confusing to the user to figure out than the likelihood of them wanting to select entire folders. Ideally we design for the 80% use case, and I think that's selecting individual files. |
@Murderlon, disagreed, people clearly use folder selection, see all the discussions about relativePath vs absolutePath. Also - I regularly use folder selection in the wild myself, for example when you're uploading your assignment on university websites, they expect a particular folder structure to be kept. |
Sounds like it's getting a bit complicated now. Maybe for simplicity of implementation we could:
|
First want to say that thanks for putting in big effort of cleaning this up AND writing a lot tests ✨ If we want to keep folder selection, I would follow these options Situation 1: max files set to 3, you select a folder & then open it, it has 4 files. Situation 2: identical to situation one from my understanding. Situation 3: I click "Select (2)". There are 1000 files inside of those folders, which violates our restrictions. Situation 5: should checkboxes be disabled once you reach the limit. I do think it's essential however to break this PR up into smaller PRs. I understand this made sense to experiment and find a direction, but once we have that I expect this to be four PRs or so. For instance:
It will be too hard to review otherwise I'm afraid. |
fixes #5000, fixes #4609, fixes #4414, fixes #5063
Description
enables indeterminate checkmark states
enables folder caching
fixes the issue where Unsplash was only loading one page
removed two-way binding in
onFirstRender
(not a backwards-compatible change, but only for people with custom providers)addresses this Remote file paths #4537 (comment),
absDirPath
andrelDirPath
are injected in a single placenOfSelectedFiles
is as smart as it gets nowfixes the UI issue where shift-clicking files gets them highlighted:
fixes the way shift-clicking works in grid providers such as Instagram/Unpslash
makes the GoogleDrive's VIRTUAL_SHARED_DIR checkable (see this discussion https://transloadit.slack.com/archives/C0FMW9PSB/p1714529071856209)
TODO
Not adding ${filesAlreadyAdded.length} files because they already exist
" notification messages, properly translate them in the locales.loadAllFiles: false
&limit: 5
from providers when preparing for a reviewconsole.log
sFuture TODOs
Notes to reviewers