urbit / landscape

Product board for Landscape.
20 stars 6 forks source link

Permalinks to specific nodes in graphs #455

Closed matildepark closed 3 years ago

matildepark commented 3 years ago

Design point: @urcades + @g-a-v-i-n

matildepark commented 3 years ago

The basic nature of this task is allowing people to copy "permalinks to content" (to each respective graph node, more or less) that can be shared in the interface and jumped to in each application.

James wrapped up the preceding work in Chat with menu items onhover on Saturday, that are presently commented out on next-js. The behaviours for these items is part of this task in my opinion. See https://github.com/urbit/urbit/pull/4603 and https://github.com/urbit/landscape/issues/460#issuecomment-797258413 with the caveats that

Otherwise the work is to "jump up to the node in a chat, or show the exact item in links + publish" based on a Landscape-specific permalink structure. This structure will have to be designed. I would imagine some way of making it legible (eg. ~dopzod/urbit-community/development/23422420424024024020) would be preferable but I don't know how viable that is. You would need a common landing page for this to sort out what graph it is, whether we have it, push us to the right index, etc.

matildepark commented 3 years ago

Obviously we will have to also accommodate the group feed graph type (#452) but it should be simple work during QA period to integrate together (it's all graphs, man).

urcades commented 3 years ago

Surfacing a few "permalink resolution" flows we can expect to support with this work.

Each of the following videos are very constrained examples that cut out the surrounding context to focus on the link resolving.

~

Following a link to a chat row:

https://user-images.githubusercontent.com/1195363/111415527-7cc01680-86b8-11eb-8232-156a277d4335.mp4

Following a link to a collection block:

https://user-images.githubusercontent.com/1195363/111415566-8e092300-86b8-11eb-905b-2b4c0c22e289.mp4

Following a link to a comment nestled within a notebook post comment/reply or collection block comment/reply

https://user-images.githubusercontent.com/1195363/111415639-b264ff80-86b8-11eb-9c2d-88e29cdadbd6.mp4

~

You can start to see there's an essential pattern that's replicated in all instances: If a pilot has access to a particular resource, and access to the group that contains the resource, they should see some indication alongside the link of what the resource is:

Screen Shot 2021-03-17 at 12 38 53 AM Screen Shot 2021-03-17 at 12 38 50 AM

These icons are the same icons we use in the sidebar of a group.

When one of these links is followed, we do the best we can to centre the linked item in the viewport, highlight the item for 2000ms, and fade out the highlight after another 2000ms.

~

Assuming the pilot does not have access to the linked item, we instead depict the resource in a generic manner:

Screen Shot 2021-03-17 at 12 43 04 AM

This is simply using the icon called Group as a placeholder for when we develop an icon to specifically represent "in-urbit links"

Clicking into a link of this type will effectively trigger a "Join Group" flow, but situate the pilot at the linked resource at the end of the process. This flow needs to be smoothed out a lot (because the current group joining flow is rough af), but it's the intent of the interface.

matildepark commented 3 years ago

How do you get a permalink to a comment?

urcades commented 3 years ago

The ideal here is to replicate the same on-hover menus we use for chat row elements, except in the case of comments, the "overflow menu" can remain visible at all times. Something like this:

Screen Shot 2021-03-17 at 11 52 52 AM

Current interface (more or less) on the left, comments with similar-to-chat menus, but exposed, on the right

urcades commented 3 years ago

Question for all associated with this project:

Will we be able to ship slash-command autocomplete of channels (not channel items, i.e. individual comments or chat rows) in the remaining time we have for this sprint, alongside the base work of rendering permalinks?

I'm specifically talking about an interface like this which could be invoked in any arbitrary text field/input:

Screen Shot 2021-03-17 at 5 30 23 PM

(ignore the mention items, and the 'block reference' item)

For context:

Having to manually visit a channel to "copy a permalink from an item contained within it" is terrible, period. Attaining a feature like "slash command autocomplete" was seen as an improvement that'd more or less be required when this feature was fully developed, for ease of referencing items in Landscape.

matildepark commented 3 years ago

Sounds like scope creep to me ♫ Maybe Liam will surprise us but I am not mandating that in this feature.

urcades commented 3 years ago

Rad, just needed to hear the position on this. This mechanism was always included with the base design, but was not listed in the implementation ticket, and wanted to be sure that we were not formally including it for this sprint's worth of work.