-
Notifications
You must be signed in to change notification settings - Fork 2
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(farmer-activity): Add Support for photo upload #282
feat(farmer-activity): Add Support for photo upload #282
Conversation
Update the server URL in the .env.local file to http://192.168.0.106:4200. Also, update the metadata for the resources in the contents.json file, including the md5Checksum and modifiedTime values.
…ails page The photo input component has been added to the components module, allowing it to be used in other parts of the application. Additionally, it has been included in the activity details page to enable users to upload photos for their activities.
The PhotoInputComponent has been added to the components module, allowing it to be used in other parts of the application. Additionally, the exports in the module have been updated to include the PhotoInputComponent.
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.
@OchiengPaul442
As mentioned in #269 - the combination of a draft PR and requesting review but without any supporting information/comments is very confusing - I don't know whether you want me to look at it or not.
I'm removing myself from review for now, when you think it is ready please tag me again. If you want me to review whilst still draft (e.g. you've faced a blocker that you want some assistance with) then just let me know that in the comments. Also when ready please include either a screenshot or demo video
Hey @chrismclarke, apologies these tags confuse me sometimes and I forget when to change them. Won't happen again. |
…pload functionality to activity details page
The photo input component has been updated to include a conditional rendering of a message when no photos are uploaded. Additionally, the activity details page now includes the photo input component, allowing users to upload photos for their activities.
Hi @chrismclarke, |
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.
Testing on native device and getting permissions issues, I think because I had to install v5 of the plugin (current version of capacitor in use) but the latest docs are for v6 of the plugin which no longer need the permissions
capacitor v5 docs - https://capacitorjs.com/docs/v5/apis/camera
capacitor v6 docs - https://capacitorjs.com/docs/apis/camera
I think the best option will be to likely bump capacitor and all other plugins to v6 first. I've added #288 to outline - do you think you'd be able to take it on and then we try get this merged after?
If you want you could include the updates in this same PR just so we can test the full functionality with the camera api too.
Oh, also I noticed the .env.local
file is currently committed but should be gitignored. I've updated the gitignore to delete the file, which will mean you need to manually recreate locally when syncing the changes from this branch. E.g.
apps\picsa-apps\extension-app-native.env.local
SERVER_URL=http://192.168.0.105:4200
(replacing with your own local ip address if different from above)
Hey @chrismclarke, thank you. I will take on task #288, incorporate the suggestions and use this PR to implement the upgrades and conduct thorough testing. |
Update Gradle distribution URL to use version 8.7.0 and update Capacitor dependencies to version 6.0.0. This ensures compatibility and brings in the latest features and bug fixes.
…direct-to-farmer-add-support-for-photo-input
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 @OchiengPaul442
I tried running the latest update on native android device and found it was crashing due to incompatibility with the version of firebase-crashlytics used (always best to test on native device when making native-specific code updates). I was able to resolve with 00a33f1 and all seems to be working now.
I also tested the photo input you added and working well, thanks for considering both web and native handling of the feature. I did a minor refactor to make it standalone just to make it easier to later share as a common component, via 7912936
I appreciate there's no way to persist the data right now but we can address that in a follow-up issue to save this PR growing too large (plus it might need a bit of a discussion as potentially a little bit tricky) - as you also identified in the pr notes.
Otherwise definitely a nice step forward to have, I'd say good to merge here for now and we can review any follow-up issues after.
I've added #291 to follow-up for photo storage if you are happy to take it on for next issue? |
Description
This commit introduces a new Photo-input component with the following features:
NOTE:
7. Upgrade Capacitor from Version 5 to 6: Successfully upgraded Capacitor from version 5 to 6, following the provided documentation. This upgrade enables the use of the
@capacitor/camera
on native devices. To verify the upgrade, executeyarn cap --version
. Additionally, before running the application on a native platform, ensure to install the new modules compatible with the current version by runningyarn install
(might need to delete the node_modules folder for this). Due to issues running the sync command, I manually updated the different files as per the documentation for the app to run on a native device (Android).Note: An attempt was made to create the component as an input component, but had issues with how to approach this after reading through the documentation. requesting further guidance on this.
Discussion
Preview
Link to app preview if relevant
Screenshots / Videos
Recording.2024-06-20.001114_2.mp4