Skip to content

feat(web): add camera capture entry to mobile chat menu - #3292

Open
ant-cave wants to merge 2 commits into
HKUDS:devfrom
ant-cave:feat/camera-capture-menu
Open

ant-cave wants to merge 2 commits into
HKUDS:devfrom
ant-cave:feat/camera-capture-menu

Conversation

@ant-cave

@ant-cave ant-cave commented Dec 5, 2026 •

Copy link
Copy Markdown

On mobile there's no direct way to snap a photo and send it to the tutor — the system file picker usually has no camera option.

Adds a "Take photo" row at the top of the + menu. It uses capture="environment" to open the rear camera, triggered by a <label> (a programmatic .click() makes Chrome ignore capture). The photo goes through the existing attachment flow, and the row is hidden on desktop with md:hidden. Also adds the Take photo key to all 14 locales.

Screenshot at 390px:

camera menu

npm run typecheck and npm run i18n:check pass.

Closes #3291

Adds a Take photo entry above Attach files in the mobile + menu,
using capture=environment to open the rear camera directly.
Reuses the existing attachment flow; hidden on desktop via md:hidden.

Closes HKUDS#3291. Related to HKUDS#366.
@github-actions github-actions Bot added enhancement New feature or request web Web frontend (Next.js UI & components) labels Dec 5, 2026
A fixed "camera-input" id would cross-link the label to another composer instance if more than one ChatComposer is mounted. Generate a unique id with useId() in ChatComposer and pass it to ChatSpaceMenu as an optional prop; the entry does not render when the prop is absent.
@ant-cave
ant-cave marked this pull request as ready for review December 5, 2026 18:55

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request web Web frontend (Next.js UI & components)

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant