Skip to content

feat(ui): the first screen leads with its title, the search, and classes near the visitor - #531

Merged
Ardnived merged 3 commits into
mainfrom
feat/first-screen
Nov 27, 2026
Merged

Ardnived merged 3 commits into
mainfrom
feat/first-screen

Conversation

@Ardnived

@Ardnived Ardnived commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The first screen leads with "Free meditation classes", a full-width "Enter your city or postcode"
    search, and one line under it to classes near the visitor; their own country leads the country list.
  • The same line hangs under the search on other countries' pages only; the old above/below banner goes.

Change outline

Components — the first screen

 CountriesView                                        src/views/CountriesView/CountriesView.tsx
-  DrawerHeader: SearchField · Filters
+  DrawerHeader: DrawerTitle "Free meditation classes" · Filters
+  DrawerToolbar field: SearchField near="home"
   DrawerBody
-    GeolocationSuggestion above / below
     Online classes · Join from anywhere
     Or browse by country
-    countries by eventCount
+    own country first, then eventCount               # inline sort
+      own = location.countryCode, unless the guess was removed before the screen opened

Components — the location line

SearchField takes a near prop and hangs one Alert under the field; GeolocationSuggestion
and the GeolocationPrompt molecule go. MapSearch stays the geocoder organism under it.

 SearchField({ label, near?: 'home' | region })      src/views/shared.tsx
   MapSearch → placeSearchPath                        # unchanged
+  near → LocationLine
+    locationLineHere(near, visitor)                  src/lib/geolocation.ts
+      home → yes · another country → yes · own country, region, city → no
+    guess shown (shouldShowGeolocationPrompt, not removed) → "Classes near Prague ›" + ×
+      accept → placeSearchPath(guessedPlace(...)) · × → useApproxLocation.dismiss()
+    guess still being judged (feed not loaded) → no line yet
+    else home and no place search
+      "Classes near me ›" → useNearMe({ naming: hasMap })   # the filters' Near me
+        waiting → "Finding your location…" · refused → line gone, cursor to the field
 RegionView
-  GeolocationSuggestion above / below (every region)
+  SearchField near={region}, none while the feedback banner is up
 SearchView
-  GeolocationSuggestion above / below

Flow — the location is there at the first render

 start → mount()                                      src/loader/index.ts
-  boot(config, observed, geoPromise)                 # landed whenever it resolved
+  Promise.all([import('../Widget'), race(import('./geo.js'), GEO_WAIT_MS 1.5s)])
+  → boot(config, observed, location)                 # set before the first render
 main.tsx (standalone)
+  await the same race before rendering

