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

Infrastructure: Remove unexpected shared/js/app.js change not yet in w3c/aria-practices and file read check for experimental content #330

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

howard-e
Copy link
Contributor

@howard-e howard-e commented Jun 25, 2024

This PR updates this repository to be in sync with files that should only be coming over from w3c/aria-practices. So this removes code automatically synced from shared/js/app.js after re-running node ./scripts/pre-build.

Additionally, adds file read safety which is important since w3c/aria-practices#2977 has not yet been merged. It has content/shared/templates/experimental-example-usage-warning.html which transformExample.js looks for with a defined promise.

Copy link

netlify bot commented Jun 25, 2024

Deploy Preview for aria-practices ready!

Name Link
🔨 Latest commit 91f4fd8
🔍 Latest deploy log https://app.netlify.com/sites/aria-practices/deploys/667add946cae2f00078012b5
😎 Deploy Preview https://deploy-preview-330--aria-practices.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

// Generate the usage warning link using app.js link as a starting point
const scriptSource = document
.querySelector('[src$="app.js"]')
.getAttribute('src');

const fetchSource = scriptSource.replace('/js/app.js', usageWarningLink);
const fetchSource = scriptSource.replace(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change is automatic -- coming from running node ./scripts/pre-build

Copy link
Contributor

@stalgiag stalgiag left a comment

Choose a reason for hiding this comment

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

This makes sense and is needed. I read through and the added safety checks/fallbacks are welcome especially now with the asynchronous dependency merges. Thanks for the quick fix!

@howard-e howard-e merged commit afadb2f into main Jun 25, 2024
4 checks passed
@howard-e howard-e changed the title Infrastructure: Remove unexpected shared/js/app.js change not yet in w3c/aria-practices Infrastructure: Remove unexpected shared/js/app.js change not yet in w3c/aria-practices and file read check for experimental content Jun 25, 2024
@remibetin remibetin deleted the remove-unexpected-code branch July 9, 2024 10:11
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.

2 participants