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

Clean up addWidget flow#535

Merged
jasonsanjose merged 6 commits into
masterfrom
nj/inline-cleanup
Apr 5, 2012
Merged

Clean up addWidget flow#535
jasonsanjose merged 6 commits into
masterfrom
nj/inline-cleanup

Conversation

@njx

@njx njx commented Apr 4, 2012

Copy link
Copy Markdown

@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

njx commented Apr 4, 2012

Copy link
Copy Markdown
Author

This actually fixes #531 which I had filed earlier.

@jasonsanjose

Copy link
Copy Markdown
Member

Reviewing

Comment thread src/editor/Editor.js Outdated

Copy link
Copy Markdown
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
Copy Markdown
Member

Initial review complete

@njx

njx commented Apr 4, 2012

Copy link
Copy Markdown
Author

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
Copy Markdown
Member

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

@njx

njx commented Apr 4, 2012

Copy link
Copy Markdown
Author

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

njx commented Apr 4, 2012

Copy link
Copy Markdown
Author

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

@jasonsanjose

Copy link
Copy Markdown
Member

Looks good. But need to merge with master.

@njx

njx commented Apr 5, 2012

Copy link
Copy Markdown
Author

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.

2 participants