Behaviour — the phone sheet

 sheetOpening(kind)                                   src/views/DrawerStack/sheet-ladder.ts (#529)
-  undefined (the first screen) → open
+  undefined (the first screen) → home → HOME_SNAP 380px
+sheetLadder({ …, home })                             # home → [peek, HOME_SNAP, near-full]

Files — copy, loading shape, docs

 src/config/translations.en.json   + countries.near_city / near_me / locating (SahajCloud#1295); search.chrome.placeholder → "Enter your city or postcode"
 src/config/translations.test.ts   search.nearby_prompt.title retiring (SahajCloud#1296)
 Skeleton / fallbacks              the root's loading and error chrome: title, then search band with the line's room
 config/store                      useApproxLocation gains dismissed + dismiss(); the session flag moves to lib/approx-location
 docs/embedding.md, README, CHANGELOG   own country first; "Classes near me" uses the same geolocation

Preview

Preview pending — the app preview and the Ladle playground publish from CI.

  • Ladle Views / Countries (Location control: guessed town, country only, none), Views / Region →
    "Another country", Interactive / Full Widget (visitor in Prague; Czechia leads).

Contract impact

No parameter, origin or permission change. docs/embedding.md names the first screen's "Classes near
me" beside the map's find-me and Near me under geolocation, and the privacy section adds the country
order. The new copy is in SahajCloud#1295 (merged); the hint's new words are in SahajCloud#1299 (merge it before this);
search.nearby_prompt.title retires in SahajCloud#1296.

Test results

  • Lean gate: ✓ lint, typecheck, unit lane
  • Accessibility gate: ✓ clean (built without a Mapbox token, as CI builds it)
  • Browser lane: runs in CI. Locally every scenario hangs on boot, main's build included, so this machine
    cannot judge it.

Manual verification

  1. Phone: the first screen opens with the first country in view; tapping X turns the line into
    "Classes near me" without moving the list.
  2. "Classes near me" with location allowed opens results near you; refused, the line goes and the cursor
    is in the search.
  3. Another country's page shows the line; your own country, a region and a city do not.

Notes for reviewer

  • Not built here, by the owner's choice: focusing the search does not raise the phone panel yet. It waits
    for the iPhone keyboard fix, since on iOS 26 a raised panel slid the box off screen.
  • The ticket's ask that the line "moves the list by one line at most" holds by construction: the line is
    in the search band above the list, and arrives with the location, usually before the first render.

🤖 Generated with Claude Code

Ardnived added a commit that referenced this pull request Nov 27, 2026
@sydevs-dispatcher

sydevs-dispatcher Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

🤖 no session running
CI fix 1

recent dispatches
  • 16:23Z fix-ci · attempt 1 · session · done
  • 16:23Z fix-ci · attempt 1 · session
  • 15:10Z resolve-conflicts · attempt 3 · session · timed out
  • 15:10Z resolve-conflicts · attempt 3 · session
  • 12:51Z resolve-conflicts · attempt 2 · session · timed out

Written by the sydevs dispatcher. Sessions never edit this comment.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
sahajatlas-design 95c94c6 Nov 27 2026, 04:22 PM

@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 27, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 27, 2026
…ses near the visitor

"Free meditation classes" heads the first screen, Filters beside it, and the
search spans the panel with "Enter your city or postcode" (search.chrome.
placeholder, reworded in sydevs/SahajCloud#1299) as its hint everywhere.

SearchField takes a `near` prop and hangs one line under the field, drawn
with the Alert atom: the guessed town ("Classes near Prague ›", with an × that
removes it for the visit), or on the first screen "Classes near me ›", the
filters' Near me; a refusal takes the line away and moves the cursor to the
field. locationLineHere keeps it to the first screen and other countries'
pages, never a region, a city, search results or the visitor's own country.
The old banner and its GeolocationPrompt molecule go.

The loader now waits for /geo.js before it boots (at most GEO_WAIT_MS), as the
standalone page does, so the location is there at the first render and the
visitor's country leads the country list without ever reordering it; a guess
removed before the screen opened leaves the busiest-first order.

The phone sheet's openings are #529's sheetOpening table with the first
screen as its `home` row (380px, so the first country shows). The loading
skeleton and the error chrome take the new shape. The session dismissal flag
moves beside the location parser, keeping turf out of the store's chunk.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sydevs-dispatcher sydevs-dispatcher Bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 27, 2026
@sydevs-dispatcher sydevs-dispatcher Bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Nov 27, 2026
…pied contract matches main

The first screen's skeleton drew a 40px line where the real Alert is 36px, so
the browser lane saw the search band 4px taller while loading. The squash
carried a stale payload-types.ts; it is main's again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sydevs-dispatcher sydevs-dispatcher Bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 27, 2026
@sydevs-dispatcher

Copy link
Copy Markdown
Contributor

The session for resolve-conflicts did not finish after 3 attempts. I have stopped retrying. A mention (@sydevs-bot) or a push from you starts me again.

🤖 sydevs dispatcher

@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Nov 27, 2026
@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 27, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Nov 27, 2026
The first screen's title, its location line (the Alert atom, the filters' Near
me hook and the rules for where the guess shows) and its own sheet stop are
eager on purpose: the line must be there at the first paint, so it cannot sit
behind a lazy seam. The embed graph shipped 336.0 KiB against 336 in CI, the
growth the feature is; standalone keeps its 336 with 1.0 KiB spare.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Ardnived
Ardnived merged commit 998cddd into main Nov 27, 2026
13 checks passed
@Ardnived
Ardnived deleted the feat/first-screen branch November 27, 2026 16:41
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Done in SYDevelopers Technical Roadmap Nov 27, 2026
Ardnived added a commit to sydevs/SahajCloud that referenced this pull request Nov 27, 2026
…s key (#1300)

The atlas first screen (sydevs/SahajAtlasWeb#531, merged) offers the
visitor's city through countries.near_city instead, so translators were
still asked to fill "Looking for classes near %{city}?" for nothing.
title was the group's only key, so search.nearby_prompt leaves the schema,
the ten seed files and the generated types whole, and a generated
migration drops its column on the main and version tables, as #1291 did
for filters.region.

Closes #1296

Co-authored-by: Claude Opus 5.5 <[email protected]>
@Ardnived Ardnived removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 27, 2026
Ardnived added a commit that referenced this pull request Nov 28, 2026
Brings in #520–#551. Resolutions:
- ShareView stays deleted (#540); the inline split's class views are the class and its sign-up,
  and the aside under the map takes the actions, then Register, in #540's order.
- The calendar's width reads #538's `isCalendarFullWidth` off the URL; #466's
  `calendarFillsWidth` goes with Schedule-X.
- MapControls and Mapbox take both `settings` and #542's `filterMenus`; MapLayer passes the
  floating filter buttons, and DrawerStack claims them only for a sheeted stack.
- The root view's new title (#531) is a place's, so inline it gives way to the page heading.
- Main's Event "Layout" control is dropped: the Expanded form shows the phone sheet.
- The panel stays 384px, including FilterMenus' cap; translations re-synced from production.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant