Skip to content
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

🐛 show real image ratio in gallery redesign #4649

Merged
merged 9 commits into from
Jan 17, 2023

Conversation

petersopko
Copy link
Contributor

@petersopko petersopko commented Jan 9, 2023

Thank you for your contribution to the KodaDot NFT gallery.

👇 _ Let's make a quick check before the contribution.

PR Type

  • Bugfix
  • Feature
  • Refactoring

Context

Before submitting pull request, please make sure:

  • My contribution builds clean without any errors or warnings
  • I've merged recent default branch -- main and I've no conflicts
  • I've tried to respect high code quality standards
  • I've didn't break any original functionality
  • I've posted a screenshot of demonstrated change in this PR

Optional

  • I've tested it at </bsx/collection>
  • I've tested PR on mobile
  • I've written unit tests 🧪
  • I've found edge cases

Had issue bounty label?

  • Fill up your KSM address: Payout

Community participation

Screenshot 📸

  • My fix has changed something on UI; a screenshot is best to understand changes for others.
    image
    image

@petersopko petersopko requested a review from a team as a code owner January 9, 2023 19:39
@petersopko petersopko requested review from prachi00 and removed request for a team January 9, 2023 19:39
@netlify
Copy link

netlify bot commented Jan 9, 2023

Deploy Preview for koda-nuxt ready!

Name Link
🔨 Latest commit b6f7e1a
🔍 Latest deploy log https://app.netlify.com/sites/koda-nuxt/deploys/63c685fc5086be00087cc4b1
😎 Deploy Preview https://deploy-preview-4649--koda-nuxt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@petersopko
Copy link
Contributor Author

@exezbcz, there isn't a design for wide images in Figma; how do we want to handle it? Is this way okay?

@exezbcz
Copy link
Member

exezbcz commented Jan 9, 2023

for mobile it looks ok but on desktop it destroys the layout. I was thinking about making the img fit(width/height) to the rectangle. So we eliminate changing the layout.
like this:
image

Is that okay?

@petersopko
Copy link
Contributor Author

I didn't want to add the event listener, so it won't resize responsively (you need to refresh between mobile and desktop), but that's usually only possible with devtools or if somebody wants to make their screen super small. I think it's okay, but maybe @roiLeo can take a look.

Also, I don't know if artists creating full-width pictures will be happy to have those images fitted inside a square.

image
image

@roiLeo roiLeo self-requested a review January 10, 2023 09:04
Copy link
Contributor

@roiLeo roiLeo left a comment

Choose a reason for hiding this comment

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

tested on /rmrk/gallery/13528762-f091ff4a3f410ee872-ROXYNFT_FUN_BANNERS-FUN_BANNER_030-0000000000000030?redesign=true

With this change many items will now have "black square" frame, I'm not sure this is the best option

ex:
/rmrk/gallery/10371533-b6c51bd8c8868edc70-6ML5P-KUSAMA_WONDERLAND_037_OR_OCCUPIED-0000000000000043?redesign=true
Screenshot 2023-01-10 at 10-10-03 KodaDot - Kusama NFT Market Explorer

or /snek/gallery/185770742-2?redesign=true

Screenshot 2023-01-10 at 10-11-22 KodaDot - Kusama NFT Market Explorer

@exezbcz
Copy link
Member

exezbcz commented Jan 10, 2023

hmm, my bad.

I thought that like 90% are square images and different ratios are quite rare. Not sure what is the best solution for this.
Adding bars for the full widht img is not that bad but it does not work for imgs that are portrait oriented.

Possible solution is add a full screen button to the top right button section? Then it would be ok if we scale-crop the art to gallery img box.

Most nft marketplaces are designed for square content.

Again, what are your thoughts? Also curious about the data, how many images are not square?

some screens of how the major marketplaces deal with portrait content:

image
image
image

@yangwao yangwao requested a review from vikiival January 11, 2023 09:43
@roiLeo
Copy link
Contributor

roiLeo commented Jan 11, 2023

Possible solution is add a full screen button to the top right button section? Then it would be ok if we scale-crop the art to gallery img box.

In #4593 you've added it under the img box
Or we can add it in the top right like on OS

Again, what are your thoughts?

I would be in favour of removing the black stripes
First solution proposed by peter might be good, but we should still check if it doesn't disturb display of "square" images

Also curious about the data, how many images are not square?

I don't think you can tell, but you have to assume that any image size can be added

