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

[UX] Adjustments and Updates to widgets on Questionnaire - SDC #1974

Open
f-odhiambo opened this issue Jan 18, 2023 · 13 comments · May be fixed by #2032
Open

[UX] Adjustments and Updates to widgets on Questionnaire - SDC #1974

f-odhiambo opened this issue Jan 18, 2023 · 13 comments · May be fixed by #2032
Assignees

Comments

@f-odhiambo
Copy link
Contributor

f-odhiambo commented Jan 18, 2023

Describe the enhancement

Screenshot 1
image

  1. Header properties
  • Should have a close button instead of back button when the form is scrolled,
  • the header should have a dropdown shadow
  1. Bottom button and container
  • button container should have drop shadow if there’s more content down the list
  • the buttons have round edges in design and color of buttons is different - see action colors here
  1. Questions
  • the questions font weights and size is different from designs. We use big font in these forms for
  • For required questions, we shouldn’t use “*”, instead if a question is optional that’s when we will indicate the “(optional)” badge/text
  1. Spacing

-The sapcing between the question and the body has been updated from 24px to 16px.

  • And the space between questions should be 32px
  1. Select Options/Answers
  • the design properties of these components are different from the original designs.
  • text is smaller
  • padding not the same as in design
  • icons used are different
  • colors used are different
  • spacing between items in the components different from design

Adjusted Designs

image

image

Screenshot 2
image

  1. Header navigation - Use close button and not back button
  2. Spacing - space between input label and the text field is more than in design
  3. Input field label
  • text field labels are bolder in the screenshot, design proposed regular
  • the optional fields should have tag “(optional)” and required fields should have none
  1. Input field. - input field borders have different color from design
  2. Save button
  • input field borders have different color from design
  • and the corner raduis

Adjusted Design

image

Screenshot 3

image

  1. Header Navigation
  • Use close button and not back button
  • top header navigation should have drop shadow on scroll
  1. Save button
  • input field borders have different color from design
  • and the corner raduis
  • the container should have dropdown shadow in the upward direction when there’s content below it, and just a border line at the top if no content below it i.e at end of the list
@FikriMilano
Copy link
Collaborator

The SDK allows us to override the QuestionnaireItem widget's style or dimension.

The catch is that dimens may be used not only by the component we want to change but also by other components.

e.g. say we want to change the margin top for widgets, in some parts of the SDK, padding_default is used as a top margin for widgets, but it is also used for check box view padding; if we override that dimens property, it will affect both, which we don't want to happen.

NOTE: I don't know why they use padding_default as margin top, it feels wrong.

For overriding styles, here's one example of the requirement we can implement on FHIR Core.

the questions font weights and size is different from designs. We use big font in these forms for

Here's one example of the requirement we can't implement on FHIR Core, need to do this in SDK.

For required questions, we shouldn’t use “*”, instead if a question is optional that’s when we will indicate the “(optional)” badge/text

@FikriMilano
Copy link
Collaborator

For the * or optional there is currently an open discussion here w @shelaghm
google/android-fhir#544 (comment)

@dubdabasoduba
Copy link
Member

The SDK allows us to override the QuestionnaireItem widget's style or dimension.

The catch is that dimens may be used not only by the component we want to change but also by other components.

e.g. say we want to change the margin top for widgets, in some parts of the SDK, padding_default is used as a top margin for widgets, but it is also used for check box view padding; if we override that dimens property, it will affect both, which we don't want to happen.

NOTE: I don't know why they use padding_default as margin top, it feels wrong.

For overriding styles, here's one example of the requirement we can implement on FHIR Core.

the questions font weights and size is different from designs. We use big font in these forms for

Here's one example of the requirement we can't implement on FHIR Core, need to do this in SDK.

For required questions, we shouldn’t use “*”, instead if a question is optional that’s when we will indicate the “(optional)” badge/text

@FikriMilano are we overriding this by updating the styles.xml on FHIR Core? Just making sure we will not be adding anything that might increase the complexity of keeping up with the SDK.

@FikriMilano
Copy link
Collaborator

@dubdabasoduba yeah, styles.xml

@FikriMilano
Copy link
Collaborator

FikriMilano commented Jan 27, 2023

@f-odhiambo
Analyzed these, whether the requirements needs to be implemented on FHIRCore or SDK or even both.

SS 1

  1. Header properties

    • Should have a close button instead of back button when the form is scrolled [FHIRCORE]
    • The header should have a dropdown shadow [FHIRCORE]
  2. Bottom button and container

  3. Questions

  4. Spacing

  5. Select Options/Answers

    • The design properties of these components are different from the original designs.
    • Text is smaller [FHIRCORE]
    • Padding not the same as in design [FHIRCORE]
    • Icons used are different [FHIRCORE]
    • Colors used are different [FHIRCORE]
    • Spacing between items in the components different from design [SDK] [FHIRCORE] Improve overriding dimens google/android-fhir#1852

SS 2

  1. Header navigation

    • Use close button and not back button [FHIRCORE]
  2. Spacing

  3. Input field label

  4. Input field

    • Input field borders have different color from design [FHIRCORE]
  5. Save button

    • Input field borders have different color from design [FHIRCORE]
    • And the corner radius [FHIRCORE]

SS 3

  1. Header Navigation

    • Use close button and not back button [FHIRCORE]
    • Top header navigation should have drop shadow on scroll [FHIRCORE]
  2. Save button

@FikriMilano FikriMilano self-assigned this Jan 27, 2023
@FikriMilano FikriMilano added the Size - L 7-10 days label Jan 27, 2023
@shelaghm
Copy link

@FikriMilano Thanks for looping me in. I see there's a couple of SDK padding issues, I'm hopeful that we can make these changes in the SDK. Can you file an issue on the SDK github with what the ideal padding would be and tag me in it? Thanks!

@FikriMilano
Copy link
Collaborator

@shelaghm thanks for commenting!

I will surely file an issue on the SDK and tag you.

@FikriMilano
Copy link
Collaborator

@f-odhiambo @dubdabasoduba is this still low priority? or do we need to get this merged soon?

@FikriMilano
Copy link
Collaborator

Blocked by google/android-fhir#1852

@f-odhiambo f-odhiambo removed this from the Sprint 7 (Mar 28th - 10th Apr) milestone Apr 3, 2023
@f-odhiambo
Copy link
Contributor Author

@FikriMilano This is now unblocked

@f-odhiambo f-odhiambo removed the Blocked Item is blocked by another prerequisite label Apr 22, 2023
@FikriMilano
Copy link
Collaborator

Good reminder @f-odhiambo

@f-odhiambo
Copy link
Contributor Author

@HenryRae to review and share an update on the widget styling for this ticket

@HenryRae
Copy link

HenryRae commented Dec 5, 2023

@FikriMilano @Rkareko

  1. Paginated forms can have text buttons "back", "next" and "save/done"(any copy defined) at the last paginated form. See example here

  2. Non-paginated forms should have use a primary rectangular block button with background color. See example here which fills the whole container

Summary: Use text buttons on paginated forms, and rectangular buttons with background color on non-paginated forms

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

Successfully merging a pull request may close this issue.

7 participants