Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Remove atom-space-pen-views and custom elements registration - #402

Merged
as-cii merged 16 commits into
masterfrom
as-remove-custom-elements
Dec 16, 2016
Merged

as-cii merged 16 commits into
masterfrom
as-remove-custom-elements

Conversation

@as-cii

@as-cii as-cii commented Dec 15, 2016

Copy link
Copy Markdown
Contributor

This pull request contains an architectural change that replaces the usage of atom-space-pen-views and custom elements respectively with raw DOM APIs and a JS object managing a non-custom DOM element internally.

As always, the scope of the change was non-trivial, so there's a risk we might have introduced some regressions. @ungb: it would be awesome if you can help preventing this by extensively testing this package (and check if popular packages that interact with tabs throw exceptions that could be related, e.g. calling a method that does not exist, calling a method or getting a property from a null object, etc.). ✨

@ungb

ungb commented Dec 15, 2016

Copy link
Copy Markdown

Hey @as-cii I'm still testing this, but I noticed that everything is a lot slower when I link the tabs package with your changes. When I unlink it Atom is a lot faster. Here's a screenshot of before and after:

beforetab
aftertab

@as-cii

as-cii commented Dec 16, 2016

Copy link
Copy Markdown
Contributor Author

I think it might be due to linking the package, which forces Atom to transpile its assets (e.g. Coffeescript, Javascript, Less files, etc.). After loading Atom a second time, the slowdown should disappear.

Based on our Slack conversation, I'll go ahead and 🚢 this because no regression has been found. Thanks so much for you help on this, @ungb! 🙇

@as-cii
as-cii merged commit 81e546b into master Dec 16, 2016
@as-cii
as-cii deleted the as-remove-custom-elements branch December 16, 2016 09:18
@Alhadis

Alhadis commented Dec 18, 2016 •

Copy link
Copy Markdown
Contributor

@as-cii This broke the ability to manually refresh tab-icons using updateIcon. See #397.

EDIT: Ah, wait... the issue #397 addresses is already fixed. So manual refreshing isn't necessary anymore, I hope. =) Awesome.

Disregard.

@ungb

ungb commented Dec 18, 2016

Copy link
Copy Markdown

@Alhadis, thanks for keeping and eye out. . Hopefully it isn't an issue. Let us know if you do find any other issues. I tested mainly general use cases and other packages that interact with tabs, but might of missed somethings. Great to always get additional eyes and feedback :)

@Alhadis

Alhadis commented Dec 18, 2016

Copy link
Copy Markdown
Contributor

I did notice it's not adding an icon class of icon when updating. The consumed icon-class is being applied to the .itemTitle property, but not the actual icon class itself.

@as-cii

as-cii commented Jan 4, 2017

Copy link
Copy Markdown
Contributor Author

I did notice it's not adding an icon class of icon when updating.

Nice catch, @Alhadis! ✨ Can you point out the exact DOM element that we should apply the icon class to?

@Alhadis

Alhadis commented Jan 4, 2017

Copy link
Copy Markdown
Contributor

Whatever element receives the icon classes...

@as-cii

as-cii commented Jan 4, 2017

Copy link
Copy Markdown
Contributor Author

Whatever element receives the icon classes...

Interesting, looking at the diff it doesn't seem like I changed anything related to that: before this pull request the icon class was being applied only to @itemTitle. What am I missing?

@Alhadis

Alhadis commented Jan 4, 2017

Copy link
Copy Markdown
Contributor

Doesn't matter. We're not using your icon service anymore anyway.

facebook-github-bot pushed a commit to facebookarchive/nuclide that referenced this pull request Jan 13, 2017
Summary:
atom/tabs#402 removes the custom element that we were relying on in
order to access Atom's tab component and create our own. Since the tabs
are no longer exposed in any way, we vendor in the relevent atom/tabs
code.

Reviewed By: zertosh

Differential Revision: D4407870

fbshipit-source-id: 1fee14fc0b3fe4aaa4d7f891332fe8f9b28661da
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.

3 participants