figure > img.image-media__image {
object-fit: cover;
const isMobile = ref(window.innerWidth < 768)
</script>
Copy link
Member

Choose a reason for hiding this comment

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

missing new line

object-fit: cover;
const isMobile = ref(window.innerWidth < 768)
</script>
<style>
Copy link
Member

Choose a reason for hiding this comment

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

missing scoped or better targeting of image

@petersopko
Copy link
Contributor Author

I would be in favour of removing the black stripes
First solution proposed by peter might be good, but we should still check if it doesn't disturb display of "square" images

So are we going with this version? Can somebody confirm what should the final outcome here look like?

@exezbcz
Copy link
Member

exezbcz commented Jan 11, 2023

Possible solution is add a full screen button to the top right button section? Then it would be ok if we scale-crop the art to gallery img box.

In #4593 you've added it under the img box Or we can add it in the top right like on OS

yup, that was only quick idea and i posted it. Nothing rock solid imo :D

Again, what are your thoughts?

I would be in favour of removing the black stripes First solution proposed by peter might be good, but we should still check if it doesn't disturb display of "square" images

Well, its not that bad removing the stripes, not against it. What if we add the fullscreen button before production release?
I might be wrong, but i think the entire nft experience is still tailored to squares. Possible adding "art" view in the future? Will switch your layout and make the nft fit top part without cropping.

Also curious about the data, how many images are not square?

I don't think you can tell, but you have to assume that any image size can be added

yup

Sooo, lets handle it like on the nft cards?

@petersopko
Copy link
Contributor Author

So are we going with this version? Can somebody confirm what should the final outcome here look like?

I'm sorry if I'm misunderstanding here, but can somebody tell me what should be done here to finish up?

I don't want to stall, but I didn't get the sense the discussion was over.

@roiLeo
Copy link
Contributor

roiLeo commented Jan 13, 2023

So are we going with this version? Can somebody confirm what should the final outcome here look like?

I'm sorry if I'm misunderstanding here, but can somebody tell me what should be done here to finish up?

I don't want to stall, but I didn't get the sense the discussion was over.

before
Screenshot 2023-01-13 at 16-32-57 KodaDot - Kusama NFT Market Explorer

after
Screenshot 2023-01-13 at 16-32-41 KodaDot - Kusama NFT Market Explorer

if it's ok for @exezbcz it's ok for me but you still got some small code changes request

@petersopko
Copy link
Contributor Author

updated 👍🏻

Copy link
Contributor

@roiLeo roiLeo left a comment

Choose a reason for hiding this comment

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

✅ code lgtm

libs/ui/src/components/MediaItem/type/ImageMedia.vue Outdated Show resolved Hide resolved
@roiLeo roiLeo added the S-code-lgtm-✅ code review guild has reviewed this PR and it's code is approved label Jan 16, 2023
@codeclimate
Copy link

codeclimate bot commented Jan 17, 2023

Code Climate has analyzed commit b6f7e1a and detected 0 issues on this pull request.

View more on Code Climate.

@vikiival
Copy link
Member

pay 40 usd

@vikiival vikiival merged commit fa55f00 into kodadot:main Jan 17, 2023
@yangwao
Copy link
Member

yangwao commented Jan 17, 2023

😍 Perfect, I’ve sent the payout
💵 $40 @ 35.36 USD/KSM ~ 1.131 $KSM
🧗 FNyt7T1xdbhN7dagf7yGYCRJuE3R45VmTCE3tjzy1rKxa7y
🔗 0x92ba0920a80f39c39c1d9a655e0e7badb10adce4e06e78af9672dcb3478ab211

🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues

@yangwao yangwao added the paid pull-request has been paid label Jan 17, 2023
@petersopko
Copy link
Contributor Author

@vikiival
Copy link
Member

Mr @yangwao was notified

@yangwao
Copy link
Member

yangwao commented Jan 18, 2023

me & my few notifications

yup registered, will proceed

image

@yangwao yangwao removed the paid pull-request has been paid label Jan 18, 2023
@yangwao
Copy link
Member

yangwao commented Jan 18, 2023

pay 40

@yangwao
Copy link
Member

yangwao commented Jan 18, 2023

😍 Perfect, I’ve sent the payout
💵 $40 @ 34.98 USD/KSM ~ 1.144 $KSM
🧗 FNyt7T1xdbhN7dagf7yGYCRJuE3R45VmTCE3tjzy1rKxa7y
🔗 0x51c8e07efd4b16f237365e2ce513bf5262a302edfc3b074c5c60f598e517e456

🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues

@yangwao yangwao added the paid pull-request has been paid label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
paid pull-request has been paid S-code-lgtm-✅ code review guild has reviewed this PR and it's code is approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mobile design on redesigned item
5 participants