Repository navigation
feat(media): show an image, video or audio item on every question - #4078
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
AndyScherzinger
force-pushed
the
feat/content-block
branch
from
December 2, 2026 21:40
c804ec0 to
2e774df
Compare
AndyScherzinger
force-pushed
the
feat/question-media
branch
2 times, most recently
from
December 2, 2026 21:50
2afc3c7 to
a6209f0
Compare
AndyScherzinger
force-pushed
the
feat/content-block
branch
from
December 2, 2026 21:54
2e774df to
075eb3f
Compare
AndyScherzinger
force-pushed
the
feat/question-media
branch
from
December 2, 2026 21:56
a6209f0 to
0daf5d1
Compare
AndyScherzinger
force-pushed
the
feat/content-block
branch
from
December 3, 2026 01:02
075eb3f to
ae8ea70
Compare
AndyScherzinger
force-pushed
the
feat/question-media
branch
from
December 3, 2026 01:02
0daf5d1 to
67bbf53
Compare
1 task done
AndyScherzinger
force-pushed
the
feat/question-media
branch
from
December 3, 2026 11:34
67bbf53 to
d1481d4
Compare
AndyScherzinger
force-pushed
the
feat/content-block
branch
from
December 3, 2026 11:34
ae8ea70 to
618e04d
Compare
1 task done
AndyScherzinger
force-pushed
the
feat/question-media
branch
from
December 3, 2026 12:17
d1481d4 to
7b5d9a8
Compare
AndyScherzinger
force-pushed
the
feat/content-block
branch
from
December 3, 2026 12:17
618e04d to
9af3156
Compare
A picture, a clip or a recording often belongs to the question it explains, not to a block of its own: "What do you see in this image?" needs the image right next to its answer field. Every question type now accepts the extra setting `media` that content blocks use, and shows it below the description, inside the question. The editor offers "Add image, video or audio" in the actions of a question, which shows the address field and moves the focus to it, and "Remove image, video or audio" to take it away again; content blocks keep the field always visible. The answer fields of a question name the item in their accessible description next to the question's description, so screen reader users hear it while answering. The results summary shows the item of a question as well, with the same consent notice for YouTube and Vimeo. The display and the fields move from the content block into a QuestionMedia component that Question renders for every type, and the media helpers of the e2e tests into a shared support file. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AndyScherzinger
force-pushed
the
feat/question-media
branch
from
December 3, 2026 13:42
7b5d9a8 to
16932e0
Compare
Chartman123
approved these changes
Dec 3, 2026
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.
Follow-up to #4076 (content block), which is merged.
What it solves
An image, a clip or a recording often belongs to the question it explains, not to a block of its own: "What do you see in this picture?" needs the picture right next to its answer field. With #4076 alone, the item has to sit in a separate content block above the question.
What changed
mediathat content blocks use ({url, alt, type}, seedocs/DataStructure.md). The server detects the type on save exactly as for content blocks: YouTube/Vimeo, or a public share of this Nextcloud looked up through the share manager. No other address is ever fetched.QuestionMediacomponent thatQuestionrenders for every type. The media helpers of the e2e tests move intoplaywright/support/media.ts.How to test
E2E coverage:
playwright/e2e/question-media.spec.ts. Unit tests: new cases inFormsServiceTest.Screenshots
Taken on Nextcloud 35 with the head of this branch.
Actions of a question:
A form with an image on a short answer, a video on radio buttons, audio on checkboxes and a YouTube video on a linear scale:
320 px wide screen:
Results summary:
🤖 AI (if applicable)