-
Notifications
You must be signed in to change notification settings - Fork 974
Add "view all" option to download bar #9093
Conversation
Style the button with Aphrodite in BEM style
@cezaraugusto actually not completely. the timing (viewport width) when the downloaded item should be hidden needs fixing. I just fixed the alignment of the close and show all button. |
Yes, the problem I mentioned with a gif still has not been fixed. It would help if I knew where the logic of unmounting of download items is written. |
so calculation to show/hide items takes into account the downloadBar button -- in fact the close ( With the change proposed here, we should take into account the For me, the total size including view all option seems to be around |
btw calculation is defined here: https://github.com/brave/browser-laptop/blob/master/app/renderer/components/download/downloadsBar.js#L34 but I think there's no need to change anything there |
Thanks for the pointing out the direction. I will test it. |
url: 'about:downloads' | ||
}) | ||
windowActions.setDownloadsToolbarVisible(false) | ||
webviewActions.setWebviewFocused() |
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.
btw I think this method is not needed
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 mean these two lines:
windowActions.setDownloadsToolbarVisible(false)
webviewActions.setWebviewFocused()
?
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.
only webviewActions.setWebviewFocused()
. For parity, we should auto-hide the downloads bar after clicking "show all", as you did above.
All the problems have been fixed now. Thanks for all the help. |
the thing is the value varies on every language. the total width requires l10n viewpoint. |
@luixxiul yes that's correct. We'll need then to get @Abs-Zero is this do-able to do? don't want to add extra work so ok if not I can jump in and add these changes. Let me know if you need something from us. |
@cezaraugusto we should really avoid using |
@cezaraugusto Yup, I have pushed a commit using |
|
@NejcZdovc your assumption is correct re method will be called each time window is resized. But the way downloadsBar items behave is for parity with Chrome. There's no CSS-only way to emulate the same mechanism without cutting off some element -- which would lead us to bad UI. I think this addition is very cool, even more coming from a contributor. While I agree with you that adding more and more listeners for window resize would lead us to perf decrease I think it is still too small for this change and if I'm wrong, we can always roll back or even ask Brad for a new spec in downloadsBar. |
@cezaraugusto We are now fixing a lot of perf problems and we don't want to introduce new ones. Maybe it looks like a small one, but adding a lot of small ones we get a big problem. |
@NejcZdovc in that case please don't forget to change lang settings to see your fix is avoiding l10n issues, which are also the big problem. thanks! Stepping away from pixels to align stuff is the golden rule you should never forget (#2096, #5726 and #8954). I tried to find a pure CSS solution but I couldn't. I assume removing the fixed width of a downloaded item would be that way. |
@luixxiul I am just finishing pause download PR and I will take a look at this one. Thanks for the heads up regarding l10n. |
@NejcZdovc it should work the same way as currently but including a new element ("view all" button). You can also take a look at how Chrome does it, which is the same way as we do. The first fix I suggested in #9093 (comment) was simple and inexpensive, css-only. However @luixxiul reminded that locale may change button's size, so any value we add would be just a guess. |
If perf is going to be a problem, can we not call |
@luixxiul Sorry for the broken commit earlier. I did not encounter that error before maybe because a cached bundle was being used. |
hey @Abs-Zero thanks for fixing that. can you revert 3219cf2 (but keeping That said, once done that change it looks good for me, thanks! |
Done. 😃 |
Thanks for working hard on this @Abs-Zero (and huge thanks @cezaraugusto, @luixxiul, and @NejcZdovc for the assists). This will be a great touch when it's all wrapped up 😄 👍 |
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.
this looks very good. thanks for the help and looking forward to your next contribution ++
Resolve #9090
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
Tests
Description
This tries to resolve issue #9090. The solution is still incomplete.
Before:
After:
Problem
However, a new problem arose with responsiveness.
I do not have any idea where in the code and how this hiding of download items is being done. So, I hope I could use some help from here.