Skip to content

revert: css-only hydration to prevent FOUC#4916

Merged
jcfranco merged 1 commit intomasterfrom
jcfranco/revert-hydration-style-changes-to-restore-custom-element-output-dir-styling
Jul 13, 2022
Merged

revert: css-only hydration to prevent FOUC#4916
jcfranco merged 1 commit intomasterfrom
jcfranco/revert-hydration-style-changes-to-restore-custom-element-output-dir-styling

Conversation

@jcfranco
Copy link
Copy Markdown
Member

Related Issue: #991

Summary

This rolls back #4856 as it introduced a regression where components from the dist-custom-elements bundle do not get displayed since these don't apply the calcite-hydrated attribute when hydrated (see #991 (comment)). There is an existing Stencil issue related to this, so we should revisit once that gets resolved.

This reverts 6405b1f, dae9586.

@jcfranco jcfranco requested a review from a team as a code owner July 13, 2022 21:02
Copy link
Copy Markdown
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

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

👍

What are your thoughts on leaving the hydrationStyles file in the codebase for now?

Comment thread .gitignore
support/output-targets/custom-elements/bundles/
src/**/components.d.ts
src/**/*.js
src/assets/styles/_hydration.scss
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.

Maybe we can just comment all this stuff out until its ready?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'd rather remove the code. Restoring this should be as simple as re-reverting (verting? 😂) the commit.

/* CSS vars (@include in global) */
@import "type";

/* Hydration styles to hide non-hydrated components */
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.

Maybe we can just comment this out for now?

@@ -1,33 +0,0 @@
type Dirent = import("fs").Dirent;
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.

Maybe we can leave this file for now even though it won't be used until its fixed?

Copy link
Copy Markdown
Contributor

@benelan benelan left a comment

Choose a reason for hiding this comment

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

LGTM! I'll release when this is merged. Third time's the charm 🤞

I think verting™️ when the stencil issue is resolved would be easier than remembering which lines in which files to uncomment, as well as remembering to change some of the NPM scripts

@driskull
Copy link
Copy Markdown
Member

sounds good!

@jcfranco jcfranco merged commit 579837d into master Jul 13, 2022
@jcfranco jcfranco deleted the jcfranco/revert-hydration-style-changes-to-restore-custom-element-output-dir-styling branch July 13, 2022 22:34
@github-actions github-actions Bot added this to the Sprint 07/11 - 07/22 milestone Jul 13, 2022
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.

4 participants