New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 892231 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 15
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Feature



Sign in to add a comment

DevTools: No confirmation dialog before clearing object store

Reported by dormins...@gmail.com, Oct 4

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36

Steps to reproduce the problem:
1. Open DevTools and navigate to the Application tab
2. On the sidebar, open any IndexedDB instance with objects inside
3. Press "Clear Object Store" next to the "Refresh" button

What is the expected behavior?
Prompt before deleting the object store like when deleting the database.

What went wrong?
It doesn't confirm and deletes it instantly.

Did this work before? No 

Chrome version: 69.0.3497.100  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

Maybe there could be a checkbox for not showing it again, but I nearly lost a lot of data from a misclick when I was trying to refresh the database.

The "delete selected" next to it could use of a warning aswell, but it doesn't seem as critical.

This isn't a bug, more of a suggestion, but I don't know. This is my first issue here, and I haven't found any other place to give feedback for DevTools. Hope I'm not at the wrong place, or caused you any more hassle than needed :P
 
Labels: Needs-Triage-M69
Cc: susan.boorgula@chromium.org
Labels: -Type-Bug Triaged-ET Target-71 M-71 FoundIn-71 FoundIn-70 FoundIn-69 OS-Linux OS-Mac Type-Feature
Status: Untriaged (was: Unconfirmed)
dorminsama@ Thanks for the issue.

As per the above description, this is a Feature Request to display a prompt before deleting the object store like when deleting the database.
Hence marking this as Untriaged for further updates from Dev.

Thanks..
Owner: hhli@chromium.org
Status: Assigned (was: Untriaged)
Summary: DevTools: No confirmation dialog before clearing object store (was: No confirmation dialog before clearing object store)
Status: Started (was: Assigned)
CL1376491

Screen Shot 2018-12-13 at 13.01.55.png
103 KB View Download
Cc: julialiang@chromium.org
Thanks for the report.  Losing data is an unfortunate scenario.  Adding a confirmation dialog works, but I'm not sure why IndexedDB is special.  Perhaps it makes sense to add confirmations to all 'Clear' buttons in Application panel?  (Clear storage, local storage, session, etc.)

Alternatively, we could try to avoid mis-clicks by moving the destructive icons farther away: https://imgur.com/a/NHn7WuE

hhli@, julia@, wdyt?
Agree, hence CL1376491 patch 2
Move destructive buttons to the right
image #1: for IndexedDB's object store table (in IndexedDBViews.js)
image #2: for LocalStorage, SessionStorage, and Cookies (in StorageItemsView.js)
Screen Shot 2018-12-13 at 13.30.54.png
11.2 KB View Download
Screen Shot 2018-12-13 at 13.30.29.png
7.4 KB View Download
Thanks loue@ and hhli@.

I'm concerned that moving the buttons to the right will make it seem like they apply to clearing the filter result rather than the data (and maybe therefore lead to other kinds of mis-clicks). For example, in the Network > Search, we use refresh and clear on the right side of the search bar to clear search results.

What do you think?
Screen Shot 2018-12-13 at 2.31.46 PM.png
180 KB View Download
c#7: that's a good point.  I would have guessed that Network search's 'Clear' button would remove the results, but preserve the text in the input field.  Similarly, Console's 'Clear' button removes messages, but preserves the user's prompt text.

Maybe we can
- Make Network search's 'Clear' button preserve the input text
- Add a vertical divider in between the 'Clear' button and the storage Search field, to make it clearer that they are separate
?
Vertical divider between clear and search field for Storage sounds good to me.

Regarding buttons on Network search: It seems to me like intention of the Network search 'clear' button is to clear the search field because if I clear and then re-search, I get the same result. This behavior is different from Storage, where you can't get the info back after clearing. My opinion is to just leave the Network search as is. Let me know if I'm misunderstanding something. 

Thanks!
Proposed in CL1376491 patch 4

Screen Shot 2018-12-14 at 14.19.48.png
7.9 KB View Download
Proposed in CL1376491 patch 4 for the four tables in DevTools > Application
IndexedDB's object store table (in IndexedDBViews.js)
LocalStorage, SessionStorage, and Cookies (in StorageItemsView.js)
Screen Shot 2018-12-14 at 14.19.48.png
7.9 KB View Download
Look good to me. Thanks hhli@
Status: Fixed (was: Started)
Project Member

Comment 14 by bugdroid1@chromium.org, Dec 15

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8f828e6f14fc26a55870f95dfdd4b53dc153dc78

commit 8f828e6f14fc26a55870f95dfdd4b53dc153dc78
Author: Harley Li <hhli@chromium.org>
Date: Sat Dec 15 01:49:47 2018

[DevTools] Move destructive buttons in DevTools > Application 4 tables

Destructive buttons in these tables are moved to the right to avoid
inadvertently clicked: LocalStorage, SessionStorage, IndexedDB > object
store, and Cookies. Note this is different from what the issue filer
was originally asking.

Bug:  892231 
Change-Id: I112545afaf16c56651835c3097ce6ab58e7fa102
Reviewed-on: https://chromium-review.googlesource.com/c/1376491
Reviewed-by: Erik Luo <luoe@chromium.org>
Commit-Queue: Haihong Li (Harley) <hhli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616910}
[modify] https://crrev.com/8f828e6f14fc26a55870f95dfdd4b53dc153dc78/third_party/blink/renderer/devtools/front_end/resources/IndexedDBViews.js
[modify] https://crrev.com/8f828e6f14fc26a55870f95dfdd4b53dc153dc78/third_party/blink/renderer/devtools/front_end/resources/StorageItemsView.js

Sign in to add a comment