Support generic representation of Resources in a list view #444
Replies: 15 comments
-
@pld suggested looking into the List Resource. My initial thoughts are that it seems appropriate for the use case that is holding a list of filtered Resources e.g. from a search query. It's however not immediately apparent to me that it would support our other needs as far as defining configurable displays for the list data. Any ideas are welcome. |
Beta Was this translation helpful? Give feedback.
-
@jingtang10 maybe this is something we can discuss in Thursday's call to get a few ideas going? |
Beta Was this translation helpful? Give feedback.
-
This seems to be the concept of Airbnb went to the extreme of defining it's on layout language https://proandroiddev.com/dynamic-screens-using-server-driven-ui-in-android-262f1e7875c1 and https://airbnb.design/building-a-visual-language/. But most other articles I've found so far follow a variant of using JSON to define the views which can then be parsed out when creating the views e.g. https://proandroiddev.com/dynamic-screens-using-server-driven-ui-in-android-262f1e7875c1. With this approach, I'm not sure we'd need to add a JSON indirection layer since we're targeting Android which already works natively with XML. Also need to dig in more to see if other approaches are recommended and tested. |
Beta Was this translation helpful? Give feedback.
-
Definitely take a look at https://developer.android.com/jetpack/compose as well. |
Beta Was this translation helpful? Give feedback.
-
Cool sounds like these are the options for how we handle UI configuration.
I do not think we need to choose only one option, for something like the login screen (1) is arguable the correct choice. We also don't want it to be difficult to change our mind in the future, if we want to make something configurable that wasn't before, or configurable using a method that it wasn't using before. CC @rowo @mberg @f-odhiambo the architecture for configuration management is consequential enough to be worth tracking |
Beta Was this translation helpful? Give feedback.
-
Cool, I think a key theme I saw here is the need to modularize UI components that we think are common building blocks across the apps. And define what aspects of them we want to make configurable. Then define a "language/schema" that both the server and client speak/understand. |
Beta Was this translation helpful? Give feedback.
-
Correct, with a bias towards the schema being within FHIR |
Beta Was this translation helpful? Give feedback.
-
My 2c: we can probably use StructureDefinition to define the fields we're interested in displaying. And use GraphDefinition to define the related resources we're interetsted in displaying. |
Beta Was this translation helpful? Give feedback.
-
Cool, looks like using those might get us the ability to load any resource into a list view without using the List resource at all, problem with List resource is that it reads like the items it contains are supposed to be predefined. FYI Vinny's on leave this week |
Beta Was this translation helpful? Give feedback.
-
Thanks @jingtang10. For the GraphDefinition, I'm not sure I fully understand the use case. Is it for when a list is populated from multiple resources and we need to define what those resources are? In that case would we the query scheme need to understand Graph-like queries? Is that already supported? |
Beta Was this translation helpful? Give feedback.
-
This feature seems to have 2 portions:
1 could be something taken up as an SDK deliverable since it seems generic enough. 2 seems to be something we need to figure out on the fhircore side with clear use cases related to how the UI should/can be configured. Atm, 2 is blocked until we can get more information on the high-level cases to support around configurability. |
Beta Was this translation helpful? Give feedback.
-
The use cases for 2 are listing patients and tasks. We should review the UI screens and see if there's anything else so far, but building against those 2 use cases sounds good |
Beta Was this translation helpful? Give feedback.
-
Cool, but what aspects of the lists do we want to be configurable? Is it response to touch, some portions of their UI (perhaps the feel), the entirety of their UI. And what actions cause the UI to be updated? |
Beta Was this translation helpful? Give feedback.
-
We can look at the mock-ups, whatever is different btwn the patient and task lists must be configurable (other stuff not for now) |
Beta Was this translation helpful? Give feedback.
-
When we get to implementation this most likely lives in the SDK |
Beta Was this translation helpful? Give feedback.
-
We want to have the ability to present a generic list of Resources e.g. patients, encounters etc.
A few considerations and challenges:
viewholders/layouts
in Android. Is there room to use a single configurableviewholder
? Does this mean defining a layout via a Resource?viewmodel
) to handle state management for all Resource types in a scalable way?Beta Was this translation helpful? Give feedback.
All reactions