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

[WIP] Opening the profile avatar in full size by click. Closes #7 #139

Merged
merged 1 commit into from
Jul 22, 2017

Conversation

lex111
Copy link
Member

@lex111 lex111 commented Jul 21, 2017

When clicking on the avatar, the full size of the picture opens in the modal window (closes #7).

image

Important note: I tested the work only on Android, please see how it works on iOS.

Also considered the use of the library:
react-native-lightbox - slows opening on Android
react-native-zoom-image - works fine, but does not apply to miniature styles (borderRadius in particular)

Therefore, I had to make my own component, using the built-in component Modal and PhotoView.

@@ -135,6 +135,7 @@ android {
}

dependencies {
compile project(':react-native-photo-view')
Copy link
Member

Choose a reason for hiding this comment

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

Why does this need a native dependency? I feel like it'd probably be best to avoid extraneous native dependencies if possible.

Copy link
Member Author

Choose a reason for hiding this comment

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

@andrewda In this dependence there is the "pinch to zoom" feature, it's convenient. This may come in handy in the future (to display other images with zoom). Although I agree with you, as long as this is not necessary, why can use the usual component Image?

Copy link
Member

Choose a reason for hiding this comment

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

Ah okay yea pinch to zoom is nice, and that makes sense! Either way works for me :)

Copy link
Member Author

Choose a reason for hiding this comment

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

@andrewda great 😄

If not against @housseindjirdeh, then I would leave this dependency, it does not seem heavy and does not interfere with the application.

BTW, I now thought, how much the application will increase in size after connection of any dependency (or it becomes more slow to work for example)? What are thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

i was thinking the same thing these past few weeks. It's React Native - so it's inevitable that more and more dependencies are going to be added from here on out - that's one of the reasons why I love RN so much.

But just like you said, we all usually try limiting dependencies in our applications generally to reduce bloat. I really don't know how much application load times/performance is effected in a native application to be honest. However I of course would probably agree with most people and limit dependencies to only those we particulary need, even if a native application isn't as affected as much.

@housseindjirdeh
Copy link
Member

This looks soo nice 👍🏾 I'll test it on my iPhone today and let you know it renders.

Copy link
Member

@housseindjirdeh housseindjirdeh left a comment

Choose a reason for hiding this comment

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

This is soo great @lex111. I love the look and feel of it on iOS. I also really like tapping anywhere on the screen closes the modal view. Great work mate 🎉

@@ -135,6 +135,7 @@ android {
}

dependencies {
compile project(':react-native-photo-view')
Copy link
Member

Choose a reason for hiding this comment

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

i was thinking the same thing these past few weeks. It's React Native - so it's inevitable that more and more dependencies are going to be added from here on out - that's one of the reasons why I love RN so much.

But just like you said, we all usually try limiting dependencies in our applications generally to reduce bloat. I really don't know how much application load times/performance is effected in a native application to be honest. However I of course would probably agree with most people and limit dependencies to only those we particulary need, even if a native application isn't as affected as much.

@housseindjirdeh housseindjirdeh merged commit 9054188 into gitpoint:master Jul 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clicking profile image navigates to full screen
3 participants