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

Output empty <label/> instead of omitting it. #543

Merged
merged 8 commits into from
Jul 28, 2021

Commits on Jul 5, 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 committed Jul 5, 2021
    Configuration menu
    Copy the full SHA
    10ee66e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6bb547b View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2021

  1. Configuration menu
    Copy the full SHA
    4123379 View commit details
    Browse the repository at this point in the history
  2. 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 committed Jul 27, 2021
    Configuration menu
    Copy the full SHA
    8ed7e64 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2021

  1. 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 committed Jul 28, 2021
    Configuration menu
    Copy the full SHA
    1a59e16 View commit details
    Browse the repository at this point in the history
  2. 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 committed Jul 28, 2021
    Configuration menu
    Copy the full SHA
    3e4a84e View commit details
    Browse the repository at this point in the history
  3. dev: black formatting

    lindsay-stevens committed Jul 28, 2021
    Configuration menu
    Copy the full SHA
    e91a176 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a0d3f7c View commit details
    Browse the repository at this point in the history