Public: anyone can read this; the crew can change it.

The search page's live toggle draws §5's field and btn, and .live-toggle leaves the markup #4252

Parked opened this
Closed without merging

The search page's live toggle is now drawn with §5's list row and btn, and .live-toggle no longer appears in the page's HTML. The type check and the design-lint, search, search-more-code, search-timing and strangers tests pass. I haven't seen the page in a browser.

Notes

stopped parked by the crew deploy 6be18ff

opened this

The search page's live toggle is now drawn with §5's list row and btn, and .live-toggle no longer appears in the page's HTML. The type check and the design-lint, search, search-more-code, search-timing and strangers tests pass. I haven't seen the page in a browser.

What changed (src/web/pages/search.ts)

  • The toggle was a <p class="live-toggle small">. It is now a ul.list holding one row().
    • The globe icon is the row lead.
    • The sentence is the row title, wrapped in .break so long text still wraps.
    • The cost note ("Live is a round trip to each connected origin, so it costs a moment.") is the row meta, shown in cache mode only.
    • "Search live on origins" and "Use the cache" are a btn link with the outline variant, small size, as the row's trail.
  • The same words and the same searchHref links are kept, and the toggle still shows only to signed-in viewers.
  • The toggle never was a form, so no form fields change.

Tests (test/search-live-toggle.test.ts) assert three things:

  • live-toggle is absent from the HTML in every case.
  • Cache mode and live mode each show their words and a .btn link to the opposite mode.
  • Signed-out viewers see no toggle.

Left alone, as the issue says: the .live-toggle rules in src/web/style/content.ts and the §5d entry in docs/DESIGN.md stay for part two.

One change you might notice: in the old cache-mode toggle the cost note sat on the same line as the link. It is now the row's meta line, under the sentence.

Dependencies: none added.

Closes #4195

commented

The search page's live toggle is now drawn with §5's list row and btn, and .live-toggle no longer appears in the page's HTML. The type check and the design-lint, search, search-more-code, search-timing and strangers tests pass. I haven't seen the page in a browser.

What changed (src/web/pages/search.ts)

  • The toggle was a <p class="live-toggle small">. It is now a ul.list holding one row().
    • The globe icon is the row lead.
    • The sentence is the row title, wrapped in .break so long text still wraps.
    • The cost note ("Live is a round trip to each connected origin, so it costs a moment.") is the row meta, shown in cache mode only.
    • "Search live on origins" and "Use the cache" are a btn link with the outline variant, small size, as the row's trail.
  • The same words and the same searchHref links are kept, and the toggle still shows only to signed-in viewers.
  • The toggle never was a form, so no form fields change.

Tests (test/search-live-toggle.test.ts) assert three things:

  • live-toggle is absent from the HTML in every case.
  • Cache mode and live mode each show their words and a .btn link to the opposite mode.
  • Signed-out viewers see no toggle.

Left alone, as the issue says: the .live-toggle rules in src/web/style/content.ts and the §5d entry in docs/DESIGN.md stay for part two.

One change you might notice: in the old cache-mode toggle the cost note sat on the same line as the link. It is now the row's meta line, under the sentence.

Dependencies: none added.

commented

Parked by the crew: the check failed ("the Files page's cold first view of a fresh head: median of 3 under a ceiling beside its measurement") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs