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

Add toggle button to use native <img /> instead of <amp-img /> #7066

Merged
merged 12 commits into from
May 18, 2022

Conversation

dhaval-parekh
Copy link
Collaborator

@dhaval-parekh dhaval-parekh commented Apr 19, 2022

Summary

Fixes #7035

This PR provide option to the users to use native <img /> instead of <amp-img />. By default it will use <amp-img />.

AMP-GH-7035.mov

Checklist

  • My code is tested and passes existing tests.
  • My code follows the Engineering Guidelines (updates are often made to the guidelines, check it out periodically).

@dhaval-parekh dhaval-parekh force-pushed the enhancement/7035-add-toggle-for-native-img branch from d3aa482 to 546dba2 Compare April 19, 2022 07:15
@dhaval-parekh dhaval-parekh self-assigned this Apr 20, 2022
@dhaval-parekh dhaval-parekh marked this pull request as ready for review April 20, 2022 11:32
@github-actions
Copy link
Contributor

github-actions bot commented Apr 20, 2022

Plugin builds for 9dd7608 are ready 🛎️!

@codecov
Copy link

codecov bot commented Apr 20, 2022

Codecov Report

Merging #7066 (0388ce9) into develop (326d057) will increase coverage by 13.35%.
The diff coverage is 100.00%.

❗ Current head 0388ce9 differs from pull request most recent head fadf36e. Consider uploading reports for the commit fadf36e to get more accurate results

Impacted file tree graph

@@              Coverage Diff               @@
##             develop    #7066       +/-   ##
==============================================
+ Coverage      64.88%   78.23%   +13.35%     
- Complexity         0     6861     +6861     
==============================================
  Files             67      273      +206     
  Lines           1159    21856    +20697     
==============================================
+ Hits             752    17100    +16348     
- Misses           407     4756     +4349     
Flag Coverage Δ
javascript 64.88% <ø> (ø)
php 78.98% <100.00%> (?)
unit 78.98% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
includes/sanitizers/class-amp-img-sanitizer.php 97.33% <ø> (ø)
src/OptionsRESTController.php 59.34% <ø> (ø)
includes/amp-helper-functions.php 85.16% <100.00%> (ø)
includes/options/class-amp-options-manager.php 90.72% <100.00%> (ø)
src/Dom/ElementList.php 100.00% <0.00%> (ø)
templates/meta-time.php 100.00% <0.00%> (ø)
src/Cli/CommandNamespaceRegistration.php 40.00% <0.00%> (ø)
includes/sanitizers/class-amp-iframe-sanitizer.php 96.10% <0.00%> (ø)
src/ValidationExemption.php 100.00% <0.00%> (ø)
includes/sanitizers/class-amp-meta-sanitizer.php 85.29% <0.00%> (ø)
... and 200 more

@westonruter westonruter added this to the v2.3 milestone Apr 20, 2022
dhaval-parekh and others added 4 commits May 11, 2022 18:26
…nt/7035-add-toggle-for-native-img

* 'develop' of github.com:ampproject/amp-wp:
  Bump @babel/core from 7.17.10 to 7.17.12 (#7103)
  Bump @actions/github from 5.0.2 to 5.0.3 (#7101)
  Bump google/cloud-storage from 1.26.3 to 1.27.0 (#7102)
  Bump @babel/plugin-proposal-class-properties from 7.16.7 to 7.17.12 (#7104)
  Bump eslint-plugin-jest from 26.1.5 to 26.2.2 (#7105)
  Bump actions/setup-node from 3.1.1 to 3.2.0 (#7106)
  Merge pull request #7099 from ampproject/dependabot/npm_and_yarn/actions/github-5.0.2
  Update Jest snapshots (npm run test:js -- --updateSnapshot)
  Update Gutenberg package dependencies
  Bump tested up to WP 6.0
  Try to fix E2E test cases
  Update unit test case
  Update test cases
  Add 'data-amp-auto-lightbox-disable' attribute to HTML tag instead of body tag to disable auto-lightbox
  Merge pull request #7095 from ampproject/dependabot/npm_and_yarn/grunt-1.5.3
@westonruter westonruter merged commit e31f594 into develop May 18, 2022
@westonruter westonruter deleted the enhancement/7035-add-toggle-for-native-img branch May 18, 2022 21:39
@pooja-muchandikar pooja-muchandikar mentioned this pull request Jun 6, 2022
2 tasks
@westonruter westonruter added the Changelogged Whether the issue/PR has been added to release notes. label Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelogged Whether the issue/PR has been added to release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add toggle to manage whether native img is used instead of amp-img and add admin pointer
2 participants