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

should not be displayed #28

Merged
merged 1 commit into from
Oct 21, 2015
Merged

should not be displayed #28

merged 1 commit into from
Oct 21, 2015

Conversation

notwaldorf
Copy link
Contributor

Fixes #27 (see bug for repro)

Added two tests, look at them failing before the patch:
screen shot 2015-10-20 at 11 32 58 am

@cdata
Copy link
Contributor

cdata commented Oct 21, 2015

📊 Lookin' good 👍

@@ -69,6 +69,10 @@
}

},

attached: function() {
this.style.display = 'none';

Choose a reason for hiding this comment

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

could we add this as a :host style, instead of via JS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ATM <iron-iconset-svg> doesn't have a shadow root, so I didn't think I should add one. @cdata?

Choose a reason for hiding this comment

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

word, I wonder if using created instead of attached then might be better, just to shove this as early as possible in the life cycle of the elm, to prevent crazy weird style/height flicker

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 I think you're right that we might end up creating an unnecessary shadowRoot. Alternatively you could also set hostAttributes to include hidden by default. This may be more expensive overall though..

Choose a reason for hiding this comment

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

@cdata do y'all have a good way to measure "cost" yet?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not in a repeatable CI setting, no. We have gotten good mileage out of the Chrome timeline profiler though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cdata @samccone Asked @sorvell; he said style.display is better than hostAttributes, and it can go either in ready or attached and it doesn't matter. 🎈

notwaldorf added a commit that referenced this pull request Oct 21, 2015
@notwaldorf notwaldorf merged commit 4043a84 into master Oct 21, 2015
@notwaldorf notwaldorf deleted the fix-size branch October 21, 2015 23:53
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

Successfully merging this pull request may close these issues.

None yet

3 participants