Zenodo video embeding#1300
Open
eilmiv wants to merge 11 commits intoElixirTeSS:masterfrom
Open
Conversation
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
eilmiv
commented
May 5, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Zenodo-hosted video embedding for materials, analogous to existing YouTube embedding, by introducing a Zenodo renderer, helper wiring, and client-side logic to select an appropriate media file from the Zenodo API.
Changes:
- Add
Renderers::Zenodoto generate an HTML5<video>embed and bootstrap it with a JS helper that fetches the Zenodo files list. - Wire Zenodo embedding into the materials show view and refactor helper logic to support multiple “video renderers”.
- Add styling + tests/fixtures to cover embedded Zenodo video rendering.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/fixtures/materials.yml | Adds a Zenodo “video” material fixture used by controller tests. |
| test/controllers/materials_controller_test.rb | Adds a show-page assertion for Zenodo embedded video presence. |
| lib/renderers/zenodo.rb | New renderer that detects Zenodo/DOI URLs and outputs video+script embed markup. |
| app/views/materials/show.html.erb | Renders Zenodo embed block alongside existing YouTube embed. |
| app/helpers/materials_helper.rb | Adds embed_zenodo and refactors embedding into a shared embed_video helper. |
| app/assets/stylesheets/application.scss | Centers embedded content via flexbox. |
| app/assets/javascripts/materials.js | Adds make_zenodo_video which fetches Zenodo files and sets the <video> source. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
Motivation and context
closes #1299
Screenshots
Checklist