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

Add dialog extension #2663

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

Conversation

FikriMilano
Copy link
Collaborator

@FikriMilano FikriMilano commented Aug 26, 2024

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

Fixes #2662

Description

FHIR Chat discussion about adding dialog control type to Jira:
https://chat.fhir.org/#narrow/stream/179255-questionnaire/topic/dialog.20item.20control

Alternative(s) considered
N/A

Type
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).

@FikriMilano FikriMilano requested a review from a team as a code owner August 26, 2024 04:26
@ktarasenko ktarasenko requested review from jingtang10 and removed request for ktarasenko August 27, 2024 08:20
Copy link
Collaborator

@jingtang10 jingtang10 left a comment

Choose a reason for hiding this comment

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

can you add a test case in QuestionnaireEditAdapterTest.kt?

ndegwamartin added a commit to opensrp/android-fhir that referenced this pull request Sep 10, 2024
FORK
         - With unmerged PR #9
            - WUP  #13

SDK
            - WUP google#2178
            - WUP google#2650
            - WUP google#2663
PERF
- WUP google#2669
- WUP google#2565
- WUP google#2561
- WUP google#2535
ndegwamartin added a commit to opensrp/android-fhir that referenced this pull request Sep 10, 2024
FikriMilano added a commit to opensrp/fhircore that referenced this pull request Sep 13, 2024
ndegwamartin added a commit to opensrp/android-fhir that referenced this pull request Oct 2, 2024
    FORK
             - With unmerged PR #9
                - WUP  #13

    SDK
                - WUP google#2178
                - WUP google#2650
                - WUP google#2663
    PERF
    - WUP google#2669
    - WUP google#2565
    - WUP google#2561
    - WUP google#2535
@FikriMilano FikriMilano changed the title Add lookup item control type Add dialog extension Oct 31, 2024
@FikriMilano
Copy link
Collaborator Author

As discussed, we should use dialog extension instead of adding a dialog item control type

ndegwamartin added a commit to opensrp/android-fhir that referenced this pull request Nov 4, 2024
FORK
                - With unmerged PR #9
                - WUP  #13

SDK
                - WUP google#2178
                - WUP google#2650
                - WUP google#2663
                - WUP google#2689
ndegwamartin added a commit to opensrp/android-fhir that referenced this pull request Nov 5, 2024
    FORK
                    - With unmerged PR #9
                    - WUP  #13

    SDK
                    - WUP google#2178
                    - WUP google#2650
                    - WUP google#2663
                    - WUP google#2689
                    - WUP google#2645
Copy link
Collaborator

@jingtang10 jingtang10 left a comment

Choose a reason for hiding this comment

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

can you pls add some documentation in the docs folder (this will be automatically published on our doc site)?

@@ -496,6 +497,84 @@ class QuestionnaireEditAdapterTest {
.isEqualTo(QuestionnaireViewHolderType.DROP_DOWN.value)
}

@Suppress("ktlint:standard:max-line-length")
@Test
fun getItemViewType_choiceItemType_itemControlExtensionWithRadioButton_andDialogExtension_shouldReturnDialogSelectViewHolderType() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

use backtick notation for test names:

fun `should do something`

@@ -496,6 +497,84 @@ class QuestionnaireEditAdapterTest {
.isEqualTo(QuestionnaireViewHolderType.DROP_DOWN.value)
}

@Suppress("ktlint:standard:max-line-length")
Copy link
Collaborator

Choose a reason for hiding this comment

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

you can remove this if you follow the next comment.

@@ -61,6 +61,9 @@ internal const val EXTENSION_ITEM_CONTROL_URL_ANDROID_FHIR =
internal const val EXTENSION_ITEM_CONTROL_SYSTEM_ANDROID_FHIR =
"https://github.com/google/android-fhir/questionnaire-item-control"

internal const val EXTENSION_DIALOG_URL_ANDROID_FHIR =
"https://github.com/google/android-fhir/dialog"
Copy link
Collaborator

Choose a reason for hiding this comment

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

keep extension urls in the same "namespace". see the location widget extension.

Suggested change
"https://github.com/google/android-fhir/dialog"
"https://github.com/google/android-fhir/StructureDefinition/dialog"

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

Successfully merging this pull request may close these issues.

Add specific control type for dialog
2 participants