Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] Clean up addWidget flow #532

Open
core-ai-bot opened this issue Aug 29, 2021 · 9 comments
Open

[CLOSED] Clean up addWidget flow #532

core-ai-bot opened this issue Aug 29, 2021 · 9 comments

Comments

@core-ai-bot
Copy link
Member

Issue by njx
Wednesday Apr 04, 2012 at 01:04 GMT
Originally opened as adobe/brackets#535


@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.


njx included the following code: https://github.com/adobe/brackets/pull/535/commits

@core-ai-bot
Copy link
Member Author

Comment by njx
Wednesday Apr 04, 2012 at 01:11 GMT


This actually fixes #531 which I had filed earlier.

@core-ai-bot
Copy link
Member Author

Comment by jasonsanjose
Wednesday Apr 04, 2012 at 16:41 GMT


Reviewing

@core-ai-bot
Copy link
Member Author

Comment by jasonsanjose
Wednesday Apr 04, 2012 at 18:09 GMT


Initial review complete

@core-ai-bot
Copy link
Member Author

Comment by njx
Wednesday Apr 04, 2012 at 19:12 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by jasonsanjose
Wednesday Apr 04, 2012 at 20:48 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by njx
Wednesday Apr 04, 2012 at 20:51 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by njx
Wednesday Apr 04, 2012 at 20:58 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by jasonsanjose
Thursday Apr 05, 2012 at 17:21 GMT


Looks good. But need to merge with master.

@core-ai-bot
Copy link
Member Author

Comment by njx
Thursday Apr 05, 2012 at 17:57 GMT


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant