Skip to content

Let the mascot speak first and type on its laptop - #94

Merged
jsshin2022 merged 1 commit into
mainfrom
mascot-talk
Nov 7, 2026
Merged

jsshin2022 merged 1 commit into
mainfrom
mascot-talk

Conversation

@jsshin2022

Copy link
Copy Markdown
Member

Follow-up to #93. The mascot now speaks first and visibly types on its laptop.

The mascot speaks first

  • Lines per page: a short line typed into a bubble above the mascot, with one or two reply buttons:
    • Hub: a greeting a moment after load, then "모르는 주제나 용어가 있으면 저한테 바로 물어봐도 돼요" when the reader scrolls to 자료실. If the reader reaches 자료실 before the greeting, the section line is the only one shown.
    • Library: a greeting with two starter questions.
    • Article: "읽다가 모르는 말이 있었나요?" once the reader is past the middle of the post.
  • Replies: a reply button opens the panel and asks the question, or focuses the input.
  • Not pushy:
    • Each line is shown once per visit (sessionStorage).
    • The bubble goes away by itself after 14 seconds unless hovered or focused.
    • Its close button keeps the mascot quiet for the rest of the visit.
    • It never speaks while the panel is open.
  • Section lines: these start watching only after the first scroll. Before the page has drawn, every section sits in view and would trigger at once.
  • helper_say and helper_say_close events show how often lines are seen and dismissed.

Typing animation

  • New image: assets/img/mascot-blank.webp is the mascot with the </> removed from its screen. The button draws the </> back on top as SVG strokes at the same place and colors, so at rest it looks the same as before.
  • While the mascot types (greeting bubbles, answers being prepared and typed, a short burst on hover):
    • <, / and > appear key by key with a caret following them, then the caret blinks.
    • The mascot bobs slightly.
  • Typed text: bubble text and panel answers are typed character by character. Links and buttons appear when the typing ends.
  • Screen readers: they get the whole line at once from a hidden copy. The typed text is aria-hidden.
  • Reduced motion: text appears at once and nothing moves.

Checks

  • Tested on hub, library and article, desktop and phone, light and dark: no console errors and no sideways scroll.
  • Line order checked for three cases: waiting for the greeting, scrolling fast to 자료실, and reloading in the same visit. The close button stops later lines.
  • axe finds nothing on the bubble or the open panel.
  • Existing hub scripts and check_data.py pass.

Generated by Claude Code

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant