Closed Bug 1033855 Opened 9 years ago Closed 9 years ago

Deleting current app leaves WebIDE in broken state


(DevTools Graveyard :: WebIDE, defect)

Not set


(Not tracked)

Firefox 33


(Reporter: wenzel, Assigned: bgrins)




(1 file, 1 obsolete file)

- Start a new project from template
- right-click on project name in file list, click delete, say Yes to confirmation dialog

- the project name stays in the WebIDE status bar
- change focus to a different window, come back, the project name is now "--"
- click on the "--" dropdown, select "new" from template, ok ok.
- note the project was apparently created, but no files are shown in the file list. Close and reopen WebIDE to make them appear.

- WebIDE should delete the project as expected, but fall back to a non-broken state.

Maybe this can simply be solved if the WebIDE deselects the current project (change to the default state) before deleting a project.
I didn't know we could right click on the project header!

Brian, can you disable the context menu on the header, or, forward the delete command to WebIDE correctly handle project destruction?
Flags: needinfo?(bgrinstead)
I'll disable the context menu on the project header
Assignee: nobody → bgrinstead
Flags: needinfo?(bgrinstead)
OS: Mac OS X → All
Hardware: x86 → All
Attached patch hidedelete-projectroot.patch (obsolete) — Splinter Review
Heather, what do you think?  It's adding a new plugin event `onContextMenuOpen` which gives plugins a chance to hide themselves from the menu.  Then for delete plugin we just hide it if it is the root element in the tree.

The test change is mostly whitespace as I've flattened it out a bit and moved a couple of common things into head.js, but it also adds a check to make sure that the delete item is hidden when right clicking on the root element.
Attachment #8451860 - Flags: review?(fayearthur)
Comment on attachment 8451860 [details] [diff] [review]

Review of attachment 8451860 [details] [diff] [review]:

Seems like a good quick fix.

::: browser/devtools/projecteditor/lib/plugins/delete/delete.js
@@ +34,5 @@
>      );
>    },
> +  onContextMenuOpen: function(resource) {
> +    if (!resource.parent) {

Maybe add a comment as to why you're doing this.
Attachment #8451860 - Flags: review?(fayearthur) → review+
Thanks for the review.  Added comment and pushed to try:
Attachment #8451860 - Attachment is obsolete: true
Attachment #8451901 - Flags: review+
Keywords: checkin-needed
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 33
Nice fix, except it's now impossible to delete that app, apparently. I'll file a followup bug.
Blocks: 1037577
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.