RESOLVED FIXED 156223
Web Inspector: Should not allow selecting no Timelines when editing in Timeline tab
https://bugs.webkit.org/show_bug.cgi?id=156223
Summary Web Inspector: Should not allow selecting no Timelines when editing in Timeli...
Joseph Pecoraro
Reported 2016-04-04 20:10:20 PDT
* SUMMARY Should not allow selecting no Timelines when editing in Timeline panel. * STEPS TO REPRODUCE 1. Open inspector 2. Show Timelines tab 3. Click "Edit" 4. Uncheck all Timelines 5. Click "Done" => Poor UI I would expect that you can't click "Done" unless at least one timeline is selected.
Attachments
[Patch] Proposed Fix (4.85 KB, patch)
2016-04-05 13:35 PDT, Matt Baker
no flags
[Patch] Proposed Fix (4.82 KB, patch)
2016-04-05 14:29 PDT, Matt Baker
no flags
Radar WebKit Bug Importer
Comment 1 2016-04-05 08:13:51 PDT
Matt Baker
Comment 2 2016-04-05 13:01:25 PDT
We could either: a) Disable "Done" if no timeline are selected. b) Prevent deselecting the last timeline. I think I like the original suggestion (a).
Timothy Hatcher
Comment 3 2016-04-05 13:23:08 PDT
I like option A too.
Matt Baker
Comment 4 2016-04-05 13:35:23 PDT
Created attachment 275686 [details] [Patch] Proposed Fix
Joseph Pecoraro
Comment 5 2016-04-05 14:14:51 PDT
Comment on attachment 275686 [details] [Patch] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=275686&action=review r=me, but test switching to "change" event > Source/WebInspectorUI/UserInterface/Views/TimelineTreeElement.js:90 > + button.addEventListener(WebInspector.TreeElementStatusButton.Event.Clicked, () => { this._dispatchEnabledDidChangeEvent(); }); Seems this click handler would be better off as: checkboxElement.addEventListener("change", () => { this._dispatchEnabledDidChangeEvent(); }); Instead of relying on TreeElementStatusButton clicked events, which might not change the checkbox state. And you are guaranteed that this will happen _after_ the checkbox changes. Right now I am not sure of the order. Note, you need both this and the _clickHandler method, since programmatically changing the checked state of an input does not dispatch a "change" event.
Matt Baker
Comment 6 2016-04-05 14:29:23 PDT
Created attachment 275696 [details] [Patch] Proposed Fix
WebKit Commit Bot
Comment 7 2016-04-05 15:32:07 PDT
Comment on attachment 275696 [details] [Patch] Proposed Fix Clearing flags on attachment: 275696 Committed r199077: <http://trac.webkit.org/changeset/199077>
WebKit Commit Bot
Comment 8 2016-04-05 15:32:12 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.