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

fix(engine-server): Dynamic style generation #1944

Merged
merged 1 commit into from
Jun 25, 2020

Conversation

pmdartus
Copy link
Member

Details

This PR fixes, dynamic style property generation on SSR. For dynamic style, the engine core uses cssText on the StyleDeclaration to set the style property content.

Does this PR introduce breaking changes?

  • No, it does not introduce breaking changes.

The PR fulfills these requirements:

  • Have tests for the proposed changes been added? ✅
  • Have you followed these instructions to clearly describe the issue being fixed or feature enhanced? ✅

GUS work item

W-7552550

@pmdartus pmdartus changed the title fix(engine-server): dynamic style generation fix(engine-server): Dynamic style generation Jun 24, 2020
@pmdartus pmdartus requested a review from jodarove June 24, 2020 15:57
get(target, property) {
get(target, property): string {
let value: string;

const styleAttribute = getStyleAttribute();
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a change made in this pr, but may be you can take care of it here
getStyleAttribute() has this element.attributes.find. element.attributes returns a NamedNodeMap. NamedNodeMap does not have a find method on it.

Copy link
Member

@ekashida ekashida Jun 25, 2020

Choose a reason for hiding this comment

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

@ravijayaramappa We're actually interacting with our DOM polyfill here, it's probably helpful to look at the types defined in https://github.com/salesforce/lwc/blob/master/packages/@lwc/engine-server/src/types.ts

Copy link
Member

@ekashida ekashida left a comment

Choose a reason for hiding this comment

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

:shipit:

@pmdartus pmdartus merged commit e4800e0 into master Jun 25, 2020
@pmdartus pmdartus deleted the pmdartus/fix-style-generation branch June 25, 2020 08:32
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.

3 participants