Bug 233294 - Web Inspector: allow left docking when in LTR and right docking when in RTL
Summary: Web Inspector: allow left docking when in LTR and right docking when in RTL
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks: 234262
  Show dependency treegraph
 
Reported: 2021-11-17 16:46 PST by Devin Rousso
Modified: 2021-12-13 13:00 PST (History)
8 users (show)

See Also:


Attachments
Patch (11.22 KB, patch)
2021-11-17 16:46 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
[Image] after Patch is applied (undocked - light) (942.96 KB, image/png)
2021-11-17 16:47 PST, Devin Rousso
no flags Details
Patch (13.59 KB, patch)
2021-11-17 17:51 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (13.56 KB, patch)
2021-11-17 17:53 PST, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2021-11-17 16:46:20 PST
Some developers prefer docking to the left even when in LTR and/or docking to the right when in RTL. There's no technical reason to disallow this, so let's make it possible.
Comment 1 Devin Rousso 2021-11-17 16:46:54 PST
Created attachment 444604 [details]
Patch
Comment 2 Devin Rousso 2021-11-17 16:47:44 PST
Created attachment 444605 [details]
[Image] after Patch is applied (undocked - light)
Comment 3 Patrick Angle 2021-11-17 17:35:03 PST
Comment on attachment 444604 [details]
Patch

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

Looks good to me, but needs to account for RTL layouts where the icons will be laid out in the reverse order, even though the sides they represent remain fixed.

> Source/WebInspectorUI/UserInterface/Base/Main.js:362
> +    if (supportsDockLeft && (supportsDockRight || supportsDockBottom || supportsUndocked)) {

I think the order of icons is going to be unintuitive in RTL languages - The icons will be placed on the rightmost edge of the tab bar in that case, with the docked items arranged visually as ["windowed", "right", "bottom", "left", "windowed"] (with one of those options hidden at any given time) and not ["windowed", "left", "bottom", "right"], so I think we still need to check WI.resolvedLayoutDirection and make sure the order of these buttons make sense.
Comment 4 Devin Rousso 2021-11-17 17:51:26 PST
Created attachment 444617 [details]
Patch
Comment 5 Devin Rousso 2021-11-17 17:53:21 PST
Created attachment 444618 [details]
Patch
Comment 6 Patrick Angle 2021-11-17 18:19:35 PST
Comment on attachment 444618 [details]
Patch

Nice! r=me
Comment 7 EWS 2021-11-17 19:28:29 PST
Committed r285974 (244371@main): <https://commits.webkit.org/244371@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 444618 [details].
Comment 8 Radar WebKit Bug Importer 2021-11-17 19:29:25 PST
<rdar://problem/85531803>