DevTools: No confirmation dialog before clearing object store
Reported by
dormins...@gmail.com,
Oct 4
|
||||||
Issue descriptionUserAgent: 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
,
Oct 5
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..
,
Oct 8
,
Dec 13
CL1376491
,
Dec 13
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?
,
Dec 13
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)
,
Dec 13
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?
,
Dec 14
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 ?
,
Dec 14
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!
,
Dec 14
Proposed in CL1376491 patch 4
,
Dec 14
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)
,
Dec 14
Look good to me. Thanks hhli@
,
Dec 15
,
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 |
||||||
Comment 1 by swarnasree.mukkala@chromium.org
, Oct 5