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

Factor out job cards into Composables for new data entry points #2892

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

sufyanAbbasi
Copy link
Contributor

@sufyanAbbasi sufyanAbbasi commented Dec 2, 2024

Fixes #2446

Reimplements the entire add LOI/selection UX to match the new designs (see above issue).

  • Removes the old RecycleView and Cards UI and rebuilds them using Composables instead.
  • Handles multiple ad-hoc jobs by showing each job in a modal and does not show the modal if there is only one ad-hoc job.
  • Also does not show the "+" button or the "add data" button when the user is viewer only.
  • TODO: Get translations for add_data and add_site.
Screenshot 2024-12-19 at 1 24 37 AM Screenshot 2024-12-19 at 1 24 52 AM Screenshot 2024-12-19 at 1 25 11 AM Screenshot 2024-12-19 at 1 33 33 AM

@gino-m PTAL?

@sufyanAbbasi sufyanAbbasi requested a review from gino-m December 2, 2024 20:51
@gino-m gino-m changed the title [Draft - Needs Styling] Implements new, simplified LOI flow [Draft - Needs Styling] Introduce new data collection entry points Dec 4, 2024
Copy link
Collaborator

@gino-m gino-m left a comment

Choose a reason for hiding this comment

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

Hey @sufyanAbbasi so cool to see this is working! A few suggestions/tweaks. Once we do those, I think we can submit as is without too much UI churn for now. @rawbzz Is still finalizing the latest designs, but what you have here takes us much closer.

# Conflicts:
#	ground/src/main/java/com/google/android/ground/ui/home/mapcontainer/HomeScreenMapContainerFragment.kt
@sufyanAbbasi sufyanAbbasi changed the title [Draft - Needs Styling] Introduce new data collection entry points Factor our job cards into Composables for new data entry points Dec 19, 2024
@sufyanAbbasi sufyanAbbasi marked this pull request as ready for review December 19, 2024 09:47
@auto-assign auto-assign bot requested a review from gino-m December 19, 2024 09:47
@sufyanAbbasi sufyanAbbasi changed the title Factor our job cards into Composables for new data entry points Factor out job cards into Composables for new data entry points Dec 19, 2024
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 20.22059% with 217 lines in your changes missing coverage. Please review.

Project coverage is 62.21%. Comparing base (a0975c3) to head (818e354).

Files with missing lines Patch % Lines
.../ground/ui/home/mapcontainer/jobs/JobMapAdapter.kt 20.67% 175 Missing and 13 partials ⚠️
...ome/mapcontainer/HomeScreenMapContainerFragment.kt 22.22% 9 Missing and 5 partials ⚠️
...me/mapcontainer/HomeScreenMapContainerViewModel.kt 7.14% 13 Missing ⚠️
.../mapcontainer/jobs/DataCollectionEntryPointData.kt 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2892      +/-   ##
============================================
- Coverage     63.55%   62.21%   -1.34%     
- Complexity     1267     1277      +10     
============================================
  Files           270      271       +1     
  Lines          6560     6768     +208     
  Branches        927      950      +23     
============================================
+ Hits           4169     4211      +42     
- Misses         1786     1941     +155     
- Partials        605      616      +11     
Files with missing lines Coverage Δ
...n/java/com/google/android/ground/ui/theme/Color.kt 100.00% <100.00%> (ø)
.../mapcontainer/jobs/DataCollectionEntryPointData.kt 0.00% <0.00%> (ø)
...me/mapcontainer/HomeScreenMapContainerViewModel.kt 42.85% <7.14%> (-2.98%) ⬇️
...ome/mapcontainer/HomeScreenMapContainerFragment.kt 15.71% <22.22%> (-0.96%) ⬇️
.../ground/ui/home/mapcontainer/jobs/JobMapAdapter.kt 20.67% <20.67%> (ø)

Copy link
Collaborator

@gino-m gino-m left a comment

Choose a reason for hiding this comment

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

Great work, @sufyanAbbasi 🥳 A few nits, otherwise LGTM!

sufyanAbbasi and others added 11 commits December 19, 2024 12:03
Added "add_site" and two more strings (untranslated)
Added "add_site" and two more strings (untranslated)
Remaining translations added ("unnamed_job" and "job_site_icon").
Remaining translations added ("unnamed_job" and "job_site_icon").
Remaining translations added ("unnamed_job" and "job_site_icon").
@gino-m
Copy link
Collaborator

gino-m commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 20.43796% with 218 lines in your changes missing coverage. Please review.

Project coverage is 61.23%. Comparing base (543795e) to head (55393d8).

Files with missing lines Patch % Lines
.../ground/ui/home/mapcontainer/jobs/JobMapAdapter.kt 20.58% 176 Missing and 13 partials ⚠️
...ome/mapcontainer/HomeScreenMapContainerFragment.kt 26.31% 9 Missing and 5 partials ⚠️
...me/mapcontainer/HomeScreenMapContainerViewModel.kt 7.14% 13 Missing ⚠️
...roid/ground/ui/home/mapcontainer/jobs/MapUiData.kt 0.00% 2 Missing ⚠️
Additional details and impacted files

Would you be able to add tests for modified lines? We can focus on the ones reported here by codecov if it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Data collection] Simplify data collection entry point
3 participants