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

feat(playground): add important features to playground @W-15545976 #4161

Merged
merged 10 commits into from Apr 25, 2024

Conversation

wjhsf
Copy link
Contributor

@wjhsf wjhsf commented Apr 18, 2024

Details

The playground should showcase the important basic features of LWC, so it's weird that it doesn't use any decorators or CSS files. This PR adds decorators and CSS files to the playground.

Does this pull request introduce a breaking change?

  • 😮‍💨 No, it does not introduce a breaking change.

Does this pull request introduce an observable change?

  • 🤞 No, it does not introduce an observable change.

GUS work item

W-15545976

Previously, changing just a CSS file did nothing.

Changing an HTML/JS file after a CSS file caused the page to not render, and require a refresh.

Now, changing a CSS file *still* does nothing,

But changing another file after works as expected and shows the CSS changes.
@wjhsf wjhsf requested a review from a team as a code owner April 18, 2024 18:09
@@ -25,7 +25,7 @@ export default (args) => {
open: false,
port: 3000,
}),
args.watch && livereload(),
args.watch && livereload('dist'),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously, changing just a CSS file did nothing. Changing an HTML/JS file after a CSS file caused the page to fail to render, and required a page refresh to fix. Now, changing a CSS file still does nothing, but changing another file after works as expected and shows the CSS changes.

this.dataCallback('...'); // "loading" state
setTimeout(this.dataCallback, 500, config.first * config.second);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Customers can't actually create custom wire adapters on the platform, so this may be misleading.

If we want to demonstrate decorators, do we need @wire? Or can @api/@track suffice?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I included it for completeness, but I have no strong feelings.

Copy link
Contributor

Choose a reason for hiding this comment

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

I feel that the playground should be as close to a "hello world" as possible. So I would shy away from the extra component as well as the @wire.

Demonstrating composition between one parent and one child is enough for a hello world IMO. We can also add an @api/@track as necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've removed @wire and @track, but showcasing LWC without using @api still feels like a gap, so I've included one @api.

@wjhsf wjhsf merged commit c78667d into master Apr 25, 2024
10 checks passed
@wjhsf wjhsf deleted the wjh/add-missing-features-playground branch April 25, 2024 19:45
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

2 participants