Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module.exports = {
'chai-expect',
'import',
'jsdoc',
'jsx-a11y',
'local',
'module-resolver',
'prettier',
Expand Down Expand Up @@ -311,6 +312,37 @@ module.exports = {
'react/jsx-uses-vars': 2,
'react-hooks/rules-of-hooks': 2,
'react-hooks/exhaustive-deps': 2,

// Accessibility rules for better inclusive design
'jsx-a11y/accessible-emoji': 2,
'jsx-a11y/alt-text': 2,
'jsx-a11y/anchor-has-content': 2,
'jsx-a11y/anchor-is-valid': 2,
'jsx-a11y/aria-activedescendant-has-tabindex': 2,
'jsx-a11y/aria-props': 2,
'jsx-a11y/aria-proptypes': 2,
'jsx-a11y/aria-role': 2,
'jsx-a11y/aria-unsupported-elements': 2,
'jsx-a11y/click-events-have-key-events': 2,
'jsx-a11y/heading-has-content': 2,
'jsx-a11y/iframe-has-title': 2,
'jsx-a11y/img-redundant-alt': 2,
'jsx-a11y/interactive-supports-focus': 2,
'jsx-a11y/label-has-associated-control': 2,
'jsx-a11y/media-has-caption': 2,
'jsx-a11y/mouse-events-have-key-events': 2,
'jsx-a11y/no-access-key': 2,
'jsx-a11y/no-autofocus': 2,
'jsx-a11y/no-distracting-elements': 2,
'jsx-a11y/no-interactive-element-to-noninteractive-role': 2,
'jsx-a11y/no-noninteractive-element-interactions': 2,
'jsx-a11y/no-noninteractive-element-to-interactive-role': 2,
'jsx-a11y/no-redundant-roles': 2,
'jsx-a11y/no-static-element-interactions': 2,
'jsx-a11y/role-has-required-aria-props': 2,
'jsx-a11y/role-supports-aria-props': 2,
'jsx-a11y/scope': 2,
'jsx-a11y/tabindex-no-positive': 2,
'require-jsdoc': [
2,
{
Expand Down
71 changes: 70 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,74 @@
# Force line endings to LF.
# Force line endings to LF for cross-platform compatibility
# Specially useful for contributors on Windows machines.
* text=auto eol=lf

# Windows-specific files use CRLF
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
*.ps1 text eol=crlf

# Source code files
*.js text eol=lf
*.mjs text eol=lf
*.jsx text eol=lf
*.ts text eol=lf
*.tsx text eol=lf
*.json text eol=lf
*.css text eol=lf
*.html text eol=lf
*.xml text eol=lf
*.svg text eol=lf

# Documentation
*.md text eol=lf
*.txt text eol=lf

# Config files
*.yml text eol=lf
*.yaml text eol=lf
.gitignore text eol=lf
.eslintrc* text eol=lf
.prettierrc* text eol=lf
package.json text eol=lf
tsconfig.json text eol=lf

# Binary files
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.webp binary
*.pdf binary
*.zip binary
*.tar binary
*.gz binary
*.woff binary
*.woff2 binary
*.eot binary
*.ttf binary
*.otf binary

# Exclude files from export
.gitattributes export-ignore
.gitignore export-ignore
.github/ export-ignore
test/ export-ignore
testing/ export-ignore
*.test.js export-ignore
*.spec.js export-ignore

# Language statistics for GitHub
*.min.js linguist-generated=true
*.bundle.js linguist-generated=true
dist/ linguist-generated=true
build/ linguist-generated=true
docs/ linguist-documentation=true
examples/ linguist-documentation=true
vendor/ linguist-vendored=true
third_party/ linguist-vendored=true
node_modules/ linguist-vendored=true

# AMP-specific file types
amp.js linguist-language=JavaScript
*.amp.html linguist-language=HTML
146 changes: 146 additions & 0 deletions .github/ISSUE_TEMPLATE/performance-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
---
name: Performance Issue
description: Report a performance-related issue in AMP.
labels: 'Type: Performance, WG: performance'
body:
- type: markdown
id: header
attributes:
value: |
Thanks for reporting a performance issue! This helps us make AMP faster for everyone.

Before filing this issue, please:
- [ ] Check if this issue has already been reported
- [ ] Try reproducing the issue with the latest AMP version
- [ ] Test on multiple browsers/devices when possible

- type: textarea
id: description
attributes:
label: Performance Issue Description
description: Describe the performance problem you're experiencing.
placeholder: |
Example: "The amp-carousel component takes 3+ seconds to load when it contains more than 10 slides, causing a noticeable delay in page rendering."
validations:
required: true

- type: textarea
id: impact
attributes:
label: Performance Impact
description: Describe how this affects user experience.
placeholder: |
- Slow loading times
- High memory usage
- Poor scrolling performance
- High CPU usage
- Poor Core Web Vitals scores
validations:
required: true

- type: textarea
id: measurements
attributes:
label: Performance Measurements
description: Include any performance metrics or measurements you've collected.
placeholder: |
Please include:
- Lighthouse scores (before/after)
- Core Web Vitals metrics (CLS, FID, LCP)
- Browser DevTools performance profiling results
- Memory usage measurements
- Any other relevant metrics
render: text

- type: textarea
id: repro_steps
attributes:
label: Reproduction Steps
description: Step-by-step instructions to reproduce the performance issue.
placeholder: |
1. Visit [URL]
2. Open browser DevTools
3. Navigate to Performance tab
4. Record performance while [specific action]
5. Observe [specific performance problem]
validations:
required: true

- type: input
id: url
attributes:
label: Test URL
description: Provide a publicly accessible URL where the issue can be reproduced.
placeholder: https://example.com/amp-page-with-issue
validations:
required: true

- type: dropdown
id: device_type
attributes:
label: Device Type
description: What type of device are you testing on?
multiple: true
options:
- Desktop
- Mobile (Android)
- Mobile (iOS)
- Tablet
- Other
validations:
required: true

- type: dropdown
id: browsers
attributes:
label: Browser(s) Affected
description: Which browsers show this performance issue?
multiple: true
options:
- Chrome
- Firefox
- Safari
- Edge
- Samsung Internet
- Other
validations:
required: true

- type: dropdown
id: connection
attributes:
label: Network Connection
description: What network conditions are you testing under?
multiple: true
options:
- Fast 3G
- Slow 3G
- WiFi
- 4G/LTE
- 5G
- Offline/Cache

- type: textarea
id: components
attributes:
label: AMP Components Involved
description: List the AMP components that seem to be related to the performance issue.
placeholder: |
- amp-carousel
- amp-img
- amp-video
- amp-iframe
validations:
required: true

- type: textarea
id: additional_context
attributes:
label: Additional Context
description: Any other information that might help identify the performance issue.
placeholder: |
- AMP version
- Page size/complexity
- Third-party scripts involved
- CDN usage
- Any optimizations already attempted
71 changes: 71 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# This file enables Dependabot for automated dependency updates
# It complements the existing Renovate configuration for comprehensive dependency management

version: 2
updates:
# Enable version updates for npm dependencies in the main package.json
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "10:00"
target-branch: "main"
open-pull-requests-limit: 10
assignees:
- "ampproject/wg-infra"
commit-message:
prefix: "πŸ“¦"
include: "scope"
labels:
- "dependencies"
- "WG: infra"

# Enable version updates for npm dependencies in build-system
- package-ecosystem: "npm"
directory: "/build-system"
schedule:
interval: "weekly"
day: "monday"
time: "10:30"
target-branch: "main"
open-pull-requests-limit: 5
commit-message:
prefix: "πŸ“¦"
include: "scope"
labels:
- "dependencies"
- "WG: infra"

# Enable version updates for npm dependencies in validator
- package-ecosystem: "npm"
directory: "/validator"
schedule:
interval: "weekly"
day: "monday"
time: "11:00"
target-branch: "main"
open-pull-requests-limit: 5
commit-message:
prefix: "πŸ“¦"
include: "scope"
labels:
- "dependencies"
- "WG: caching"

# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "tuesday"
time: "10:00"
target-branch: "main"
open-pull-requests-limit: 5
commit-message:
prefix: "πŸ”§"
include: "scope"
labels:
- "dependencies"
- "github-actions"
- "WG: infra"
21 changes: 20 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,24 @@
"fileMatch": ["test/visual-diff/visual-tests.jsonc"],
"url": "./build-system/json-schemas/visual-tests.json"
}
]
],
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#3333ff",
"activityBar.background": "#3333ff",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#600000",
"activityBarBadge.foreground": "#e7e7e7",
"commandCenter.border": "#e7e7e799",
"sash.hoverBorder": "#3333ff",
"statusBar.background": "#0000ff",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#3333ff",
"statusBarItem.remoteBackground": "#0000ff",
"statusBarItem.remoteForeground": "#e7e7e7",
"titleBar.activeBackground": "#0000ff",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveBackground": "#0000ff99",
"titleBar.inactiveForeground": "#e7e7e799"
}
}
Loading