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: Support iframes in container media content #1487

Merged
merged 6 commits into from
Sep 7, 2023

Conversation

avinashbot
Copy link
Member

@avinashbot avinashbot commented Aug 25, 2023

Description

We'd like to support automatically scaling the <iframe> element as a direct child of the media container. For youtube embeds and such.

Related links, issue #, if available: AWSUI-22100

How has this been tested?

There are screenshot tests for this styling on images already. Don't know if it's worth adding iframe-specific screenshot tests and scenarios for just width: 100%; height: 100%. iframes now have custom styling (removing the border), so added some permutations.

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@avinashbot avinashbot marked this pull request as ready for review August 25, 2023 14:26
@avinashbot avinashbot requested a review from a team as a code owner August 25, 2023 14:26
@avinashbot avinashbot requested review from taheramr and removed request for a team August 25, 2023 14:26
@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.12% 🎉

Comparison is base (fb4b027) 93.81% compared to head (03c34ee) 93.93%.
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1487      +/-   ##
==========================================
+ Coverage   93.81%   93.93%   +0.12%     
==========================================
  Files         640      642       +2     
  Lines       17273    17276       +3     
  Branches     5683     5682       -1     
==========================================
+ Hits        16204    16228      +24     
+ Misses        996      976      -20     
+ Partials       73       72       -1     
Files Changed Coverage Δ
src/__a11y__/axe.ts 100.00% <ø> (ø)

... and 22 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@just-boris
Copy link
Member

Could you add an iframe example to dev page?

We cannot render external resources, but I think we can get an inline content like <iframe>it works</iframe>

taheramr
taheramr previously approved these changes Aug 31, 2023
@avinashbot avinashbot merged commit 0a9234b into main Sep 7, 2023
23 of 24 checks passed
@avinashbot avinashbot deleted the media-container-iframe branch September 7, 2023 09:23
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.

3 participants