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(compat): list polyfills #6902

Closed
wants to merge 6 commits into from
Closed

feat(compat): list polyfills #6902

wants to merge 6 commits into from

Conversation

teoli2003
Copy link
Contributor

This is the unblocking PR for one of our Quarterly projects: we want to store polyfills only inside a YAML entry (polyfills) and display a sentence about them below the Compat Table.

This PR:

  • create and read the YAML Key
  • add a React subsection below the Compat table.
  • populate this subsection with a sentence and a link.

We only authorize URLs from an allowlist to be used for this YAML header. We extend it a bit, but it should already cover the whole of web/javascript.

@github-actions github-actions bot added the macros tracking issues related to kumascript macros label Aug 17, 2022
@teoli2003
Copy link
Contributor Author

@caugner Can you do a first pass of review? I would like to know if the approach I used is the right one. If so, I can go into more details (more testing!); if not, I can switch to the right one. Thank you in advance!

@teoli2003
Copy link
Contributor Author

This is what I see locally:

image

Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

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

Overall LGTM, but some nits, and I'm not sure that it's a good idea to just append the polyfills logic to the bc-data logic.

@@ -0,0 +1,66 @@
import { DisplayH3 } from "./utils";

const ALLOWED_POLYFILL_SERVICE = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be plural.

Suggested change
const ALLOWED_POLYFILL_SERVICE = [
const ALLOWED_POLYFILL_SERVICES = [

Copy link
Contributor

Choose a reason for hiding this comment

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

@teoli2003 You marked this as resolved, but the current status of this PR still has singular. This also applies to other threads. Did you push your changes?

build/document-extractor.js Show resolved Hide resolved
kumascript/macros/Compat.ejs Show resolved Hide resolved
kumascript/macros/Compat.ejs Show resolved Hide resolved
kumascript/macros/Compat.ejs Show resolved Hide resolved
const depth = $1 || 1;
const queries = Array.isArray(query) ? query : [query];

var output = queries.map(query => `<div class="bc-data" data-query="${query}" data-depth="${depth}" data-multiple="${queries.length > 1}" data-polyfills="${polyfills}">
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, this would mean that the same polyfills would be printed multiple times for each query. Not ideal, but that almost makes me think that we need a single separate <div class="bc-polyfills"> element instead of adding this to this div.bc-data element.

@caugner caugner changed the title Add support for polyfill YAML header feat(compat): list polyfills Aug 18, 2022
@@ -0,0 +1,66 @@
import { DisplayH3 } from "./utils";

const ALLOWED_POLYFILL_SERVICE = [
Copy link
Contributor

Choose a reason for hiding this comment

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

@teoli2003 You marked this as resolved, but the current status of this PR still has singular. This also applies to other threads. Did you push your changes?

@teoli2003
Copy link
Contributor Author

No I didn't push the changes yet, I still have one to make, and test locally. When ready, I'll rerequest your review.

@caugner
Copy link
Contributor

caugner commented Aug 24, 2022

Alright, let me mark this PR as draft for time being, but don't hesitate to mark it ready for review again.

@caugner caugner marked this pull request as draft August 24, 2022 13:28
@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added the merge conflicts 🚧 Please rebase onto or merge the latest main. label Aug 29, 2022
@github-actions github-actions bot added the 🐌 idle Issues and PRs without recent activity. Flagged for maintainer follow-up. label Nov 16, 2022
@caugner

This comment was marked as outdated.

@github-actions github-actions bot removed the 🐌 idle Issues and PRs without recent activity. Flagged for maintainer follow-up. label Dec 13, 2022
@github-actions github-actions bot added the idle label Jan 12, 2023
@github-actions github-actions bot removed the idle label Feb 9, 2023
@github-actions github-actions bot added the idle label Mar 11, 2023
@github-actions github-actions bot removed the idle label Jun 19, 2023
@github-actions github-actions bot added the idle label Jul 20, 2023
@github-actions github-actions bot removed the idle label Aug 16, 2024
@github-actions github-actions bot added the idle label Sep 16, 2024
@caugner
Copy link
Contributor

caugner commented Oct 14, 2024

Closing as stale, although we very much appreciate effort. 🙌

@caugner caugner closed this Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle macros tracking issues related to kumascript macros merge conflicts 🚧 Please rebase onto or merge the latest main.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants