Open jingtang10 opened 1 year ago
@jingtang10 @pld @f-odhiambo
does this mean: by having this feature enabled, the screen can show x columns of questionnaire items? currently we can only show 1 column by using Linear Layout Manager.
can we consider using Grid Layout? I think it will be easier since we just need to change the recycler view's layout manager from Linear Layout to Grid Layout. We can drop using Linear Layout since Grid Layout with 1 span/column behave the same way, plus it has the flexibility for more columns.
is there a reason why you suggest using table layout?
I suggest we configure this by using DataCaptureConfig, but let me know if people have other ideas.
speaking of configuration, do we only want to configure the enablement of this feature or we also like to configure the amount of columns?
to make it responsive, I suggest we define the amount of columns by deciding from the device's screen size
@shelaghm @jingtang10 can you please provide a design? so we can have a clear end result once the feature is done
What is the rationale for adding multiple columns? Is it for questionnaires? For most questionnaires even on large devices /web/desktop it's most common and best practise to do a single column questionnaire. It's easier to follow and typically also faster to complete.
I agree to make it responsive so that the layouts adjust to the screen size.
@shelaghm
What is the rationale for adding multiple columns?
Thanks @shelaghm and @FikriMilano. A few thoughts to share here:
Thanks @jingtang10, for clarifying.
@shelaghm can you create some designs based on Jing's comment please? That would be really helpful.
@FikriMilano can you please do some prototyping here first regarding 2 and 3? I think for 2, it might be interesting to see how view pager works here: https://developer.android.com/guide/navigation/navigation-swipe-view, and for the navigation drawer as well.
as for 3, might be useful to clarify on chat.fhir.org first if there's any extension we should use.
@jingtang10 okay I'll do that
Hello @jingtang10 Let me share some design work we wanted to achieve using the SDC Library
Given the constraints we faced, we made the decision to utilize a custom layout to achieve our design goals
@Itskiprotich thank you
@jingtang10 referring to your points
First of all, there is some multi column (or table) support baked in SDC IG we need to think about supporting: https://hl7.org/fhir/R4/valueset-questionnaire-item-control.html. This is about laying out questions in a group either horizontally or vertially in a table. Not exactly clear how much more work here is needed and priority. But we need to keep this in mind.
For multi columns, I don't really know if SDC IG has anything to say about this. But I think there're at least two possibilities we can explore -> one is to allow overflow to the next column and enable swiping to nagivate, i think this would be super neat as an alternative way of navigation; another is to provide a navigation draw on the left for pages/sections to utilise the horizontal space provided by large screens.
A simpler problem to solve is probably just to provide horizontally arranged questions, for example, first name and last name typically in a paper questionnaire are just on the same line, but this is currently not possible with SDC.
to solve point 1 and 3 we can use gtable, instead of table or htable. refer to this conversation w Lloyd https://chat.fhir.org/#narrow/stream/179255-questionnaire/topic/sample.20of.20table.20and.20htable/near/391804725
for point 2, I don't know why we need it, but we can have a conversation about it.
@jingtang10 let me know if you have comments on these 2 options:
Challenges:
=====================
If there are 3 items in a single row, the span for each of item is 1. If there's only 1 item in a single row, the span of that item is 3 (taking the whole row).
Challenges:
this has been deprioritized over the following ticket: https://github.com/google/android-fhir/issues/2003
thanks @jingtang10
Jing’s comment: do option 1 w a tweak
SDK should scale well on tablet devices by providing optional multi-column layouts
AIm to demonstrate on: