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

[Multiple Choice Task] Fix UI bugs in multiple choice selectors #2899

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

Conversation

shobhitagarwal1612
Copy link
Member

Fixes #2893

Updates UX as per figma mocks

@gino-m PTAL?

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.

Project coverage is 62.66%. Comparing base (759d806) to head (bdc7d31).

Files with missing lines Patch % Lines
...tasks/multiplechoice/MultipleChoiceTaskFragment.kt 92.30% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2899      +/-   ##
============================================
+ Coverage     62.58%   62.66%   +0.07%     
  Complexity     1203     1203              
============================================
  Files           267      267              
  Lines          6356     6358       +2     
  Branches        877      873       -4     
============================================
+ Hits           3978     3984       +6     
  Misses         1831     1831              
+ Partials        547      543       -4     
Files with missing lines Coverage Δ
...tasks/multiplechoice/MultipleChoiceTaskFragment.kt 89.47% <92.30%> (+24.76%) ⬆️

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.

Please paste a screenshot into the PR desc when you can. Thanks!

android:inputType="text"
android:text="@{item.otherText}"
android:textColor="@color/md_theme_onSurface"
android:textSize="16sp"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe you'd want to extend Widget.MaterialComponents.TextInputEditText.FilledBox here.

android:onClickListener="@{() -> viewModel.toggleItem(item)}"
android:padding="16dp"
android:text="@{ item.isOtherOption ? @string/other : item.option.label }"
android:textColor="@color/md_theme_onSurface"
android:textSize="16sp"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you define this in styles.xml instead using the Material theme names from Figma here and throughout? I think you need to extend Widget.Material3.CompoundButton.CheckBox.

Copy link
Collaborator

@anandwana001 anandwana001 left a comment

Choose a reason for hiding this comment

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

How about taking this opportunity to migrate it to jetpack compose?

@shobhitagarwal1612
Copy link
Member Author

Marking this as draft. Working towards migrating the task's UI to compose.

@shobhitagarwal1612 shobhitagarwal1612 marked this pull request as draft December 9, 2024 03:23
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 form] UI bugs in multiple choice selectors
4 participants