urbit / Aegean

Productizing Urbit
3 stars 1 forks source link

User stories for posting #11

Open hanfel-dovned opened 5 months ago

hanfel-dovned commented 5 months ago

An %entry is defined as:

+$  entry                    ::  /mar/entry/hoon
  $:  text=(unit cord)       ::  max length 256 bytes
      link=(unit rich)
      quote=(unit ref)
      tags=(set @ta)
  ==
+$  rich
  $%  [%preview =preview]
      [%media =media]
  ==
+$  preview  (map path cord) ::  OGP data
+$  media
  $%  [%url path]            ::  url with supported mime type
      [%scry path]           ::  FQSP with supported datatype mark
  ==

I have a poke defined for submitting an entry:

[%create =entry =hops]

But this is a lot of information for a user to manually submit every time they post, and having the frontend keep track of preferences here and then silently add them into this specific poke every time seems unnecessarily heavy. It seems useful to distinguish between the powerful %create poke that other apps will use, and whatever poke corresponds to the UI interaction of typing something into the text box at the top of the feed and clicking Post.

This poke then should be very heavily informed by what we want the user experience of posting on the feed to look like. Some points to think about:

hanfel-dovned commented 5 months ago

Whatever the specific UI is here, for the UX, we probably want the user to just be able to paste in a link without having to manually specify whether it's a [%preview preview] or a [%media %url path]. What this means is that the only way of telling the difference between the two before storing the ref is for the frontend to parse the link string:

To me, what this gestures at is that, rather than storing preview data for a link in OG format on the ship as separate from media, the actual types here should just be:

+$  rich
  $%  [%url url=@t]
      [%scry path]
  ==

And then, in the same way that the frontend parses the URL string upon posting to determine its behavior, it will parse the URL string upon loading posts to do the same. Additionally, in the same way that the frontend fetches media from urls ending in supported file extensions when posts load, the frontend can fetch OpenGraph preview data at the same point in time.

Separate from this, we can still have a card type for other apps to do OpenGraph-style native UI rendering.

tiller-tolbus commented 5 months ago

Since the %feed frontend should focus on microblogging, the Twitter example has some poignant features:

image

In the Twitter example, there is only one text box. This is ideal, but Twitter also does implicit tagging. We are doing explicit tagging, so there should be two text boxes: one for the main text body, and the other for tags. The tag textbox should be automatically hidden behind an expandable dropdown.

When sharing a URL, do you paste in a URL in the URL box like on reddit? Or include it in your text and let the server parse it out, like on Twitter?

Twitter is definitely the superior experience. The frontend should be able to detect that a post ends with a link and separate it out before submitting the poke to the agent. Ideally, the preview is rendered in the browser before the user submits the post.

What does sharing content that you have saved at a scry path look like? Like the file browser on your phone when uploading an image? Do we punt on this until we have a native client?

We definitely need to punt on this. We're including it in the data type because we don't want to have to upgrade the mark later, that's all.

Rather than asking the user to specify whether they're sharing a %media or a %preview, we should have them just submit text and parse the link on the backend to figure out what it is.

I would parse the link on the front-end. Otherwise, yes.

Are tags something the user should ever be manually setting?

Definitely. In a decentralized feed, people need to be able to tag their content as NSFW or insensitive. People might also find this helpful for sorting, although we should be careful not to lean on it too much because implicit tagging is definitively the better experience for aggregation (it's just hard and we don't have the capability yet).

Are hops something the user should ever be manually setting?

No, hops should be invisible. The assumption is that the network will try to send a message as far as it can if it's public. If they want to make their content private, that should be handled via the access controls, not through the metadata gossip.

Can you quote a post within the Submit Post box, or only via a quote post button on other posts?

Only via a "quote post" button on other posts.

tiller-tolbus commented 5 months ago

To me, what this gestures at is that, rather than storing preview data for a link in OG format on the ship as separate from media, the actual types here should just be:

Yes and no. We would like to possibly unify the two ideas. It would be good if we had a portable link standard that can be resolved over both HTTP and %fine.

Tagging @arthyn for visibility, he has spent some time on this idea before.

Whatever happened to web-urbitgraph:// anyway? 😄