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

BrAPI Workflow UI #1048

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft

BrAPI Workflow UI #1048

wants to merge 15 commits into from

Conversation

chaneylc
Copy link
Member

@chaneylc chaneylc commented Sep 13, 2024

Description

New UI for BrAPI study import

  • Documentation
  • Minor refactoring: package, code duplication in BrAPIServiceV2
  • Various string resources
  • Improve sorting with toolbar / maybe better table view with column choices, currently sorts by list item label name ascending order
  • Discuss / improve search text filtering, when choosing/filtering studies users can add text segments, these text segments are logically matched using "OR" to filter models. Searching is different for non-study objects such as programs, these search texts are not saved. Should be AND
  • Discuss / improve filtering, non study filters such as programs do not affect other filters, I could see it being useful to choose a program then when browsing trials have only those belonging to the program show up Filters should affect other filters
  • Add time-based cache invalidation preference
  • Discuss cache persistence: currently cache is reset by the user in the toolbar UI, or whenever the server is authenticated, another option is to keep a directory hierarchy of caches for each server visited
  • Add exception UI
  • Discuss / improve level/sort/prim/sec UI, currently I have it choose "plot", "Row", "Col" if they exist and leave sort off by default.
  • level / unit handling. Do many studies have data across different levels? There could be optimizations for getting this data if so.

Required BrAPI calls:
GET studies / trials are required, latter is needed to filter by program since program data is not included in study objects
GET commonCropNames, trials, seasons, programs
GET observationlevels (although I noticed servers implement this differently, some don't return anything when supplying a programDbId, in that case you have to supply null)
GET observationVariables (from previous implementation, traits are imported with the studies)
GET observationUnits
GET germplasms (used to populate unit attribute table further)

Tested on BrAPI test server and Cassavabase.
The test server seems to have only one study that contains plots.
Cassavabase has a lot of data, making filtering interesting, but most calls take a long time to load.

Type of change

What type of changes does your code introduce? Put an x in boxes that apply.

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

New BrAPI Study import UI

…flows

# Conflicts:
#	app/src/main/AndroidManifest.xml
#	app/src/main/java/com/fieldbook/tracker/activities/brapi/update/BrapiCropsFilterActivity.kt
#	app/src/main/java/com/fieldbook/tracker/activities/brapi/update/BrapiFilterActivity.kt
#	app/src/main/java/com/fieldbook/tracker/activities/brapi/update/BrapiProgramFilterActivity.kt
#	app/src/main/java/com/fieldbook/tracker/activities/brapi/update/BrapiSeasonsFilterActivity.kt
#	app/src/main/java/com/fieldbook/tracker/activities/brapi/update/BrapiStudyFilterActivity.kt
#	app/src/main/java/com/fieldbook/tracker/activities/brapi/update/BrapiStudyImportActivity.kt
#	app/src/main/java/com/fieldbook/tracker/activities/brapi/update/BrapiTrialsFilterActivity.kt
#	app/src/main/java/com/fieldbook/tracker/brapi/service/BrAPIServiceV2.java
#	app/src/main/java/com/fieldbook/tracker/brapi/service/core/BrapiAlias.kt
#	app/src/main/java/com/fieldbook/tracker/brapi/service/core/ProgramService.kt
#	app/src/main/java/com/fieldbook/tracker/brapi/service/core/SeasonService.kt
#	app/src/main/java/com/fieldbook/tracker/brapi/service/core/StudyService.kt
#	app/src/main/java/com/fieldbook/tracker/brapi/service/core/TrialService.kt
#	app/src/main/java/com/fieldbook/tracker/dialogs/BrapiFilterBottomSheetDialog.kt
#	app/src/main/res/layout/activity_brapi_importer.xml
@trife
Copy link
Member

trife commented Sep 14, 2024

  • Rename fragment name when importing study. Currently says "Field Book"
  • Convert data elements to chips in the imported study list item (currently plots, traits, location)
  • For level selection- is there a way to see if these levels exist for a selected study and remove those that don't?
  • Use consistent button/UI for "Import" action (study chooser fragment vs. study chosen fragment)
  • Move active filters to below "Search" widget and out of pop up card
  • With above change, I'm not sure if popup card is needed. Maybe just a dialog with a list of filter options instead?
  • Search widget has some weird corner shading
  • Include trial name in study list items
  • Include the results number in the scrollview so it disappears when scrolling through the list. Maybe just include this as a chip so it matches the rest of the UI when filters are present?
  • The actual import process is really slow, even for studies with a small number of entries (testing on Cassavabase). Is there anything we can do on our side or is due to issues on their side?
  • Could also move the semi-opaque import process to a list of checkmarks when each step is done
  • Primary/secondary selection can eventually be removed. It might be worth working on Primary/Secondary Order modifications #574 before this gets merged

chaneylc and others added 8 commits September 20, 2024 15:05
various ui updates
filtered level selection to those that exist, view is disabled until all data is received
changed text filtering to AND unique tokens instead of OR
trials are now filtered by chosen program
seasons are filtered by program and trial
fix observation levels showing when they don't exist as units
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.

2 participants