Closed Bug 1033855 Opened 10 years ago Closed 10 years ago

Deleting current app leaves WebIDE in broken state

Categories

(DevTools Graveyard :: WebIDE, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 33

People

(Reporter: wenzel, Assigned: bgrins)

References

Details

Attachments

(1 file, 1 obsolete file)

STR: - Start a new project from template - right-click on project name in file list, click delete, say Yes to confirmation dialog Actual: - 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. Expected: - 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
Status: NEW → ASSIGNED
Flags: needinfo?(bgrinstead)
OS: Mac OS X → All
Hardware: x86 → All
Attached patch hidedelete-projectroot.patch (obsolete) (deleted) — 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] hidedelete-projectroot.patch 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+
Attached patch hidedelete-projectroot.patch (deleted) — Splinter Review
Thanks for the review. Added comment and pushed to try: https://tbpl.mozilla.org/?tree=Try&rev=717d41794e97
Attachment #8451860 - Attachment is obsolete: true
Attachment #8451901 - Flags: review+
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 10 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.

Attachment

General

Created:
Updated:
Size: