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

Introduce a new injection script for new DartPad frontend #205

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

parlough
Copy link
Member

@parlough parlough commented Jan 16, 2024

This injection script has less functionality and uses a data attribute mechanism rather than parsing a singular class string, as the combined class format has occasionally been painful to deal with on the static site generation end. Overall this ends up with a much simpler and smaller script (200KB->74KB) :D

Fixes dart-lang/dart-pad#2793
Fixes dart-lang/dart-pad#2694
Closes dart-lang/dart-pad#1380
Closes dart-lang/dart-pad#1567

I'd like to land this as is with the preview URL, so I can try it out on the downstream sites and prepare them for the new format.

Thanks for taking a look!

@parlough parlough requested a review from johnpryan January 16, 2024 02:11
@parlough parlough force-pushed the misc/new-inject-script branch from 3bddea3 to a5216c4 Compare January 16, 2024 16:29
Copy link
Collaborator

@johnpryan johnpryan left a comment

Choose a reason for hiding this comment

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

Looks great!

packages/inject_dartpad/README.md Show resolved Hide resolved
@parlough
Copy link
Member Author

Thanks for taking a look John!

@parlough parlough merged commit d7cc5cc into main Jan 16, 2024
9 checks passed
@parlough parlough deleted the misc/new-inject-script branch January 16, 2024 19:30
atsansone pushed a commit to dart-lang/site-www that referenced this pull request Mar 20, 2024
- Updates to use the new, smaller injection script (introduced in
dart-lang/site-shared#205)
- Updates the markdown renderer to set the new expected data variables
- Removes some old code relating to multi-file DartPad

Staged example:
https://dart-dev--pr5627-feat-new-dartpad-injection-n1bx8le4.web.app/codelabs/async-await
atsansone pushed a commit to atsansone/site-www that referenced this pull request Mar 22, 2024
- Updates to use the new, smaller injection script (introduced in
dart-lang/site-shared#205)
- Updates the markdown renderer to set the new expected data variables
- Removes some old code relating to multi-file DartPad

Staged example:
https://dart-dev--pr5627-feat-new-dartpad-injection-n1bx8le4.web.app/codelabs/async-await
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants