Bug 200977 - results.webkit.org: Move drawer to the right, open by default
Summary: results.webkit.org: Move drawer to the right, open by default
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-21 07:24 PDT by Jonathan Bedard
Modified: 2019-08-28 12:37 PDT (History)
8 users (show)

See Also:


Attachments
Patch (19.42 KB, patch)
2019-08-21 07:49 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
new-closed-drawer (86.80 KB, image/png)
2019-08-21 08:02 PDT, Jonathan Bedard
no flags Details
new-open-drawer (131.17 KB, image/png)
2019-08-21 08:03 PDT, Jonathan Bedard
no flags Details
old-closed-drawer (234.79 KB, image/png)
2019-08-21 08:03 PDT, Jonathan Bedard
no flags Details
old-open-drawer (86.01 KB, image/png)
2019-08-21 08:04 PDT, Jonathan Bedard
no flags Details
Patch (19.32 KB, patch)
2019-08-22 07:50 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (19.61 KB, patch)
2019-08-23 16:02 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (24.54 KB, patch)
2019-08-26 16:28 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (25.02 KB, patch)
2019-08-27 17:12 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (24.00 KB, patch)
2019-08-27 17:36 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (24.73 KB, patch)
2019-08-28 11:05 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2019-08-21 07:24:32 PDT
After discussing the drawer with bot watchers, we need to make some changes so that the drawer is more discoverable.
Comment 1 Jonathan Bedard 2019-08-21 07:49:21 PDT
Created attachment 376877 [details]
Patch
Comment 2 Jonathan Bedard 2019-08-21 08:02:50 PDT
Created attachment 376880 [details]
new-closed-drawer
Comment 3 Jonathan Bedard 2019-08-21 08:03:08 PDT
Created attachment 376881 [details]
new-open-drawer
Comment 4 Jonathan Bedard 2019-08-21 08:03:27 PDT
Created attachment 376882 [details]
old-closed-drawer
Comment 5 Jonathan Bedard 2019-08-21 08:04:38 PDT
Created attachment 376883 [details]
old-open-drawer
Comment 6 Jonathan Bedard 2019-08-22 07:50:32 PDT
Created attachment 377004 [details]
Patch
Comment 7 Jonathan Bedard 2019-08-23 15:36:17 PDT
As it turns out, this is horribly broken on mobile...working on a fix for that.
Comment 8 Jonathan Bedard 2019-08-23 16:02:59 PDT
Created attachment 377171 [details]
Patch
Comment 9 Jonathan Bedard 2019-08-26 16:28:51 PDT
Created attachment 377286 [details]
Patch
Comment 10 Zhifei Fang 2019-08-26 17:27:30 PDT
Comment on attachment 377286 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=377286&action=review

> Tools/resultsdbpy/resultsdbpy/view/static/js/drawer.js:127
> +        const zIndex = parseInt(document.defaultView.getComputedStyle(drawerRef.element, null).getPropertyValue('z-index'), 10);

Use media query in the css is better than hacking into the resize event

> Tools/resultsdbpy/resultsdbpy/view/static/library/css/webkit.css:-959
> -    display: block;

A better solution here is we keep it’s off. Use same media query to let the menu button show when on mobile. Then you will have an always true assumption that the initial state for the sidebar is off when the menu button displays.

> Tools/resultsdbpy/resultsdbpy/view/templates/base.html:37
> +        <button class="button" style="display: none; float: right" id="drawer-button">â°</button>

i think we better to put this at the beginning of the tittle, add a media query to control it is showing or not. You may also need to let the title no-wrap and overflow hidden

> Tools/resultsdbpy/resultsdbpy/view/templates/documentation.html:509
> +            const zIndex = parseInt(document.defaultView.getComputedStyle(element, null).getPropertyValue('z-index'), 10);

Seems we are using z-index to determine the initial status. You can always use media query to do so.
Besides, i think we will always show the sidebar until we on the mobile, we can do the same for the menu button just like my comment above
Comment 11 Jonathan Bedard 2019-08-27 17:12:41 PDT
Created attachment 377404 [details]
Patch
Comment 12 Zhifei Fang 2019-08-27 17:23:56 PDT
Comment on attachment 377404 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=377404&action=review

> Tools/resultsdbpy/resultsdbpy/view/templates/base.html:41
> +        <button style="width: 10%" class="button mobile-sidebar-control">â°</button>

I think the button can have a fix width, like use var(--smallSize), then the title width can be calc(100% - var(--smalSize)); This will keep the button is a good looking.
Comment 13 Jonathan Bedard 2019-08-27 17:36:30 PDT
Created attachment 377407 [details]
Patch
Comment 14 Zhifei Fang 2019-08-28 10:29:35 PDT
Comment on attachment 377407 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=377407&action=review

> Tools/resultsdbpy/resultsdbpy/view/static/library/css/webkit.css:890
> +:root {

Could you move this to top :root definition ?
Comment 15 Zhifei Fang 2019-08-28 10:30:03 PDT
(In reply to Zhifei Fang from comment #14)
> Comment on attachment 377407 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=377407&action=review
> 
> > Tools/resultsdbpy/resultsdbpy/view/static/library/css/webkit.css:890
> > +:root {
> 
> Could you move this to top :root definition ?

unofficially r=me
Comment 16 Aakash Jain 2019-08-28 10:37:37 PDT
Comment on attachment 377407 [details]
Patch

rs=me
Comment 17 Jonathan Bedard 2019-08-28 11:05:01 PDT
Created attachment 377463 [details]
Patch
Comment 18 WebKit Commit Bot 2019-08-28 12:36:30 PDT
Comment on attachment 377463 [details]
Patch

Clearing flags on attachment: 377463

Committed r249213: <https://trac.webkit.org/changeset/249213>
Comment 19 WebKit Commit Bot 2019-08-28 12:36:31 PDT
All reviewed patches have been landed.  Closing bug.
Comment 20 Radar WebKit Bug Importer 2019-08-28 12:37:17 PDT
<rdar://problem/54803179>