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

Select appearances improvements #3079

Merged
merged 2 commits into from
May 22, 2019

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented May 21, 2019

What has been done to verify that this works as intended?

I reviewed my changes visually and added automated tests to confirm we can use 1 to 10 columns.

Why is this the best possible solution? Were any other approaches considered?

Changes agreed on the forum: https://forum.opendatakit.org/t/spec-proposal-harmonize-compact-compact-n-horizontal-horizontal-compact-appearances/15565/32?u=grzesiek2010

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

The pr contains small changes so I don't think testing is required, a code review should be enough.

Do we need any specific form for testing your changes? If so, please attach one.

No.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

  • run ./gradlew checkAll and confirmed all checks still pass OR confirm CircleCI build passes and run ./gradlew connectedDebugAndroidTest locally.
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@grzesiek2010 grzesiek2010 force-pushed the selectAppearancesImprovements branch 2 times, most recently from 8ee3033 to 210fa04 Compare May 21, 2019 12:03
Copy link
Member

@lognaturel lognaturel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for getting right on it, @grzesiek2010!

@@ -122,6 +122,12 @@ public static int getNumberOfColumns(FormEntryPrompt formEntryPrompt, Context co
numColumns = Integer.parseInt(substringFromNumColumns.substring(0, substringFromNumColumns.contains(" ")
? substringFromNumColumns.indexOf(' ')
: substringFromNumColumns.length()));

if (numColumns < 1) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although we're only officially supporting up to 10 columns, I don't think this is necessary. I think it would be more confusing than it's worth. I think we should unofficially continue supporting arbitrary values of N.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I thought it over and I agree it's better to allow using > 10 columns because in some cases it could be useful (if it's a big screen and options are pretty short like A, B, C, etc.) but then I don't understand why you want to document that we support up to 10 columns.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For spec-level purity. You can see the discussion at XLSForm/xlsform.github.io#125 (comment).

@lognaturel
Copy link
Member

Agree this doesn't need QA. Please see what you think of my suggestion and then we can merge.

@grzesiek2010 grzesiek2010 force-pushed the selectAppearancesImprovements branch from 210fa04 to 0d1e45f Compare May 22, 2019 09:16
@grzesiek2010 grzesiek2010 added this to the v1.22 milestone May 22, 2019
@lognaturel lognaturel merged commit 7fe83b3 into getodk:master May 22, 2019
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