-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add tap to view full screen image functionality #630
Conversation
Tagging @Expensify/design to follow along for screenshots. Can we get a preview of how this will look/function? |
Yup! I'll get those added after flushing this out today |
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.
I know this is a WIP, so just adding a few comments. Looks like it's all on the right track 👍
FYI: Expanding this PR to also accomodate issue to view PDFs when clicked |
Hey @thienlnam this looks great, but curious if there are any mockups you are basing your work off of? |
@shawnborton I've been working from the web modal and looking to have the final look something similar to that. I don't have any mockups for what it would look like on mobile or web with react native. I'd be happy to make adjustments based on any mockups! |
Yeah, let's try to get you some good mockups. I don't think that should stop your progress from making this functional, but we never mocked up what viewing attachments would look like in the ReactNative world so I think it would be a good idea for us to feel super aligned on how this would look/work across all platforms. |
Also - why not show the owner of the photo in the modal preview? As in, show the profile picture + name? |
@shawnborton Sounds good, and my only worry with that right now is that it already takes a little bit for the image to load full screen so it would only be adding more overhead costs until we added some kind of caching but I will work off designs. |
What's the status of this PR? Has it been deprioritized for something else? Looks like it's just collecting conflicts now :D Anything I can do to help push it along? |
So there has been a discussion around the design of the modal in the main issue, and then @roryabraham is also working on this proposal here so this PR is kind of in a weird spot right now. This PR is mostly complete, needs the modal to be styled and then figure out PDF viewing on web but if everyone is okay with it then I can continue and push this out and we can refactor it later to be inline with standards that come from the whatsnext discussion |
OK, thanks for the update! Sounds like we should move forward with figuring
out the PDF viewing stuff if the design is still be narrowed down. I also
think it's fine if we release something that works now, and then improve it
later once we have the design discussion settled.
…On Mon, Oct 26, 2020 at 10:28 AM Jack Nam ***@***.***> wrote:
So there has been a discussion around the design of the modal in the main
issue <Expensify/Expensify#142710>, and then
@roryabraham <https://github.com/roryabraham> is also working on this
proposal here
<https://expensify.slack.com/archives/CC7NECV4L/p1603489444415900> so
this PR is kind of in a weird spot right now.
This PR is mostly complete, needs the modal to be styled and then figure
out PDF viewing on web but if everyone is okay with it then I can continue
and push this out and we can refactor it later to be inline with standards
that come from the whatsnext discussion
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#630 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJMAB2A2ICXJGPWL3WT5BLSMWPTFANCNFSM4SKV7D2Q>
.
|
Sounds good, I will put this train back on the track then! |
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.
Thanks for those changes. Looks good!
Alright, this should be ready to go! @marcaaron is out this week but he tested/approved before he left. |
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.
Overall looks pretty good, just a few suggestions. Sorry for the delayed review - this was my first time fully looking through this PR
* | ||
* @param {Boolean} visibility | ||
*/ | ||
setModalVisiblity(visibility) { |
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.
NAB bind this in the constructor and then get rid of the arrow functions when it's called. I think that's the convention in our react code because it's marginally more performant
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.
I binded the function but when I tried removing the arrow functions it just stopped working - I think it might be because I'm passing a parameter in the function as well?
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.
LGTM
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.
The different constants are getting confusing. The more explicit the constant name, the less confusing this will be. I really hate blocking the PR on this though, so I would be OK with merging this PR as-is and then doing an immediate follow-up to clean up these constants.
Here are the things that I find confusing:
- I don't know when to use ngrok or why
- If
USE_NGROK=true
, thenSITE_ROOT
andAPI_ROOT
are modified with the ngrok URL. However, if you have to modify the.env
file to setUSE_NGROK
then why not just changeSITE_ROOT
andAPI_ROOT
instead? - If
NGROCK_URL
exists, then it's not clear what happens withEXPENSIFY_SITE_ROOT
DEFAULT_SITE_ROOT
is a very ambiguous name with no meaningSITE_ROOT
is also ambiguous and easily confused with the other constantsUSE_NGROK
is not really necessary because the logic can just check ifNGROK_URL
exists
Some suggestions:
- The readme probably needs updated instructions for using ngrok properly (why, when, how, etc.)
- Get rid of
API_ROOT
completely. It is only used twice, and those can be switched to be${SITE_ROOT}api?
instead - Rename
DEFAULT_SITE_ROOT
toURL_EXPENSIFY_COM
- Rename
CASH_SITE_ROOT
toURL_EXPENSIFY_CASH
- Rename
SITE_ROOT
to something else (but I am still unclear what it is used for so I can't suggest a better name right now) - Maybe we can add a platform specific
.env.native
file which would be where the ngrok values are set (so you don't have to constantly be modifying.env
when switching between platforms).
OK, sounds good! I'll be standing by to approve and merge this. Thanks.
…On Thu, Nov 19, 2020 at 11:32 AM Jack Nam ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/CONFIG.js
<#630 (comment)>
:
> +// Updates the API_ROOT and SITE_ROOT to use the NGROK route if .env flag is enabled
+// Otherwise it will use the value inside config.EXPENSIFY_SITE_ROOT
+// DEFAULT_SITE_ROOT will always contain the default site root of www.expensify.com or www.expensify.com.dev
Yeah I agree I really didn't like adding an extra .env variable of
DEFAULT_SITE_ROOT but I really just needed a .env variable that had the
actual site root of www.expensify.com.dev to replace the image urls. I do
like the rename suggestions though and that will help clear up the
confusion. I would be so very happy to merge this PR but I think it would
just be easiest to make those changes now and then merge. I'll make these
changes quickly and then hopefully we can get this out soon
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#630 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJMAB2HKVVDOVYUT4UPS4DSQVQEBANCNFSM4SKV7D2Q>
.
|
@tgolen 🐎 🟢 Should be ready to go now! |
Okay, I agree the constants ended up being a bit messy. It's partially my fault, because I thought having Anyways, LGTM so merging 🚀 |
Fixed Issues
Fixes https://github.com/Expensify/Expensify/issues/142710 and https://github.com/Expensify/Expensify/issues/143523
Tests
Screenshots