Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Clean up addWidget flow #535

Merged
merged 6 commits into from
Apr 5, 2012
Merged

Clean up addWidget flow #535

merged 6 commits into from
Apr 5, 2012

Conversation

njx
Copy link
Contributor

@njx njx commented Apr 4, 2012

@jason-sanjose @tvoliter @peterflynn -- one of you guys should take a look at this one :)

Currently, we have EditorManager._addInlineWidget(), which takes an InlineWidget instance, and Editor.addInlineWidget, which takes a bunch of arguments (including an InlineWidget and some methods on that widget) and stores off an anonymous object that basically just points to properties of the InlineWidget. This pull request consolidates everything so Editor just maintains a list of InlineWidget instances, and makes it so both Editor.addInlineWidget() and Editor.removeInlineWidget() take a widget instead of an id. This simplifies the code considerably.

…nlineWidget just takes an actual inlineWidget and stores the widget itself in the _inlineWidgets list.
@njx
Copy link
Contributor Author

njx commented Apr 4, 2012

This actually fixes #531 which I had filed earlier.

@jasonsanjose
Copy link
Member

Reviewing


return inlineId;
return inlineWidget.id;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return value no longer used.

@jasonsanjose
Copy link
Member

Initial review complete

@njx
Copy link
Contributor Author

njx commented Apr 4, 2012

Responded to code review. I considered changing the names of onAdded() and onParentShown() as well, but those really do feel like they're reacting to events, as opposed to close(), which feels like it's really disposing the content. Kind of a fine distinction, though.

@jasonsanjose
Copy link
Member

Looks good except for InlineTextEditor changes in the most recent commit.

@njx
Copy link
Contributor Author

njx commented Apr 4, 2012

Ugh, my bad. I think we should revert the original close handler's name back to onClosed()--there might be some cleaner way to rename that vs. this close method, but I think we could tackle that later.

@njx
Copy link
Contributor Author

njx commented Apr 4, 2012

OK, I reverted back to onClosed(). Please take a look.

@jasonsanjose
Copy link
Member

Looks good. But need to merge with master.

@njx
Copy link
Contributor Author

njx commented Apr 5, 2012

Merged with master. Ran the unit tests and looks like everything's still working.

jasonsanjose added a commit that referenced this pull request Apr 5, 2012
@jasonsanjose jasonsanjose merged commit bbf4dbf into master Apr 5, 2012
gideonthomas added a commit to gideonthomas/brackets that referenced this pull request Mar 3, 2016
Fix adobe#530 - Figure out why DnD using the Upload Files dialog is broken
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants