Skip to content

Skip Logic #37

Closed
Closed

Description

@dalekunce

Need skip logic for tags.

For example:
Building=Commercial then ask for Name=* and amenity=*
Building=Residential then do not ask for Name=* or amenity=*

Activity

  1. added this to the Dhaka milestone on Mar 19, 2015
  2. removed this from the Dhaka milestone on Apr 7, 2015
  3. hallahan commented on Nov 21, 2015

    @hallahan
    Contributor

    For more advanced logic of this nature, my thought is that we should move away from adding to the XForms XML and mucking about deeper in the JavaRosa XForms madness. We want to stay away from modifying pyxform if possible.

    This should be a discussion item during kickoff week.

  4. hallahan commented on May 11, 2016

    @hallahan
    Contributor

    This is probably the most useful constraint.

    When building this make sure that the hidden tags may have required constraints, and they (perhaps a name tag) are only required if the parent tag, like building=commercial has been activated.

    See #17

  5. hallahan commented on May 14, 2016

    @hallahan
    Contributor

    Besides building=commercial vs building=residential, what are other skip logic examples?

    cc/ @dalekunce @PaulUithol

  6. added a commit that references this issue on May 17, 2016
  7. PaulUithol commented on May 17, 2016

    @PaulUithol

    Depends completely on what you're surveying :)

    Could be values for amenity, building values indeed, waterway (drainage, ditch, stream, river, etc) or any of a dozen others.

  8. added a commit that references this issue on May 17, 2016
  9. hallahan commented on May 17, 2016

    @hallahan
    Contributor

    Cool, this will be configurable in a form-by-form basis, as well as a global basis.

  10. hallahan commented on May 17, 2016

    @hallahan
    Contributor

    Somehow I need to figure out how to make the FragmentStatePager adapter update when the list of tags to be shown changes. Not obvious.

    This one is blocking me a bit right now. I'm thinking if I clean up TagEdit a bit so that the List<TagEdit> is not exposed to the TagSwipeActivity, it'll make more sense. If TagSwipeActivity just calls a static method of TagEdit or better yet, a container class for TagEdit, I can just have it get the tag it's asking for and leave it at that. Then, I'll have to find the right mechanism to tell the TagSwipe to refresh.

    Though this UI is not super common, it's similar to tabs found in the play store. If I can find an example of dynamically changing the list of tabs and their corresponding fragments, the same thing would apply for TagSwipe

  11. added 15 commits that reference this issue on May 18, 2016
  12. hallahan commented on May 20, 2016

    @hallahan
    Contributor

    Alright, 15 commits later, done! This one was pretty complex to implement. I think I've caught all the bugs, but this is a place with a high potential of UI bugs. It took a lot of logic to get us there. Please reopen if you run into any problems.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions