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

Fix #215 - Add occupancy #948

Merged
merged 24 commits into from
Jan 7, 2019
Merged

Fix #215 - Add occupancy #948

merged 24 commits into from
Jan 7, 2019

Conversation

barbeau
Copy link
Member

@barbeau barbeau commented Dec 17, 2018

Design document:
https://docs.google.com/document/d/1TzP8_cEY8DaaVc_pBUtDbhxMGVuJlZeYWjHJXxzJ_-0/edit?ts=5c1dc928#

TODO:

  • Initial layout and UI for arrivals list (styles A and B), trip status, and vehicle marker
  • Parse server response and unit tests for arrivals-and-departures-for-stop
  • Parse server response and unit tests for trips-for-route
  • Parse server response and unit tests for trip-details
  • Set number of person icons for arrival list style A
  • Set number of person icons for map on route map marker balloon
  • Set number of person icons for trip details list items
  • Set number of person icons for trip details header
  • Set content description for accessibility based on occupancy
  • Set weight of occupancy icon to left when there is less than 3
  • Set number of person icons for arrival list style B
  • Set number of person icons for trip problem reporting arrival list
  • Test above values by setting when debugging
  • Add context menu when tapping on arrival time "About occupancy"

* Define layout for occupancy
* Add vector icon
* Switch LinearLayout to ConstraintLayout in arrival list
* Convert inner LinearLayout to ConstraintLayout
* Also do cleanup on arrival list item for hard-coded strings for debugging, extra imports, whitespace

TODO:
* Change visibility based on programmtic values
* Consume API
* Add content description for TalkBack
TODO:
* Test margins and alignments against master branch
# Conflicts:
#	onebusaway-android/build.gradle
* Caveat - "the actual position of the view stays at the original position (before translation), it will be translated only visually. Thereby, onClick events will be only triggered from within the old position. See https://stackoverflow.com/a/51652722/937715."  This is ok for us because the entire layout is one giant hit target based on what the Google Maps API supports for marker balloons, so we can't even detect the hit target for the chevron itself.
@barbeau barbeau added this to the v2.3.x milestone Dec 17, 2018
* For arrivals-and-departures-for-stop, trip-details, and trips-for-route APIs
Also reformat XML and add tools text
Directing inflating views doesn't seem to work in unit tests with getContext() or getTargetContext() so we'll use the adapter here instead to do it for us
We need a solid occupancy background color on the trip status header that has a green background
* For arrivals list, trip status, and vehicle marker balloon
* Also set occupancy transparency for past stops on trip details list
* By making view INVISIBLE instead of GONE the left and center occupancy silhouettes will remain in their place.  When the views were GONE the left and center icons will change position to be equally between the left and right side.
* This should be replaced with icons after the design is finalized
* From change to make occupancy silhouettes views stay left justified when not full (367757c)
* Also add description to unit test that doesn't require occupancy in response.
@barbeau barbeau changed the title WIP - Fix #215 - Add occupancy Fix #215 - Add occupancy Jan 7, 2019
@barbeau barbeau merged commit 885ae37 into master Jan 7, 2019
@barbeau barbeau deleted the occupancy branch January 7, 2019 00:40
@barbeau
Copy link
Member Author

barbeau commented Jan 7, 2019

Final result looks like this for historical occupancy (for arrivals list - same icons used in vehicle marker balloon and trip details list):

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant