Images could be rendered as a carousel or grid at the bottom of the note #626

Closed
opened 2023-09-01 15:27:37 +00:00 by fernandoporazzi · 6 comments
Contributor

Is your feature request related to a problem? Please describe.
Right now images are rendered between text, links and so on. This approach makes reading a bit confusing for long notes.

Describe the solution you'd like
Ideally, images should be rendered at the bottom of a note in a carousel or grid layout. Twitter uses a grid and Damus uses a carousel.

I think the right order would be:

  1. Regular copy
  2. Links
  3. Media(videos and images)
  4. Invoice

Images are from Damus(slider/carousel) and Twitter(grid) respectively.

**Is your feature request related to a problem? Please describe.** Right now images are rendered between text, links and so on. This approach makes reading a bit confusing for long notes. **Describe the solution you'd like** Ideally, images should be rendered at the bottom of a note in a carousel or grid layout. Twitter uses a grid and Damus uses a carousel. I think the right order would be: 1. Regular copy 2. Links 3. Media(videos and images) 4. Invoice Images are from Damus(slider/carousel) and Twitter(grid) respectively.
Author
Contributor

I am working on a concept here. Check the video here https://streamable.com/q492ui (it expires in 2 days)
What do you think?

Event: nevent1qqs0mmnaagnzuth4pqtutexrgfdtsu5cud75j58zcakc4gpl4dyzdqgppemhxue69uhkummn9ekx7mp0qgs840v084fmuuq3zdf9chzxfqhdfralfjn8nzxfhhn9az30lexr54crqsqqqqqpvlw5c5

CC @Giszmo

I am working on a concept here. Check the video here https://streamable.com/q492ui (it expires in 2 days) What do you think? Event: `nevent1qqs0mmnaagnzuth4pqtutexrgfdtsu5cud75j58zcakc4gpl4dyzdqgppemhxue69uhkummn9ekx7mp0qgs840v084fmuuq3zdf9chzxfqhdfralfjn8nzxfhhn9az30lexr54crqsqqqqqpvlw5c5` CC @Giszmo
Contributor

Very nice! So the video looks like you would generate a gallery for each block of media links? Yet in the description above you talk about putting text before links before media and invoices?

I think it's cool that you can alternate between media and text even with TextNotes without long form but see that Damus is breaking with that already.

Clients should avoid UI shifts as much as possible - something Snort does not excel in right now. So until you know the content, you should render the event in a certain size and ideally that size would not change once the content is loaded. Your layout is highly dynamic in length.

Very nice! So the video looks like you would generate a gallery for each block of media links? Yet in the description above you talk about putting text before links before media and invoices? I think it's cool that you can alternate between media and text even with TextNotes without long form but see that Damus is breaking with that already. Clients should avoid UI shifts as much as possible - something Snort does not excel in right now. So until you know the content, you should render the event in a certain size and ideally that size would not change once the content is loaded. Your layout is highly dynamic in length.
Author
Contributor

Not all media links though, just images. Audio and video links remain the same.

You are correct, my initial idea would be to organize a note in text, links, media and invoices. But after putting some thought into it, I realised it would be a poor UX practice considering users create a post and expect it to be rendered in a certain way, a sort of WYSIWYG.

So in order to improve notes readability, I decided to group subsequent images to create a gallery instead of stacking them on top of each other.

What do you mean with UI shifts? There are no re-renders because once the <Text> gets called, it already has the whole content and just renders it once.

Not all media links though, just images. Audio and video links remain the same. You are correct, my initial idea would be to organize a note in text, links, media and invoices. But after putting some thought into it, I realised it would be a poor UX practice considering users create a post and expect it to be rendered in a certain way, a sort of [WYSIWYG](https://en.wikipedia.org/wiki/WYSIWYG). So in order to improve notes readability, I decided to group subsequent images to create a gallery instead of stacking them on top of each other. What do you mean with UI shifts? There are no re-renders because once the `<Text>` gets called, it already has the whole content and just renders it once.
Owner

He means change in height due to media loading, since we dont know the height of the images only the browser knows when it downloads them.

This is why Damus uses the imeta tag to encode the image size (and other stuff) into the event to prevent changes in height.

IMO it doesnt bother me that much that the size changes and that is probably why it has never been improved

He means change in height due to media loading, since we dont know the height of the images only the browser knows when it downloads them. This is why Damus uses the `imeta` tag to encode the image size (and other stuff) into the event to prevent changes in height. IMO it doesnt bother me that much that the size changes and that is probably why it has never been improved
Author
Contributor

Well, the solution implemented in the PR enforces the height of the the grid item, and the image inside it will only take the space of the parent element(140px of height for instance).

Well, the solution implemented in the PR enforces the height of the the grid item, and the image inside it will only take the space of the parent element(140px of height for instance).
Author
Contributor

The PR related to this issue got merged. Therefore I am closing this issue.

The PR related to this issue got merged. Therefore I am closing this issue.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Kieran/snort#626
No description provided.