Bug 236729 - [iOS][Modern Media Controls] Add an alternative overflow icon
Summary: [iOS][Modern Media Controls] Add an alternative overflow icon
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Peng Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-16 12:40 PST by Peng Liu
Modified: 2022-02-18 09:35 PST (History)
10 users (show)

See Also:


Attachments
Patch (14.71 KB, patch)
2022-02-16 12:46 PST, Peng Liu
no flags Details | Formatted Diff | Diff
Patch (11.85 KB, patch)
2022-02-16 12:56 PST, Peng Liu
hi: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (10.78 KB, patch)
2022-02-16 19:07 PST, Peng Liu
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Fix test failures (16.09 KB, patch)
2022-02-17 11:10 PST, Peng Liu
no flags Details | Formatted Diff | Diff
Fix an issue on watchOS (16.89 KB, patch)
2022-02-17 11:16 PST, Peng Liu
no flags Details | Formatted Diff | Diff
[fast-cq] Revise the patch based on Devin's suggestions (7.29 KB, patch)
2022-02-17 17:05 PST, Peng Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peng Liu 2022-02-16 12:40:20 PST
[Modern Media Controls] Add an alternative overflow icon
Comment 1 Peng Liu 2022-02-16 12:46:23 PST
Created attachment 452231 [details]
Patch
Comment 2 Peng Liu 2022-02-16 12:56:11 PST
Created attachment 452233 [details]
Patch
Comment 3 Devin Rousso 2022-02-16 16:42:13 PST
Comment on attachment 452233 [details]
Patch

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

r=me

> Source/WebCore/Modules/modern-media-controls/controls/icon-service.js:38
> +    Ellipsis        : { name: "Ellipsis", type: "svg", label: UIString("More\u2026") },

please alphabetize this by moving it right above `EllipsisCircle`

> Source/WebCore/Modules/modern-media-controls/controls/layout-traits.js:94
> +    overflowButtonHasCircle() {

Style: `{` goes on a separate line :)

> Source/WebCore/Modules/modern-media-controls/controls/media-controls.js:46
> +        if (layoutTraits.overflowButtonHasCircle())

I think you can actually get to the `layoutTraits` inside `OverflowButton` via something like `layoutDelegate?.layoutTraits`.  So I'd leave this as-is and then change the `constructor` of `OverflowButton` to be like so:
```
super({
    cssClassName: "overflow",
    iconName: layoutDelegate?.layoutTraits.overflowButtonHasCircle() ? Icons.EllipsisCircle : Icons.Ellipsis,
    layoutDelegate,
});
```
Comment 4 Peng Liu 2022-02-16 17:06:29 PST
Comment on attachment 452233 [details]
Patch

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

>> Source/WebCore/Modules/modern-media-controls/controls/icon-service.js:38
>> +    Ellipsis        : { name: "Ellipsis", type: "svg", label: UIString("More\u2026") },
> 
> please alphabetize this by moving it right above `EllipsisCircle`

Sure!

>> Source/WebCore/Modules/modern-media-controls/controls/layout-traits.js:94
>> +    overflowButtonHasCircle() {
> 
> Style: `{` goes on a separate line :)

Yes.

>> Source/WebCore/Modules/modern-media-controls/controls/media-controls.js:46
>> +        if (layoutTraits.overflowButtonHasCircle())
> 
> I think you can actually get to the `layoutTraits` inside `OverflowButton` via something like `layoutDelegate?.layoutTraits`.  So I'd leave this as-is and then change the `constructor` of `OverflowButton` to be like so:
> ```
> super({
>     cssClassName: "overflow",
>     iconName: layoutDelegate?.layoutTraits.overflowButtonHasCircle() ? Icons.EllipsisCircle : Icons.Ellipsis,
>     layoutDelegate,
> });
> ```

I like this idea! Thanks!
Comment 5 Peng Liu 2022-02-16 19:07:34 PST
Created attachment 452288 [details]
Patch for landing
Comment 6 Aakash Jain 2022-02-17 05:33:11 PST
I cancelled https://ews-build.webkit.org/#/builders/68/builds/8368 to speed up ios-wk2 queue (as it is backlogged). That build indicated 30+ layout-test failures on Patch 452233. Please check.
Comment 7 Peng Liu 2022-02-17 11:10:42 PST Comment hidden (obsolete)
Comment 8 Peng Liu 2022-02-17 11:16:45 PST Comment hidden (obsolete)
Comment 9 Peng Liu 2022-02-17 17:05:50 PST
Created attachment 452448 [details]
[fast-cq] Revise the patch based on Devin's suggestions
Comment 10 EWS 2022-02-18 09:34:12 PST
Committed r290133 (247477@main): <https://commits.webkit.org/247477@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 452448 [details].
Comment 11 Radar WebKit Bug Importer 2022-02-18 09:35:18 PST
<rdar://problem/89150124>