-
Notifications
You must be signed in to change notification settings - Fork 121
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
Unify Image Viewer's and Image Browser's info panels #3465
Unify Image Viewer's and Image Browser's info panels #3465
Conversation
a2a9bb2
to
08963a0
Compare
17ee69b
to
0aef520
Compare
0aef520
to
74ba328
Compare
This is great! Most bugs with those panels are not specific to this work: multiple redundant scrollbars, whole image moving around, editing hints (Multiple bylines…) sometimes in italic, sometimes not or these gremlins. It’s great that you’ve described future steps around tokens! I think most can be modelled like Labels, with just some colour/CSS tweaks. Maybe People will present some difficulty if we would like to also allow editing of existing names… This is what I could find specific to this PR:
Will add more if I find anything. This looks very good. Just a note that there is this abandoned PR with slightly related work… |
Hi @paperboyo. I fixed issue number 2. Regarding issue number 1, do you want me to hide the Leases panel when there are multiple images selected? (and perhaps tackle fixing the count issue in a different PR? this problem wasn't introduced in this PR, right?). I noticed that the image viewer has the following condition for showing leases: permission to edit metadata OR number of leases > 0. Do we want to maintain that condition? |
Yay! Thanks!
Yeah, I think so (but obviously only for unpermissioned users!). current leases + inactive leases text is useless without the actual counts and ability to add a lease! Yes, the problem precedes this PR and yes, it would be great to have actual dynamic counts that do not break the CSS, haha – then we could show them.
I think it was @andrew-nowak who spotted that we have a bug with the second part of the condition, so that none of the leases ever show for non-permissioned users. We have users complained that if unpermissioned users are asking permissioned users to grant a lease they have no way of knowing this has actually happened apart from the fact that the Cannot crop changes to Crop. This can be sorted in two ways:
I think option 2 is much easier to implement (just fixing a bug), but I’m famous for thinking something I won’t actually be fixing myself is easy to fix :-). |
8d47770
to
f7ac96f
Compare
f7ac96f
to
34d1286
Compare
@paperboyo Fixed |
Almost there!
|
Issues 1 to 5 should be fixed now. Thanks for the feedback |
Seen on usage, cropper, media-api, kahuna, image-loader, image-loader-projection, metadata-editor, thrall, leases (created by @adrielulanovsky and merged by @paperboyo 10 minutes and 53 seconds ago) Please check your changes! |
Seen on auth (created by @adrielulanovsky and merged by @paperboyo 10 minutes and 58 seconds ago) Please check your changes! |
Seen on collections (created by @adrielulanovsky and merged by @paperboyo 11 minutes and 8 seconds ago) Please check your changes! |
What does this change?
Following the discussion on #3448, this attempts to unify the code and UI for the metadata section of the info panels on image viewer and image browser.
Some details about PR:
For handling arrays of strings in multiple selection (image browser) we need a generic component that abstracts the logic used, for example, in the Labels field (showing elements in the array that are in all selections differently than the ones that are only in some, allowing to remove from all and add to all, etc.). This will be done in a future PR, so for now I decided, when multiple selecting, not to show array fields that are shown in single selection or image viewer (e.g. People field, collections field). I'm leaving the ones that currently exist (e.g. Labels) like they are now, so we don't lose existing functionality.
It was decided not to show the Crops field at all in the image browser.
How can success be measured?
Existing functionality in the image viewer and image browser should still work, while using only one template and controller for both panels.
When selecting a single image in Image Browser, all fields that are shown in the image viewer (except Show Crops) should also be shown in the info panel.
Screenshots
Image browser (single image selected):
Image browser (multiple images selected):
Image viewer:
Who should look at this?
Tested? Documented?