-
Notifications
You must be signed in to change notification settings - Fork 511
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: add <interactive-example> custom element #12413
Open
LeoMcA
wants to merge
8
commits into
main
Choose a base branch
from
lit-interactive-examples
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+1,048
−371
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…t was ready this was noticeable every so often when opening a live sample in the playground
github-actions
bot
added
dependencies
Pull requests that update a dependency file
metrics
plus:playground
labels
Jan 8, 2025
Bundle StatsHey there, this message comes from a github action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded
Removed
Bigger
Smaller
Unchanged
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
https://mozilla-hub.atlassian.net/browse/MP-1804
Replaces #12283 and #12252
Adds these custom elements:
<interactive-example>
: not used anywhere yet, needs me to open a corresponding PR in rari<play-controller>
: used for common logic between the playground and interactive examples<play-editor>
<play-runner>
Also implements a
glean-click
event to allow callinggleanClick
from lit-land, in order to partially re-implement the interactive example pings we send (sans event count).Some outstanding issues we might need to discuss before merging:No use of code fence special classes, currently: these wouldn't help hiding them from css as the class is applied to the<pre>
within the.code-example
<div>
which needs to be hidden, so a pure css approach would require using a selector like.code-example:has(pre.interactive-example)
Code text gets bigger on mobile, and is smaller than the existing interactive examples size on desktop: being the same as the current sizes in the playgroundHow did you test this change?
So far, locally on localhost:3000
on https://developer.allizom.org/en-US/play for playground changes
on https://test.developer.allizom.org/en-US/docs/Web/JavaScript for testing migrated examples - though I suggest we don't let that block merging this, as they won't appear anywhere until the corresponding rari PR is merged (and we actually start migrating examples)