-
Notifications
You must be signed in to change notification settings - Fork 3
Add Safari compatibility warnings for embed component #1721
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
base: main
Are you sure you want to change the base?
Conversation
- Add warning to embed component page about Safari compatibility issues - Recommend using <video> component instead for embedding videos - Update markdown content page with same Safari warning - Emphasize better cross-browser support with <video> component Co-Authored-By: Colton Berry <[email protected]>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
| - `<Download src="..." />` - read more about it [below](#downloadable-assets). | ||
|
|
||
| <Warning> | ||
| The `<embed>` component is not well-supported on Safari and may cause compatibility issues. For embedding videos, use the `<video>` component instead, which provides better cross-browser support and more control over playback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [vale] reported by reviewdog 🐶
[Microsoft.Contractions] Use 'isn't' instead of 'is not'.
| <embed src="./embed-fern-waving.mp4" type="video/mp4" width="640px" height="360px" /> | ||
|
|
||
| <Warning> | ||
| The `<embed>` component is not well-supported on Safari and may cause compatibility issues. For embedding videos, use the `<video>` component instead (see below), which provides better cross-browser support and more control over playback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [vale] reported by reviewdog 🐶
[Microsoft.Contractions] Use 'isn't' instead of 'is not'.
Co-Authored-By: Colton Berry <[email protected]>
- Update warnings to discourage embed for all asset types (not just videos) - Recommend video component for videos, Download component for PDFs, img tag for images - Fix broken link from /learn/docs/content/write-markdown to /learn/docs/writing-content/markdown - Add notes to PDF and video sections with recommended alternatives - Update markdown.mdx to be consistent with embed.mdx warnings Co-Authored-By: Colton Berry <[email protected]>
Discourage embed component usage and fix broken links
Summary
Updated documentation to discourage using the
<embed>component for all asset types (videos, PDFs, images) due to inconsistent browser support, particularly on Safari and mobile browsers. Added warnings and recommendations to use better alternatives:<video>component for videos,<Download>component for PDFs, and<img>tag for images. Also fixed broken links that pointed to incorrect URL paths.Key changes:
<Warning>callout at top of embed component page discouraging embed usage for all asset types/learn/docs/content/write-markdown#embedding-videos→/learn/docs/writing-content/markdown#local-videos<Note>callouts recommending better alternativesReview & Testing Checklist for Human
<embed>for ALL asset types (not just videos) aligns with product direction. The original request was Safari-specific for videos, but this evolved to a blanket recommendation against embed./learn/docs/writing-content/markdown#local-videosand/learn/docs/writing-content/components/embed<video>component,<Download>component, and<img>tag work well as the recommended alternatives on various browsers.Notes