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

feat: allow to upload larger images without cropping any part of the image #102

Merged
merged 31 commits into from
Sep 16, 2024

Conversation

AfonsoMartins26
Copy link
Contributor

No description provided.

Copy link

netlify bot commented Jul 23, 2024

Deploy Preview for cesium-pelo-mundo ready!

Name Link
🔨 Latest commit 8ce63f5
🔍 Latest deploy log https://app.netlify.com/sites/cesium-pelo-mundo/deploys/66e86abdc353d700086c7434
😎 Deploy Preview https://deploy-preview-102--cesium-pelo-mundo.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 configuration.

@MarioRodrigues10
Copy link
Member

MarioRodrigues10 commented Jul 28, 2024

First of all, i really like the improvements that you made, but let's review a few things.

  1. I think it will be good to keep the same layout for vertical images, and use a similar layout to horizontal images.
    image

  2. The use case should be like, I upload a picture to be added to CeSIUMPeloMundo and you choose the picture orientation, by default is vertical, in case it's horizontal you display the layout that you showed us by using the same design Diogo did previously.

You can make that by adding a prop either to json and the function that parses the pictures.

What's your thoughts on it? 👀 @AfonsoMartins26

Note: I didn't reviewed code in this, due to this improvements in the UI that are still needed to be done, after that is done i'll review it 🙌

@MarioRodrigues10 MarioRodrigues10 changed the title Allow to upload larger images without cropping any part of the image feat: allow to upload larger images without cropping any part of the image Jul 29, 2024
@AfonsoMartins26
Copy link
Contributor Author

AfonsoMartins26 commented Jul 30, 2024

Pc and mobile versions:
Screenshot from 2024-07-30 13-14-07
Screenshot from 2024-07-30 13-14-45

@MarioRodrigues10
Copy link
Member

It looks amazing @AfonsoMartins26 🙌 !!
Great job 🤩

components/Marker/Marker.tsx Outdated Show resolved Hide resolved
Copy link
Member

@MarioRodrigues10 MarioRodrigues10 left a comment

Choose a reason for hiding this comment

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

This looks good to me ✅ , but let the other reviewers @diogogmatos , @joaodiaslobo and @ruilopesm take a look into it !! 🙌

Copy link
Member

@joaodiaslobo joaodiaslobo left a comment

Choose a reason for hiding this comment

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

The image now has some odd white borders on its corners, can you fix that?
Also, I think the location text (in this example "Lisboa, Portugal") looks less clear than before, missing a shadow maybe?

New:
image
Old:
image

Copy link
Member

@joaodiaslobo joaodiaslobo left a comment

Choose a reason for hiding this comment

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

Also, I wonder if it would be possible to maybe discover the orientation of the image automatically through its width and height? 🤔

Copy link
Member

@joaodiaslobo joaodiaslobo left a comment

Choose a reason for hiding this comment

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

Popover is way too small on mobile devices.

New | Old
image

@AfonsoMartins26
Copy link
Contributor Author

Also, I wonder if it would be possible to maybe discover the orientation of the image automatically through its width and height? 🤔

In my initial pr, I implemented the feature. However, @MarioRodrigues10 said:
"The use case should work as follows: When uploading a picture to be added to CeSIUMPeloMundo, you should be able to choose the picture orientation. The default orientation should be vertical. In cases where the picture is horizontal, you should display the layout you showed us earlier, using the same design that Diogo previously implemented."

@AfonsoMartins26
Copy link
Contributor Author

Pc and mobile changes:
Screenshot from 2024-08-06 18-46-18
Screenshot from 2024-08-06 18-47-15

Copy link
Member

@joaodiaslobo joaodiaslobo left a comment

Choose a reason for hiding this comment

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

Text looks cool and no more white borders, great! 🎉
But now, the image is way too big on mobile, to the point where it gets out of the screen:
image

How it should look:
image

I have used iPhone SE resolution for these examples.
Just make sure it fits and this PR should be good to go!! 🙏

Copy link
Member

@MarioRodrigues10 MarioRodrigues10 left a comment

Choose a reason for hiding this comment

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

image
Text Overlay and text needs to be adjust to the mobile perspective. 🙌

@diogogmatos
Copy link
Member

image

Long text is looking weird when it wraps around. Don't know if this was an existing problem or a new problem though ahaha.

Copy link
Member

@diogogmatos diogogmatos left a comment

Choose a reason for hiding this comment

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

image

In some pins the image shows up sideways even though the picture orientation is correct in the picture file. This is something that already happens in the deployed version but it would be cool to fix it too since we're messing with this.

components/Marker/Marker.tsx Show resolved Hide resolved
components/Marker/Marker.tsx Show resolved Hide resolved
@joaodiaslobo
Copy link
Member

In some pins the image shows up sideways even though the picture orientation is correct in the picture file. This is something that already happens in the deployed version but it would be cool to fix it too since we're messing with this.

@diogogmatos
Pretty sure this is already fixed in this PR!

@diogogmatos
Copy link
Member

diogogmatos commented Sep 11, 2024

In some pins the image shows up sideways even though the picture orientation is correct in the picture file. This is something that already happens in the deployed version but it would be cool to fix it too since we're messing with this.

@diogogmatos

Pretty sure this is already fixed in this PR!

@joaodiaslobo

The screenshot was from the deploy preview on this PR...

@joaodiaslobo
Copy link
Member

The screenshot was from the deploy preview on this PR...

@diogogmatos
Interesting, locally it does in fact use the right orientation but in the deploy preview it doesn't. 🤔

Copy link
Member

@diogogmatos diogogmatos left a comment

Choose a reason for hiding this comment

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

Seems to be fixed! Just make sure the checks pass ;)

@MarioRodrigues10
Copy link
Member

Yes problem seems to be fixed @diogogmatos, I think @joaodiaslobo requested him to remove one or two lines and fix the CI, and after that it's good to go. 🙌

Copy link
Member

@joaodiaslobo joaodiaslobo left a comment

Choose a reason for hiding this comment

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

What a great addition! 🤩

@AfonsoMartins26 AfonsoMartins26 merged commit 232aec6 into main Sep 16, 2024
5 checks passed
@AfonsoMartins26 AfonsoMartins26 deleted the am/Modal branch September 16, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants