-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ui): Add image size badge to gallery images #5632
feat(ui): Add image size badge to gallery images #5632
Conversation
@rohinish404 Can you share how this works? If it's always displayed, it might end up as clutter. If it shows on hover, that could be good information. |
yeah @psychedelicious provided some suggestions on the visibility of this in the original issue. I didn't get that so made it always visible for now. Will work on that next. Should it be on hover? |
@rohinish404 Can you please add a screenshot or short video demonstrating the feature? Also test out changing the gallery image size to see how that interacts. |
Screen.Recording.2024-02-02.at.9.55.14.AM.mov |
My feedback would be to add a setting for displaying image resolutions in the gallery and have it disabled by default |
Aye - I think showing on all images all the time may not be desirable. Should consider an on hover. additionally, we should look at styling this to be more in line with current theme/components |
I was first tying to implement for smaller image size this badge wont be displayed as suggested by @psychedelicious . If we want to make this thing on the basis of hover then there's no need to implement this conditional feature right? |
Making the badge overlay optional would be good. It could be on hover by default, with an option to enable it always. Either way, the badge will need to hide itself if the images are too small. |
making the pr draft for now..im a bit busy with exams, will continue after that :) |
@psychedelicious for image size less than 80px, the image badge wont be displayed now :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, that works great. 80px is a good size.
Next step is to add some styling. Could try like a 0.7
opacity bg with base.50
text. Maybe give the top-left corner a borderRadius base
. Just some ideas for styling.
Then we probably want this to be configurable. I think there was some feedback already on this from other users
invokeai/frontend/web/src/features/gallery/components/ImageGrid/GalleryImage.tsx
Outdated
Show resolved
Hide resolved
invokeai/frontend/web/src/features/gallery/components/ImageGrid/GalleryImage.tsx
Outdated
Show resolved
Hide resolved
invokeai/frontend/web/src/features/gallery/components/ImageGrid/GalleryImage.tsx
Outdated
Show resolved
Hide resolved
should i go with display on hover? It was looking good |
@psychedelicious fixed the requested things, did a bit of styling (need feedback on this), and made the badge show on hover. @hipsterusername can you test the hover functionality? |
Screen.Recording.2024-02-23.at.12.39.48.AM.mov |
i just noticed it..the del icon is on top of badge need to fix that! |
I made some changes to avoid overlapping. Also reduced the font size because for smaller image size the badge was going out of the image :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder this needs to be configurable
invokeai/frontend/web/src/features/gallery/components/ImageGrid/GalleryImage.tsx
Outdated
Show resolved
Hide resolved
Already on hover..anything else? |
5a3cfaf
to
b8d59f5
Compare
b8d59f5
to
c25a431
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What type of PR is this? (check all applicable)
Have you discussed this change with the InvokeAI team?
Have you updated all relevant documentation?
Description
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
Merge Plan
Added/updated tests?
have not been included
[optional] Are there any post deployment tasks we need to perform?