Skip to content

Staging - #47

Merged
angelina-ji merged 4 commits into
mainfrom
staging
Aug 27, 2026
Merged

Staging#47
angelina-ji merged 4 commits into
mainfrom
staging

Conversation

@angelina-ji

Copy link
Copy Markdown

No description provided.

prishaakapasi and others added 4 commits August 24, 2026 17:17
Picks up where #40 left off. Covers TIG-247, TIG-248, TIG-249.

The big one is the event card. Explore, My Events, the map rail and org
pages all had their own version, so the same event looked different
depending on where you ran into it. Now there's one card with three
densities (feed / compact / wide) and the actions only show up if you
pass a handler, so the map doesn't need an RSVP button it can't use.

While doing that I found getMyEvents was returning tags: [],
friendsAttending: [], rsvpCount: 0 etc. as literals, so My Events could
never have shown a tag or a friend no matter how it was styled. Fixed
that with batched queries.

RSVP/save/share/hide now all confirm with a toast, and RSVP gets a check
+ colour change — the label flip on its own was way too easy to miss.
Hide used to just drop the event from state with no way back, so it
collapses to a stub with an Unhide now. Turns out hide was never
reachable anyway: the prop existed and Explore passed a handler, but
nothing ever called it. "N attending" is clickable and lists people.
Created events got Edit/Delete with a confirm.

Map: clicking a pin now opens the real thing instead of that cramped
popup (whose carousel arrows sat on top of the start time). One event
opens the card, multiple open the sidebar. Timeline moved below the map
so overlays stop landing on it, and added a ResizeObserver because
Mapbox doesn't watch its own container and was leaving a blank strip
after layout changes.

Nav: rail collapses to icons and expands on hover, pushes content
instead of covering it, and there's a proper bottom tab bar on phones
since hover obviously doesn't work on touch. Responsive is only about
half done — nav, overflow fixes, the event forms and Explore are
sorted, the map isn't yet.

Also fixed a nasty one in db.ts: it made a new Postgres pool on every
hot reload and leaked the old one, so after a long dev session you'd hit
the 100 connection cap and everything died with 53300, including auth.
Cached on globalThis now. Same idea in getMapEvents, which was firing
2N+1 queries at once.

Few other things while I was in there: nested <button> in the map list
(invalid HTML, inner one unreachable in some browsers), two stacked
close buttons on the map modal, and the friends remove button which was
opacity-0 until hover AND #ececec, so basically invisible either way.
TIG-247, TIG-248.

Rebuilt the Explore sidebar to match the Figma — Find My Friends is a real
list now ("Sophia added X to their calendar" + VIEW EVENT), and Upcoming
Events reads "X is happening tomorrow!". Dropped the hand-drawn fake map
that was in there with made-up landmarks and made-up people on it. Nudged
the whole rail down 60px so it lines up with the "Today is..." line rather
than the greeting.

Kept finding the same bug while doing this: getSavedEvents,
getSimilarEvents, getFriendsEvents and getMyEvents were all returning
tags: [], rsvpCount: 0, friendsAttending: [] and isRsvped/isSaved: false
as literals. So those screens could never show a tag or the right button
state no matter what we did to the styling. Pulled the batched queries out
into loadEventEnrichment() and pointed all four at it — was about to write
it a fourth time by hand which felt like a hint. getSimilarEvents also
never bound userId despite authenticating, which is why it couldn't work
out per-user state in the first place.

Needed a real date for "tomorrow" (datetime is a pre-formatted string you
can't parse back) so added rawDatetime + formatRelativeDay, which compares
calendar days rather than hours — a 9am event tomorrow should say tomorrow
even though it's 20 hours out.

Responsive: My Events and Friends tabs shrink so three fit on a phone,
friend request rows wrap, map event list goes full width, timeline drops
its legend and the filter pills scroll sideways.

Landing page: the FORUM wordmark was cut off — -mb-6 inside an
overflow-hidden parent was clipping the letterforms, and at a fixed 130px
it was wider than a phone anyway. It's 28vw now so it still spans the
screen, locked back to 130/160px on desktop. Hero h1 was fixed at 72px and
overflowing too, and the turquoise section had min-h-[200vh] on mobile
which was two screens of mostly nothing.
- Explore no longer swaps in a fake event when the feed comes back empty,
  so the zero-events state can actually render on first load.
- toggleRsvp now returns the post-toggle attendee list along with the
  count. Every caller renders an avatar stack from it, so patching just
  the count left the viewer's own face in the stack after un-RSVPing.
- My Events drops a card from Saved / RSVP'd when the server says it's no
  longer saved / RSVP'd, instead of leaving it sitting in a list it just
  left until you reload.
- getSavedEvents filters to future events. "Upcoming Events" reads from it
  and was happily announcing a past event as happening "yesterday".
- Search placeholder no longer promises people search that the feed query
  doesn't actually do.
@angelina-ji
angelina-ji merged commit 60b880d into main Aug 27, 2026
1 check passed
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.

2 participants