Skip to content

Conversation

@alanpoon
Copy link
Contributor

@alanpoon alanpoon commented Aug 6, 2025

Fixes #327
Screenshot 2025-08-06 at 5 46 55 PM

in replacement of #443

Waiting for this PR to be merged: makepad/makepad#788.

@alanpoon alanpoon self-assigned this Aug 6, 2025
@alanpoon alanpoon added the blocked-on-makepad Blocked on a Makepad bug or missing Makepad feature label Aug 11, 2025
@alanpoon
Copy link
Contributor Author

Intention of adding an image magnifier and the ability to pan image.

The image's image_scale, image_pan will always be set to default in draw_walk. Hence unable to dynamically scale and pan image.
makepad/makepad#785

@kevinaboos
Copy link
Member

Intention of adding an image magnifier and the ability to pan image.

The image's image_scale, image_pan will always be set to default in draw_walk. Hence unable to dynamically scale and pan image. makepad/makepad#785

@alanpoon I just checked with Rik, and this line should not be present in the Image widget. It's some errant code left over from dealing with animations in a strange way.

You can submit a PR to makepad that removes that line, and then continue with this issue here.

@kevinaboos kevinaboos added waiting-on-author This issue is waiting on the original author for a response and removed blocked-on-makepad Blocked on a Makepad bug or missing Makepad feature labels Oct 17, 2025
@alanpoon
Copy link
Contributor Author

Sure, the makepad PR is here: makepad/makepad#788

@alanpoon
Copy link
Contributor Author

Screenshot 2025-10-19 at 10 58 51 AM Screenshot 2025-10-19 at 10 58 57 AM Screenshot 2025-10-19 at 10 59 17 AM

@alanpoon alanpoon added waiting-on-review This issue is waiting to be reviewed and removed waiting-on-author This issue is waiting on the original author for a response labels Oct 19, 2025
Copy link
Member

@kevinaboos kevinaboos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Alan, nice work here.

My main comment is that we should decouple the ImageViewer widget from the RoomScreen. It doesn't need to know anything about the RoomScreen except for being able to access the RoomScreen's MediaCache instance (technically even that is not required, see Aarav's PR for an example of just passing the image data directly from the media fetch background task to the ImageViewer via an action).

Also, Aarav and I had a lot of discussions about using actions to communicate with the ImageViewer widget in PR#443. I think you can combine your approach (of storing images in the RoomScreen's MediaCache) with the action-based design from #443 (in which you emit an action including the image data/status instead of directly accessing the widget and calling a function on it). Actions are more idiomatic and also allow easy communication from any context, both in a background task and in a RoomScreen TimelineUpdate handler.

@kevinaboos kevinaboos added waiting-on-author This issue is waiting on the original author for a response and removed waiting-on-review This issue is waiting to be reviewed labels Dec 9, 2025
@kevinaboos
Copy link
Member

hi @alanpoon, when you have a moment can you resolve the conflicts and address my minor feedback here? I'd love to get this PR merged in soon since it's a really nice addition/feature to have.

@alanpoon
Copy link
Contributor Author

hi @alanpoon, when you have a moment can you resolve the conflicts and address my minor feedback here? I'd love to get this PR merged in soon since it's a really nice addition/feature to have.

Sure

@alanpoon alanpoon added waiting-on-review This issue is waiting to be reviewed and removed waiting-on-author This issue is waiting on the original author for a response labels Dec 22, 2025
Copy link
Member

@kevinaboos kevinaboos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few more comments, mostly nit-picky (sorry...).

One general comment is that I'd prefer names that are unique and more descriptive. They're easier to grep for and easier to understand from the perspective of someone reading our code for the first time. For example:

  • Config should be ZoomConfig or ImageViewerZoomConfig.
  • MetaData should be ImageViewerMetadata.
  • etc

aside from that, everything looks good.

@kevinaboos kevinaboos added waiting-on-author This issue is waiting on the original author for a response and removed waiting-on-review This issue is waiting to be reviewed labels Dec 22, 2025
@alanpoon alanpoon added waiting-on-review This issue is waiting to be reviewed and removed waiting-on-author This issue is waiting on the original author for a response labels Dec 23, 2025
@kevinaboos kevinaboos changed the title Add image viewer widget Show clicked-on images in a full-screen view with zoom/pan Dec 23, 2025
Copy link
Member

@kevinaboos kevinaboos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work, thanks for all the revisions! Much appreciated.

@kevinaboos kevinaboos removed the waiting-on-review This issue is waiting to be reviewed label Dec 23, 2025
@kevinaboos kevinaboos merged commit 70bfd7f into project-robius:main Dec 23, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When the user clicks a thumbnail image, show the full-size image in an image viewer widget

2 participants