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

Support for InputField (used for new "Enjoy Life Forever!" brochure) #52

Merged
merged 11 commits into from
Mar 21, 2021

Conversation

AndreasSko
Copy link
Owner

@AndreasSko AndreasSko commented Mar 18, 2021

The new Enjoy Life Forever! brochure is the first one to use the InputField table. It uses it to store the progress and notes users are saving.
Right now, JWLM will fail to import backups containing entries in InputField. This PR adds support for it.

Other changes:

  • ⬆️ Upgrade dependencies
  • Only use stretchr/testify and remove tj/assert (was added by mistake)
  • Make Model.SortByUniqueKey public
  • Allow to ignore Model fields
  • Database: Support sliceCapacity for models that don't have an ID
  • 📝 Link to JWLM in App Store

@coveralls
Copy link

coveralls commented Mar 18, 2021

Coverage Status

Coverage increased (+0.4%) to 86.21% when pulling d8fe5ab on input_field into d5a655b on master.

@AndreasSko AndreasSko force-pushed the input_field branch 8 times, most recently from 8a13f31 to 725f620 Compare March 21, 2021 11:37
InputField is used for interactive publications
like the new "Enjoy Life Forever!" book. It can
contain arbitrary text values.
The table `InputField` does not have an ID
column, so we can't determine the slice
capacity using that. As we at the same time
don't need to have a proper order anymore,
we can just use the number of entries.
Some fields of a Model may not be represented
in the actual database table. Adding the
`ignore:"true"` tag will ignore those, so it is
not tried to import/export them.
This adds support to import the `InputField`
table. Also updated the tests to incorporate
this change.
Sorting slices of Models by uniqueKey is
something that is also useful in other packages.
This adds the capability to the CMD and Gomobile
to merge InputFields.
Somehow `tj/assert` was used for some tests.
Switching back to use `stretchr/testify` in testing.
@AndreasSko AndreasSko marked this pull request as ready for review March 21, 2021 19:49
@AndreasSko AndreasSko merged commit 5ae99f5 into master Mar 21, 2021
@AndreasSko AndreasSko deleted the input_field branch March 21, 2021 19:54
AndreasSko added a commit to AndreasSko/ios-jwlm that referenced this pull request Mar 22, 2021
This adds support for merging InputFields.
See AndreasSko/go-jwlm#52
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