-
Notifications
You must be signed in to change notification settings - Fork 517
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(curriculum): add scrim-inline custom element #11823
Conversation
use on curriculum homepage within react also update the design a little bit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks great. Let's test it and get it out.
client/src/curriculum/landing.tsx
Outdated
<ScrimIframe url={SCRIM_URL}> | ||
<section className="scrim-wrapper"> | ||
<div className="scrim-border"> | ||
<Suspense fallback={<scrim-inline />}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if threre's an easy way we could wrap ScrimInline
programmatically in scrim-inline.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a little bit of a chicken and egg problem in that we need to load scrim-inline.ts
async in order for it to not bloat our bundle size, but the Suspense
stuff all needs to be loaded sync for it to actually work: so the helper function would need to live in another file. If this becomes a common pattern for us, I think we can do that then.
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 No assets were bigger Smaller No assets were smaller Unchanged
|
Summary
https://mozilla-hub.atlassian.net/browse/MP-1475
Problem
Solution
Re-implement the scrim react component as a lit component, and update the background.
There are a number of things here which I've deliberately de-scoped:
css``
template literals here don't run through webpack, they don't use SCSS, they have to be written inline, they aren't linted - there's a number of conveniences/optimisations we could add, but I think it's best to wait until we have a bit of experience with how Lit "feels" before we invest time into these thingshtml``
literals, etc: similarly, let's get a feel for Lit before we invest in tooling surrounding itScreenshots
Before
After
How did you test this change?