Automations and webhooks for the AT Protocol airglow.run

fix(form): keep the Lexicon hint and the "Watching all repos" notice from jumping the layout #95

Open opened by tyb.there-hugo.dev

Follow-up to #87.

Problem #

#87's Expected says "The layout doesn't jump." It still does, in two places under the Lexicon NSID field:

  • The hint "Fires when anyone writes a record..." only renders once isValidNsid(lexicon) is true, so typing a valid NSID pushes the rest of the form down, and editing it into an invalid one pulls it back up.
  • For an NSID that requires wanted DIDs, the "Watching all repos" notice is removed instead of being reworded, so the form shrinks as soon as the NSID becomes valid.

docs/design.md's "Conditional sections" rule asks for the same thing: content that depends on another field keeps its place and changes its wording instead of appearing and disappearing.

Evidence #

  • app/islands/AutomationForm.tsx:3316: {isValidNsid(lexicon) && ( gates the hint.
  • app/islands/AutomationForm.tsx:3354-3357: the "Watching all repos" notice, and its branch on isValidNsid(lexicon).
  • app/islands/AutomationForm.tsx:1102: nsidRequiresWantedDids decides when the notice is dropped.

Expected #

The text under the Lexicon field takes the same space whatever the NSID is. With no valid NSID yet, it says something generic; with a valid one, it names the NSID; with one that requires wanted DIDs, it says that instead of vanishing.

Acceptance criteria #

Out of scope #

Whether the notice should be an alert at all. That's tracked in the "standing Watching all repos alert" issue filed alongside this one.

Sign up or Sign in to add to the discussion.