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

Do not warn on unlabeled field-lists #542

Closed
wants to merge 8 commits into from

Commits on Jul 28, 2021

  1. fix: always output label node, remove warning, fix affected tests

    - as per pyxform/XLSForm#439, should always output a label node even if there
      is no label specified.
    - pyxform had a warning for no label but this is removed since there is
      no requirement for a label.
    - add tests to verify that a label is output and no warning raised
    - fix existing tests that either expected a warning or no label
    lindsay-stevens authored and yanokwa committed Jul 28, 2021
    Configuration menu
    Copy the full SHA
    29ecbf4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    84e3667 View commit details
    Browse the repository at this point in the history
  3. chg: error on guidance with no label/hint, test style, remove e2e tests

    - some clients hide the guidance hint by default, in which case the user
      would see nothing / a small (i) symbol if a question had only a
      guidance hint without any label (or media) or hint
    - update test_guidance_hint.py tests accordingly
    - change newly added test from ss_structure to md-style
    - removed e2e tests and associated files; more or less the same as the
      test immediately above in test_sheet_columns.py
    lindsay-stevens authored and yanokwa committed Jul 28, 2021
    Configuration menu
    Copy the full SHA
    8887c2a View commit details
    Browse the repository at this point in the history
  4. fix: restore previously removed label check, revert test changes

    - label check block applies to questions and other item types such as
      groups and repeats, so may be valid in other scenarios
    - for example this block is referenced in XLSForm#542
    - will require further changes to exclude question items from the check
      since that is the intent in XLSForm#439
    lindsay-stevens authored and yanokwa committed Jul 28, 2021
    Configuration menu
    Copy the full SHA
    077cede View commit details
    Browse the repository at this point in the history
  5. chg: make label check only apply to control items instead of questions

    - as noted in the comment, the check doesn't apply to questions anymore
      since PR XLSForm#543 makes pyxform always emit a label, and the only case
      that is not permissible is a guidance_hint with no label or hint.
    - nesting this check inside the "control group" processing branch seems
      the only neat+easy way about this, since:
      - the context is a loop from which the various branches continue, so
        it can't check at the end,
      - each branch parses / determines the actual item type which is not
        apparent in the raw "type" data from the row dict, and
      - after the loop context exits, the data is in an array with nested
        dicts so it's no longer possible to determine the sheet row number
        for the error message to be as useful to users.
    - refactored an old test which covers a lot of question types, into
      the tests_v1 / md style since this test is affected by the changes
      and having md style is more transparent
    - added some tests to verify the assumption that for the label check,
      it's not going to encounter a None or empty value for "control_type".
    lindsay-stevens authored and yanokwa committed Jul 28, 2021
    Configuration menu
    Copy the full SHA
    801ea61 View commit details
    Browse the repository at this point in the history
  6. dev: black formatting

    lindsay-stevens authored and yanokwa committed Jul 28, 2021
    Configuration menu
    Copy the full SHA
    889afc1 View commit details
    Browse the repository at this point in the history
  7. chg: clarify test names

    lindsay-stevens authored and yanokwa committed Jul 28, 2021
    Configuration menu
    Copy the full SHA
    d5fccf0 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9ce6a38 View commit details
    Browse the repository at this point in the history