-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
File dialog Enhancements #8748
File dialog Enhancements #8748
Conversation
cf9db8b
to
fbc77c3
Compare
packages/filesystem/src/browser/file-dialog/file-dialog-model.ts
Outdated
Show resolved
Hide resolved
Very nice work, and a vast improvement over the current dialog. Some thoughts on the functionality:
|
Thanks for taking a look @colin-grant-work. I agree with your requests on keeping the icon around in both input fields, and also adding automatic toggle to input mode when the user starts typing. |
7fd234e
to
ca0b37b
Compare
ca0b37b
to
6de2965
Compare
I've pushed a new revision that changes the input behavior to autosuggest the closest matched directory. Additionally I've addressed your comments above:
@colin-grant-work would you mind taking another look when you have a chance? |
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.
Working very nicely. I have a few minor comments about the code, but I think the functionality is all in place.
7e99b8c
to
a194c8c
Compare
b5c2cee
to
f707600
Compare
@vince-fugnitto thanks for the review, I have addressed your comments as follows:
I have updated the changelog with the next release 👍
I have added variable names for new rules that I have introduced (where acceptable) and also updated some existing rules that were relevant
Thanks for pointing this out, I've made some slight adjustments to the |
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.
The changes work very well, I tried multiple different use-cases and they all seem correctly handled. If possible I'd like someone else to review as well to see if I may have missed something during the review.
f707600
to
03528ba
Compare
Pulled the code to have another look and found that I'm not getting any focus behavior as I tab through the buttons. There's a rule to that effect on master and in the new code:
But I'm not sure that's desirable? Perhaps this rule should only apply, like this one, when those buttons are disabled:
Otherwise it looks and feels good. Fix the conflict in the CHANGELOG, and it should be good to go. |
03528ba
to
09aa93f
Compare
I've rebased and fixed the changelog, also made some modifications to the CSS to allow the toolbar elements to apply focus only when enabled. See below: The focus is only applied when an enabled toolbar item is clicked or tabbed too. Note that the focus border stays visible until something else is focused (even on click). For accessibility reasons, this is nice, but it's not necessarily pretty. @vince-fugnitto do you have any input on how to best handle focusing toolbar items in Theia? It seems that in some places focus is applied on click, and not in others. Also note that on master there is no focus behavior for the file dialog toolbar items. |
@kenneth-marut-work @colin-grant-work I'm agree with you that the toggle.movAs for feedback.mov |
09aa93f
to
3a81f56
Compare
@vince-fugnitto thanks for the suggestions, both are great ideas. I went ahead and pushed a change that includes:
@colin-grant-work and @vince-fugnitto let me know what you think. I know that there is still room to improve the file dialog, but I don't want to go too far beyond the scope of this MR 🙂 |
I think it looks much better, happy the suggestion was useful! 👍 I'll perform another round of review just to be sure that everything works as intended. |
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.
The changes look good to me 👍
3a81f56
to
f3191b0
Compare
const latestInput = this.pendingResolvedDirectories.get(directoryToResolve)?.input || ''; | ||
const childDirectories = children.filter(child => child.isDirectory) | ||
.map(directory => `${directory.resource.path}/`) | ||
.sort(); |
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.
Do they come out of (alphabetical) order to begin with? Usually fs.readDir
returns things in alphabetical order, but perhaps resolve
behaves differently.
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.
You're right, I've removed .sort()
f3191b0
to
d47c8ff
Compare
Thanks for the comments @colin-grant-work. I've made some changes that address your issues. I've tested in both low and high latency |
The new changes look good to me 👍 |
- Add text input to locationList Renderer - Add 'navigate upward' icon - Fix icon focus behavior when disabled Signed-off-by: Kenneth Marut <kenneth.marut@ericsson.com>
d47c8ff
to
4cd3cde
Compare
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.
I verified the changes and they work really well 👍
I found a future improvement which can be made for both macos and linux. The idea to support ~
as a replacement for the user's home when editing the path (which is something that is supported in the native dialog).
Thanks for the review, I'm going ahead with the merge and I'll create an issue regarding the |
Signed-off-by: Kenneth Marut kenneth.marut@ericsson.com
What it does
Fixes: #2815
Addresses #2815 by improving the browser file dialog to allow for absolute path text input (with directory auto suggestion) in addition to the existing select input , also adds a new icon to "Navigate Upward" and fixes minor styling issue with navigation icon focus on enabled/disabled states. Tested on Linux and Windows.
How to test
Review checklist
Reminder for reviewers