|
Download task_022/instruction.md from Lego-X/UXInteract: direct link, hf CLI and curl.
- Browser
- Download file 1.55 kB
-
https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_022/instruction.md
- Command line
-
hf download hf://datasets/Lego-X/UXInteract/task_022/instruction.md
-
curl -L -o instruction.md https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_022/instruction.md
1.55 kB
| # Floating draft composer | |
| In the supplied root `index.html`, turn the floating prompt area into the composer for an unsent message. Move the existing editable control into it rather than making a second editor; remove the floating copy of sent content. Keep the page offline. | |
| ## Interaction and style | |
| Retain `data-testid="floating-prompt-area"` and `data-testid="reusable-prompt-input"`. Keep the floating area fixed, visible within the viewport and stable during scrolling. Add an identifiable Send button with `data-testid="send-button"`. While editing, keep draft text only in the composer. Sending nonblank text appends one user message bubble containing the submitted text in the chat history and clears the composer. Whitespace-only input does not append anything. Mark user bubbles with the existing user-message class or `data-testid="chat-message-user"`. | |
| Expose `window.__setComposerCorners(mode)` with `"square"` and `"rounded"`. The square state has computed radius 0 and the rounded state has positive radius. Switching modes or scrolling must not replace the input, lose its draft or inadvertently reset its corners. | |
| ## Acceptance Checklist | |
| - The offline page presents one reusable editor within a fixed, in-viewport composer. It stays put during scrolling and does not duplicate unsent drafts or display old sent-message text there. | |
| - Send appends exactly one separate bubble with the entered text, clears the input and ignores blank text. | |
| - Both corner styles take effect on the same composer and preserve the current draft. | |