-
Notifications
You must be signed in to change notification settings - Fork 974
Conversation
4aebac9
to
4ac876a
Compare
@bradleyrichter in #2110 you added pencil at the end of the input. Can you please provide an icon for it, if we will use it. For now I set input to read only and when you click on it, dialog is shown automatically. |
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.
Two things I think:
-
@bradleyrichter can we get an icon for editing the path? It feels a little naked without it. Here's a demo:
-
@NejcZdovc Can we get some unit tests? Basically, it would be using the Enzyme library and extending our existing preferences tests to include these two new settings 😄
@bsclifton Sorry I added you as a review too soon. My mistake. This PR is not ready for a final review as you notice there is no test for this new feature. I added label |
@NejcZdovc SVG icon for the edit (pencil) button attached: |
8f3c718
to
bd77916
Compare
@NejcZdovc was this one done? (or still needing some work?) |
bd77916
to
34a0eb7
Compare
34a0eb7
to
f4656fb
Compare
@bsclifton I added test's as well, so we are ready for a review |
95b9397
to
f1f4ff1
Compare
04878a9
to
577422d
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.
Comment left; also added a commit for you to check out 😄 If you rework the action, LMK and I can re-review. Otherwise, you should be good to squash it and this'll be ready for merge
properties: ['openDirectory'] | ||
}, (folder) => { | ||
if (Array.isArray(folder) && fs.lstatSync(folder[0]).isDirectory()) { | ||
appActions.changeSetting(settings.DOWNLOAD_DEFAULT_PATH, folder[0]) |
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 think this is fine as-is... but it could be better as it's own discreet action (in the event that we'd like other reducers to be listening). Perhaps an action like defaultDownloadPathChanged
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.
actually- a few things I just noticed (was too focused on the code). Can you touch these up?
-
The pencil icon should probably change color when hovered. You should be able to look at other pages for an example (see the bookmarks manager for example).
-
The cursor for the pencil should be
pointer
I think, to be consistent with other controls. EDIT: it's OK as-is -
You can also add a
-webkit-user-select: none;
to prevent the text cursor icon from showing up when the mouse either gets near it or page is click and dragged (and mouse goes near pencil icon) EDIT: to be addressed after Refactor of paymentTab #7481 is merged
@bsclifton First of all sorry, I somehow over looked your second review. I added hover color effect. Regarding the pointer I remember talking with @bradleyrichter about it for bookmark manager and he said that we should use only color hover and not a pointer. Bookmark manager for example don't have single pointer hover, only color hover. I agree that we should be consistent, so we need a guide line for it. For user select I suggest to add it after #7481 is merged, because I added aphrodite param for component |
58e9152
to
a383e96
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.
@NejcZdovc I think the approach you're recommending is reasonable 😄
I did notice a problem. When testing on Windows, I noticed that the "Save As..." functionality no longer works. When choosing "Save As...", it should always prompt the user... since they are going to pick the filename to save
When I picked the "Save As" option, it immediately did the download without prompting
a383e96
to
c835413
Compare
Just for a reference, @bridiver added flag to handle "Save as" calls brave/muon@de90c69 |
js/about/aboutActions.js
Outdated
/** | ||
* Open dialog for default download path setting | ||
*/ | ||
defaultDownloadPath: function () { |
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.
these no longer have to go in aboutActions
and this file should be deprecated. Use appActions
for now instead
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.
Moved
this will need changes to correspond with my muon updates to correctly handle the prompt |
0488a54
to
d3881eb
Compare
Resolves brave#2110 Auditors: @bradleyrichter @bsclifton Test Plan: - go to preferences, general tab - define your default download path - toggle show dialog - based on your settings, download dialog should be opened or not - if you set don't show dialog, filse should be downloaded to your default set path # Added hover effect
d3881eb
to
88b44fd
Compare
@bsclifton added save prompt for save as. Ready for a review |
An area we can improve (cc: @bradleyrichter): If I have a long path, it gets clipped It looks the exact same in Chrome though, so not a deal-breaker or anything... just an area we could do better 😄 |
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.
Just tested changes out w/ the latest Muon prebuilt; things worked great 😄 ++++++
git rebase -i
to squash commits (if needed).Resolves #2110
Auditors
@bradleyrichter @bsclifton
Test Plan