citizenos / citizenos-fe

5 stars 2 forks source link

IDEATION: Enable the adding of images to ideas #1508

Open BeccaMelhuish opened 3 weeks ago

BeccaMelhuish commented 3 weeks ago

@ilmartyrk Am making a new high priority issue as a spin-off from this one, for what we agreed to do before the 'hard launch' comms of the ideation feature.

I think the most minimal 'MVP' version to have before the comms, would be to add this button, so users can add a single photo added to the idea.

image

But (from the research) other things which would be desirable, if there's time, would be:

Do we need designs from @kevincrepin on the UX/UI of what happens after you click the 'Add image' button? I.e. the view for adding the image/s, and also how it looks once added, when someone is viewing the attached images, etc.?

ilmartyrk commented 2 weeks ago

@BeccaMelhuish everything is possible, as the idea description and argument explanation work the same way and use the same markdown editor we can implement the same solution quite easily. I already tested the solution of adding an image with the button that is outside of the editors toolbar and it works, I will have to solve the image uploading part and also making the editor be in the "preview" mode so that the text wouldn't look weird for average user

kevincrepin commented 2 weeks ago

We have an example for attachments: Screenshot 2024-08-27 at 15 01 42

@ilmartyrk : https://www.figma.com/design/gOJ4i00538e0qaP6IKIPVE/Platform-2.0---Design?node-id=2-8742&t=Xkizp56Otqv8zCDK-1

Choosing a file is done through the native OS so doesn't need design.

BeccaMelhuish commented 2 weeks ago

@kevincrepin Great, thank you!

What about how it should look when the image is added though, i.e. in the published idea? A visual preview of some sort showing the image/s in thumbnail and then a way to open them up, and click through them if there's more than one?

kevincrepin commented 2 weeks ago

I'm thinking a bit that a thumbnail is no problem, but I would be inclined to open these in the most basic "open in a new tab" kind of way, because we are already in a popup with the idea. and this popup also has the arrows to go trough the other ideas. It would become messy and confusing to then also have a gallery lightbox open on top of this...

Screenshot 2024-08-27 at 15 28 02

BeccaMelhuish commented 2 weeks ago

Not sure I've seen this UX anywhere, so might be a bit unexpected, but how about when you hover over a certain thumbnail it expands to a more visible size (in the same position as shown above, but bigger). But then when you click on the file name (and maybe also when you click on the thumbnail?) it opens full size in a new tab?

Or, that when you hover, an icon appears (e.g. magnifying glass), then when you click, it expands it to a more visible size?

I guess on mobile it would need to be when you tap the thumbnail.

I feel like only opening in a new tab is quite inconvenient / a bit annoying for anyone viewing a lot of photos (which could be the case sometimes, if it's a very image based discussion).

ilmartyrk commented 2 weeks ago

@BeccaMelhuish @kevincrepin the solutuion is quite different from what I initially thought, but it will make the file handling a lot easier. And for mobile the image can already be 100% width

BeccaMelhuish commented 1 week ago

Nice, thank you @ilmartyrk!

A few things from me:

image

image

image

image

image

image

image

ilmartyrk commented 6 days ago

@BeccaMelhuish made some fixes and updates

BeccaMelhuish commented 6 days ago

Thanks @ilmartyrk! Checked and still a few things :)

image

And then when I go into edit mode, it still shows 2:

image

image

Again when I went into edit mode it was:

image

image

image

image

image

ilmartyrk commented 5 days ago

@BeccaMelhuish posted more fixes

BeccaMelhuish commented 5 days ago

Seems to be working much better now!

Though I got this error again, it just randomly popped up when I was looking and thinking, not doing anything:

image

And re deleting images, there were 2 initially here (below). I went in to edit mode to delete one and it disappeared fine, then went in to delete the next one and it was still showing. When I went out and back into the idea the second image had also been deleted, so I think this was just an issue with it not displaying what had actually happened? Is there a way to make sure it always updates?

image

And then if possible to add the image thumbnail in edit mode too, so they can see the image they've added before they post it, but if that's a big job I'll make a separate issue?

image

kevincrepin commented 3 days ago

I still think opening them in new tabs is fine in this context. Especially when there are multiple then in that way you could at least have them all open at once. Otherwise if we open it within the platform you have to open and close them one by one.

The thumbnail can be a bit bigger, for example 80px wide. And I don't think this hover interaction really works, it's a bit unexpected behaviour, so I would not do this. Just (bigger) thumbnail, filename and open in tab (not download as it does now). It's not a bad idea with the expand/minimise magnifying glass, but for me the problem is that all of this is crammed into this small popup window. If it's an image with a bigger size (some diagram or smt detailed), then we should still allow to view the full size, so they would still need to be able to download it or open it fully in the browser.


About editing the idea and still having the idea open behind it: I would approach this idea popup the same as the other content when an overlay is opened, namely darken it. We already have this darken layer over the topic behind it, so adding another one is maybe a bit weird, but what if that darken layer is on top of the idea popup when the edit overlay is open? Then this idea popup will also feel "disabled".


I also had the issue when I posted my idea that the image didn't show until I closed that idea and opened it again, so same issue as Becca has.

BeccaMelhuish commented 3 days ago

OK thank you @kevincrepin! Let's do it like that then - no 'magnifying hover', just 80px wide thumbnails and open in tab (not download).

Having the darker layer over the idea during edit also sounds a great solution :)

ilmartyrk commented 3 days ago

@BeccaMelhuish @kevincrepin downloading is caused by your browsers default behavior.

BeccaMelhuish commented 3 days ago

@ilmartyrk Ah OK, there's no workaround to fix it? To me it's really not a user-friendly solution..

@kevincrepin Does this change anything from your side?

kevincrepin commented 3 days ago

Yep, I agree if this automatically downloads the image, that's no good.

Then let's open it within the popup, with a possibility to close again and also to download the image.

So default looks like this: Screenshot 2024-09-13 at 11 04 50

And when the image is opened like this: Screenshot 2024-09-13 at 11 04 44

@ilmartyrk you can find this here: https://www.figma.com/design/gOJ4i00538e0qaP6IKIPVE/Platform-2.0---Design?node-id=13338-115399&t=dkotUyTY3qUxWrQ8-1