-
Notifications
You must be signed in to change notification settings - Fork 23
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
[2016] Organize grid into sections with headings #277
base: dev
Are you sure you want to change the base?
Conversation
- Bump build tools version to latest. This is required for Multidex. - Delete ic_launcher from OdkCollect, required because later versions of the AAPT build tool handle duplicate resources as errors, and this file was causing the build to fail. - Add dependency upon the legacy HTTP library. API 23 deprecated Apache HTTP, but we're still using it for Health check code. - Update OdkCollect to latest build tools as well, because it was separately including the legacy Apache HTTP library, which was resulting in conflicts from having the same JAR included twice. Updating to the latest build tools means that it can use the same legacy library as `:app`, which eliminates the conflict. - Update support library versions to 23 so that they work with the latest build tools. - Enable Multidex. Tested on API 21 (L) and 19 (KK) - Remove Guava as a direct dependency, and delete code that used it from `JsonPatient`. Note that Guava is still included by Pebble as a transitive dependency, but I don't want developers on this project to be able to use it in code we control, so we have the flexibility to remove the dependency one day. See https://slack-files.com/T02T5LNM4-F0JQ1UDRV-716ebe431f for details.
Enable multidex to temporarily avert the dexocalypse.
- Clean up adding encounters. - Previously, there was functionality to try and "guess" the type of observation. Remove this, the server has knowledge of concept type and can figure it out from the question UUID, and value type isn't used on the client. - Allow an `enterer_uuid` to be specified when an encounter is created, which allows the encounter to be attributed to a user. - Change representation of observations in an encounter from a Map of Question UUIDs --> Values to a List of JsonObservations. This means that we can process them consistently to the way the Observation syncing code does. - Add a notes panel, which slides up from the bottom of the patient chart activity and allows notes to be entered by the user.
Make start and stop (end) times for cell accessible via javascript
Add a notes panel to the patient chart screen.
…der-dosage-frequency Fix Order Dosage and Frequency
…s-dialog-time-format Fix for Observation List Dialog (Void Obs)
…s-abbr-format Fix Observation {1,abbr} format
Fixes #199. - In FormEntryActivity, remove the try{} block that catches RuntimeExceptions and tries to skip forward. It just hides errors. - In FormController, remove assumption that groups are non-empty, and update the "next entry" logic to handle empty groups.
This fixes #176
Allow empty sections in ODK forms.
Fix test compilation
…quired-fields Fix Required Fields
…-patient-like-search Enable like search.
- The notes panel expanding no longer greys out the chart - The notes panel is fixed at 60% height - It's now possible to scroll to the bottom of the patient chart when the notes panel is open, thanks to some layout hackery.
Tweak notes panel to take up less space
…vely Only refresh the patient chart if something changed after a sync.
- You can set the start date when you first create an order, but not when you edit it. - Fix the "stop after X days" logic to be a straightforward duration since start date, instead of being the duration from today. This makes a lot more sense now that we're actually displaying the start date.
Fix a french translation
Fix a crash relating to displaying forms with persistent fields.
Previously, all tiles had their clicking disabled by faulty logic. Pebble doesn't know how to handle the `.length` property of arrays, and interpreted it as null, which prevented the relevant code from firing. This change converts `ChartItem#conceptUuids` to a List instead of an array, such that Pebble is capable of working with the field.
Restore clickability for all tiles with 1 concept.
…calize_stringsxml_to_portuguese Feature/rafaelteixeira localize stringsxml to portuguese
…-br-translation pt-BR translation
@@ -149,6 +149,12 @@ public void render(Chart chart, Map<String, Obs> latestObservations, | |||
mTileRows.add(tileRow); | |||
} | |||
for (ChartSection section : chart.rowGroups) { | |||
// To create a row for the chart section we have to add any UUID. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest "we have to add an arbitrary UUID".
Is it possible to set this arbitrary UUID to null
or ""
instead of the concept for notes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@capnfabs As a matter of fact yes. I changed that. Thanks.
Aside from arbitrary UUID comments, looks good to me. |
Just tested this. It looks great!! Will a section that doesn't contain any rows be hidden? (i.e. if all the fields in it have required=no and they don't have any values) Can you remove the "Observations" heading as each section in the profile has a title so there is no need for the extra heading? |
App just crashed for me with this branch, not sure if this is related or a separate issue: |
@dancunningham I extracted this exception from the bugreport: 02-29 13:23:59.384 32156 32156 E AndroidRuntime: FATAL EXCEPTION: main
02-29 13:23:59.384 32156 32156 E AndroidRuntime: Process: org.projectbuendia.client.dev, PID: 32156
02-29 13:23:59.384 32156 32156 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.projectbuendia.client.dev/org.projectbuendia.client.ui.lists.LocationListActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.projectbuendia.client.ui.lists.LocationListController.attachFragmentUi(org.projectbuendia.client.ui.lists.LocationListController$LocationFragmentUi)' on a null object reference
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2442)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at android.app.ActivityThread.access$800(ActivityThread.java:156)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1351)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at android.os.Looper.loop(Looper.java:211)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5373)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.projectbuendia.client.ui.lists.LocationListController.attachFragmentUi(org.projectbuendia.client.ui.lists.LocationListController$LocationFragmentUi)' on a null object reference
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at org.projectbuendia.client.ui.lists.LocationListFragment.onViewStateRestored(LocationListFragment.java:67)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at android.support.v4.app.Fragment.restoreViewState(Fragment.java:472)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1094)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1248)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1230)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:2042)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:165)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:543)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at org.projectbuendia.client.ui.BaseLoggedInActivity.onStart(BaseLoggedInActivity.java:144)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1236)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at android.app.Activity.performStart(Activity.java:6006)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2342)
02-29 13:23:59.384 32156 32156 E AndroidRuntime: ... 10 more It seems unrelated but part of the stacktrace is missing. |
@dancunningham I removed the observations row but still haven't figure out how to hide the section rows when empty. I'll get back to it later on. |
This PR is based on this pivotal story: https://www.pivotaltracker.com/story/show/108434518