Repository navigation
Hero demo: backspace the example out and rest on the hint - #125
Merged
Merged
Conversation
The hero demo used to type the example prompt, stream a ghost autocomplete after it, and leave the example in the field as a ready draft. Now it types the example behind the orange caret, rests 1.6s, backspaces it out at a held-key pace (35ms/char), and leaves the empty field on its grey hint. The demo no longer shows a suggestion. Autocomplete while the user types is unchanged. The example is now only an illustration, so every way the demo ends (it finishes, a click/focus/keypress/input, leaving Home, the tab hiding, a reduced-motion flip) lands the same empty field. That removes the demo-owned/frozen state that existed to stop the example joining or being submitted as the user's prompt. The textarea ships empty; the example moves to data-demo-prompt, so reduced motion and deep links also rest on the hint. Tests: STU-445 hero specs rewritten for the new end state, plus a new mid-erase takeover spec. Pipeline/settings specs that clicked Generate on the old pre-filled prompt now fill one first.
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.
What changes on the home page
Before: the hero demo typed
A circular progress gauge with a gradient stroke, then streamed a grey autocomplete (and an animated percentage label) after it. The example then stayed in the field as a draft you could submit.After:
Frames from a real Chromium capture of the erase phase: the full prompt with the caret, then
…gradient stro,…with a gra,A circul,A ci, and finally the grey hint.Scope
heroDemoOwned/heroDemoFrozen) unnecessary, so it is deleted. That state existed only to stop the example being submitted, or the user's text joining it.composerAdapter.js: −131 / +63.<textarea>now ships empty, and the example moves todata-demo-prompt. Reduced-motion visitors and deep links therefore also land on the hint instead of a pre-filled prompt.is-demo-streamingcaret CSS was only used by the removed suggestion stream, so it is deleted.dist/is rebuilt. A clean build ofmainmatched the committeddist, so the asset diff here comes only from this change.Behaviour change to be aware of
Generate is now disabled on first load because the field is empty. Before, the pre-filled example made Generate one click away. The example chips still fill a prompt in one tap.
Tests
npm test: 423/423 passnpx playwright test(full suite): 268 passed, 0 failedcaret-blinkanimation is running at the peakhas-suggestnever appearsstu377specs and onestu385spec clicked Generate without typing a prompt. They had been relying on the old pre-filled example, and on silently waiting about 10s for the demo to finish. They now fill a prompt first.Expected > 2, Received 1).