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

Adds survey availability notices, optimizes survey list and triggers, fixes bug with Realm data #99

Merged
merged 7 commits into from
Jun 10, 2016

Conversation

sophiabersani
Copy link
Contributor

This PR is a series of related tasks related to the survey list and triggers.

Realm version had to be updated to fix a common bug. Be sure to run npm install after merging this branch.

Stories:
https://www.pivotaltracker.com/story/show/120683843
https://www.pivotaltracker.com/story/show/121071009
https://www.pivotaltracker.com/story/show/121131787

Features:

  • Adds a notice for triggered forms in the survey list.

Changes:

  • Refactored Trigger detection to support checks on individual Surveys.
  • Adds an instant trigger check on accepting a survey.
  • Omits push notifications for instant triggers to avoid spam when accepting forms.

Bug fixes:

  • Fixes a styling issue that caused survey list items to hide behind the filter menu.
  • Updates Realm version to fix a crash happening on new schema versions and migration.

@dan-nyanko
Copy link
Contributor

@gbersani ping

@dan-nyanko
Copy link
Contributor

Also, this is likely going to need updated to work on Android. So I'd prefer this to happen after #100

@sophiabersani
Copy link
Contributor Author

Sounds good.
I've already had to do some heavy conflict resolution on my map-view branch to get it on par with #100, this one shouldn't be as bad.

gbersani added 2 commits June 9, 2016 11:40
# Conflicts:
#	android/app/src/main/AndroidManifest.xml
#	android/app/src/main/java/com/goodquestion/MainActivity.java
#	android/app/src/main/res/values/strings.xml
#	index.android.js
#	js/router/SharedNavigator.js
#	package.json
formId: 'string',
surveyId: 'string',
formId: {type: 'string', default: 'none'},
surveyId: {type: 'string', default: 'none'},
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we checking for 'none' somewhere that we are defaulting to this value? Perhaps a preference thing, but why not null?

Copy link
Contributor

Choose a reason for hiding this comment

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

The reason I don't like defaulting to a 'none' string, is that its a truthy value and could lead to a potential bug.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From what I found Realm can perform automatic migrations, having the default set can prevent a few crashes when updating objects when calling these new properties.

There's no easy way to check if a value is null with a query, as it forces strict type casting.

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like its been added: realm 162.

@dan-nyanko dan-nyanko merged commit e19441c into master Jun 10, 2016
@dan-nyanko dan-nyanko deleted the survey-availability branch June 10, 2016 12:44
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.

None yet

2 participants