Xyphyn / photon

An opinionated web client for Lemmy to help users discover the fediverse.
https://phtn.app
GNU Affero General Public License v3.0
389 stars 43 forks source link

Fix thumbnail left alignment #323

Closed sevonj closed 4 months ago

sevonj commented 6 months ago

Describe the bug Left thumbnail alignment does not affect embeds. As a result, thumbnails on the feed bounce left and right depending on the post type, which is somewhat annoying.

Edit: More left align issues

To Reproduce (if applicable)

Tasks:

Expected behavior Consistent thumbnail position on both alignment options.

Screenshots image

Versions

sevonj commented 5 months ago

I spent some more time thinking about ways to make left alignment look cleaner.

I don't like these paths at all: image

The best idea I have so far is this: image

Title and meta moved above in list view: image

Compact mode: image

@Xyphyn Opinion on having roughly this kind of layout for leftAlign?

Xyphyn commented 5 months ago

Sure I completely forgot about left alignment

sevonj commented 5 months ago

I rebuilt that draft and pushed it to https://github.com/sevonj/photon/tree/left_align

It's rough, but I think the the layout idea is ok.

Changed views:

Screenshots List left ![image](https://github.com/Xyphyn/photon/assets/100710152/9aee837f-850e-4992-8194-12d6b585d877) Compact left ![image](https://github.com/Xyphyn/photon/assets/100710152/9929f6c9-13c0-4724-a07b-ab888d64b083) Compact right ![image](https://github.com/Xyphyn/photon/assets/100710152/969d8d46-9a22-42ce-8d90-d92397f53e73)
sevonj commented 5 months ago

I wasn't really happy with my previous draft for list view. Left and right alignments had different layouts and it looked kinda weird anyway.

So I had another go: My new approach doesn't try to bend the embed thumbnails to match the normal ones. They stay in the embed card. Instead, I made the normal layout more consistent with embeds by moving the meta block above.

image

We could also increase the size a bit, maybe even match the width of the embed thumbnail.

image

image

Edit: https://github.com/sevonj/photon/tree/listview-leftalign-draft

sevonj commented 4 months ago

I guess I'll add alt text to the list.

image

sevonj commented 4 months ago

I see that list view layout has become near identical to compact layout. image

At this point, instead of working a new solution, I suggest just removing the filter for selfposts in PostMediaCompact to make it consistent.

https://github.com/Xyphyn/photon/blob/80fff16671b9e519148456eaa7c96cb545072115/src/lib/components/lemmy/post/media/PostMediaCompact.svelte#L20C1-L20C3

sevonj commented 4 months ago

Looks like we're done here!