* 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.
<rdar://problem/25552221>
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).
I like option A too.
Created attachment 275686 [details] [Patch] Proposed Fix
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.
Created attachment 275696 [details] [Patch] Proposed Fix
Comment on attachment 275696 [details] [Patch] Proposed Fix Clearing flags on attachment: 275696 Committed r199077: <http://trac.webkit.org/changeset/199077>
All reviewed patches have been landed. Closing bug.