Embed README example video#6508
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
Greptile SummaryThis PR replaces the extended DALL-E walkthrough section in
Confidence Score: 4/5Safe to merge on GitHub where the video renders natively; the only degradation is on PyPI where the The change is confined to README documentation with no code impact. The video embed works as intended on GitHub, and a text fallback exists. The main trade-off is that the PyPI project page — previously showing the animated GIF — will now show only a plain hyperlink. README.md — specifically how the Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User views README] --> B{Renderer}
B -->|GitHub.com| C[Native video player rendered with controls + muted]
B -->|PyPI / other registries| D[video tag stripped by sanitizer]
D --> E[Fallback anchor text shown: Watch the Reflex image generation example video.]
B -->|Raw Markdown tools e.g. pandoc VS Code| F[HTML block passed through - behavior depends on tool]
Reviews (1): Last reviewed commit: "Make README video description generic" | Re-trigger Greptile |
| Build an image generation app in Python with Reflex: define the UI, manage state in a class, and call an image model from an event handler. | ||
|
|
||
| <div align="center"> | ||
| <img src="https://raw.githubusercontent.com/reflex-dev/reflex/main/docs/images/dalle.gif" alt="A frontend wrapper for DALL·E, shown in the process of generating an image." width="550" /> | ||
| <video src="https://github.com/user-attachments/assets/aaff28ad-8b3c-43bf-967e-439ee34c8a87" width="900" controls muted> | ||
| <a href="https://github.com/user-attachments/assets/aaff28ad-8b3c-43bf-967e-439ee34c8a87">Watch the Reflex image generation example video.</a> |
There was a problem hiding this comment.
<video> tag stripped on non-GitHub renderers
The original <img src="https://raw.githubusercontent.com/..."> renders everywhere (GitHub, PyPI, npm registry, offline Markdown tools). The new <video> tag is sanitized out by PyPI's HTML allowlist, so visitors arriving from the PyPI project page will only see the fallback anchor text Watch the Reflex image generation example video. — no visual. Consider keeping a static poster image (e.g. a thumbnail from the GIF) as a visible fallback, or verifying whether PyPI display matters for this repo.
|
|
||
| <div align="center"> | ||
| <img src="https://raw.githubusercontent.com/reflex-dev/reflex/main/docs/images/dalle.gif" alt="A frontend wrapper for DALL·E, shown in the process of generating an image." width="550" /> | ||
| <video src="https://github.com/user-attachments/assets/aaff28ad-8b3c-43bf-967e-439ee34c8a87" width="900" controls muted poster="https://raw.githubusercontent.com/reflex-dev/reflex/main/docs/images/reflex-image-generation-app.png"> |
There was a problem hiding this comment.
vidoes don't seem to be supported on pypi, if you would like, you can do a GIF/APNG instead
Summary
<video>is stripped.Validation
git diff --check.gh api markdown; the attachment URL produces a native<video>element.readme_renderer.markdown; the sanitized output preserves the linked poster<img>fallback.