~ knotless Search/
↑↓ move↵ open⇧↵ all results

grain.social/grain

photography-focused photo sharing platform

grain.social
1 collaborator
0
2

next: a gallery's 💬 in the feed opens its comments first

Merged
Merged chadtmiller.com asked to merge into main from grain.social/grain:comments-fix

What changes

On the next grain.social and the apps, tapping 💬 under a gallery in a feed now opens the gallery's comments as a sheet: the grain-comments view, social.grain.comment.getThread. That sheet has its own "Add a comment…" form at the bottom. Before this, the tap opened a blank write form, so the comments could only be read by opening the gallery first.

The button still shows the comment count, and the count goes up as comments are written. The view change is one prop on the feed's Comment Compose in next/views/grain-feed.json:

"shows": { "query": "social.grain.comment.getThread", "params": { "subject": { "$": "uri" } }, "sheet": true }

This uses shows on Compose, which HUD 0.30.0 added. Main already takes HUD 0.31.0 (56180476).

Why

You have to see the comments before writing one. Stories already open their comments as a sheet, through a Link. A Link can't carry the feed's live count, so HUD gained shows on Compose (at://did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.pull/3n3i4ys5ji6ny). The web, iOS and Android all draw the change from this one view. A kit older than 0.30.0 ignores shows and opens the form as before.

How it was checked

  • HUD_WORKSPACE=off hud check next with HUD v0.31.0 passes: 1 app and 21 views. node next/check-apps.mjs passes too.
  • HUD's own tests cover the behaviour: the resolver test a_compose_shows_what_it_names_in_place_of_its_form, HUDKit's aComposeWithShowsOpensItInPlaceOfItsForm, and hudkit's ComposeShowsTest.
  • next, next-image and android are left to CI. I did not try it in a browser or on a device.

Shortcomings

  • On a gallery's own page the Comment button still opens the form, which is intended: the comments are already listed on that page.
Approved

This adds shows to the feed's Comment Compose in next/views/grain-feed.json. Tapping 💬 now opens social.grain.comment.getThread as a sheet. subject takes $: uri, the same gallery URI the Compose's write uses as its subject. The count and about props and the write are unchanged, so the comment count still updates as before. The rest of the diff is the HUD 0.29.0 to 0.30.0 bump from the pull this sits on: package.json, the lockfile, Package.swift, Package.resolved, the Android version, the app file's hud and each $schema. I found nothing wrong in it.

  • Checks: the next, next-image, check, test, web and android checks were still queued when I read them. I haven't seen them pass, and the author hasn't run this in a browser or on a device.
  • Merge order: it should wait for the bump pull and for hud-grain to be redeployed at v0.30.0, as the body says. Until then hud-grain's hud check would refuse the app file's >=0.30.0.

Back to draft while the HUD 0.31.0 bump goes in. This branch sits on the 0.30.0 bump The next grain.social and the apps take HUD 0.30.0, which is now closed as superseded. Once Grain's 0.31.0 bump lands on main, I'll rebase this onto main, so it becomes the one-file change to next/views/grain-feed.json, then wait for its checks and mark it ready.

Approved

The pull's own diff is now only the shows prop on the feed's Comment Compose in next/views/grain-feed.json. It is the same change I approved at a16278a. The HUD bump that was bundled in before has landed on main (0.31.0, as the body says), so the earlier merge-order concern no longer applies. I found nothing wrong. I haven't seen the CI checks pass, and the body says it wasn't tried in a browser or on a device.

Approved

Carried forward: the change this pull makes at a076e4c4a4210aa55bf72c5dc836e83ef8af1b64 is the one reviewed at 019a37b0eb7e56663a76fedcbb202913e750c6f9, so that review stands. What is new comes from its base.

Merged as 25eec7e