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

Questionnaire Fragment: Added extra to show or hide submit button. #1846

Merged
merged 6 commits into from
Feb 14, 2023

Conversation

aditya-07
Copy link
Collaborator

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #1845

Description
Added EXTRA_SHOW_SUBMIT_BUTTON to show or hide submit button in a QuestionnaireFragment. Default is True (show).

Also, removed any dependence on Questionnaire.SubmitButtonStyle to show or hide submit button in a QuestionnaireFragment.

Alternative(s) considered
Have you considered any alternatives? And if so, why have you chosen the approach in this PR?

Type
Choose one: Feature

Screenshots (if applicable)

Checklist

  • I have read and acknowledged the Code of conduct.
  • I have read the Contributing page.
  • I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the style guide of this project.
  • I have run ./gradlew check and ./gradlew connectedCheck to test my changes locally.
  • I have built and run the demo app(s) to verify my change fixes the issue and/or does not break the demo app(s).

@codecov
Copy link

codecov bot commented Feb 6, 2023

Codecov Report

Merging #1846 (5969983) into master (ccae099) will increase coverage by 43.55%.
The diff coverage is 0.00%.

❗ Current head 5969983 differs from pull request most recent head f382f23. Consider uploading reports for the commit f382f23 to get more accurate results

@@              Coverage Diff              @@
##             master    #1846       +/-   ##
=============================================
+ Coverage          0   43.55%   +43.55%     
- Complexity        0      407      +407     
=============================================
  Files             0      160      +160     
  Lines             0     5990     +5990     
  Branches          0     1129     +1129     
=============================================
+ Hits              0     2609     +2609     
- Misses            0     2923     +2923     
- Partials          0      458      +458     
Impacted Files Coverage Δ
.../android/fhir/datacapture/QuestionnaireFragment.kt 54.70% <ø> (ø)
...android/fhir/datacapture/QuestionnaireViewModel.kt 42.97% <0.00%> (ø)
...om/google/android/fhir/index/entities/DateIndex.kt 100.00% <0.00%> (ø)
...estionnaireItemEditTextDecimalViewHolderFactory.kt 0.00% <0.00%> (ø)
...droid/fhir/db/impl/entities/PositionIndexEntity.kt 0.00% <0.00%> (ø)
...gle/android/fhir/datacapture/MoreQuestionnaires.kt 0.00% <0.00%> (ø)
...uestionnaireItemDateTimePickerViewHolderFactory.kt 58.33% <0.00%> (ø)
...tionnaireItemBooleanTypePickerViewHolderFactory.kt 50.68% <0.00%> (ø)
...com/google/android/fhir/index/entities/UriIndex.kt 0.00% <0.00%> (ø)
...gle/android/fhir/db/impl/SQLCipherSupportHelper.kt 71.42% <0.00%> (ø)
... and 152 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@omarismail94 omarismail94 left a comment

Choose a reason for hiding this comment

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

Nice work Aditya! Do we need to update any themes to remove the "submit" funcitonality? Im thinking XML files, configs, etc

Copy link
Contributor

@omarismail94 omarismail94 left a comment

Choose a reason for hiding this comment

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

Nice change Aditya!

FYI @jingtang10: Im approving this!

@aditya-07 aditya-07 merged commit d4210a0 into google:master Feb 14, 2023
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.

Allow app developers to show / hide Submit button via arguments flag instead of theme.
3 participants