This repository has been archived by the owner. It is now read-only.
feat(client): Add the internal behaviors API. #3097
Merged
Conversation
| * LOGIN: <specify in subclass>\ | ||
| * } | ||
| */ | ||
| _commands:null, |
pdehaan
Sep 22, 2015
Contributor
nit: Add space after semi.
(wonders if ESLint or JSCS catches this stuff — Travis is green, so apparently not...)
nit: Add space after semi.
(wonders if ESLint or JSCS catches this stuff — Travis is green, so apparently not...)
pdehaan
Sep 22, 2015
Contributor
I'm thinking we need to set the key-spacing rule in our .eslintrc file (or ideally upstream in the eslint-config-fxa module):
"key-spacing": [2, { "beforeColon": false, "afterColon": true }]
If I try changing that locally against master branch, I get the following output:
➜ fxa-content-server git:(master) ✗ grunt eslint --force
Running "eslint:grunt" (eslint) task
Running "eslint:app" (eslint) task
/Users/pdehaan/dev/fxa-content-server_pd/fxa-content-server/app/scripts/views/force_auth.js
71:17 error Extra space before value for key "email" key-spacing
/Users/pdehaan/dev/fxa-content-server_pd/fxa-content-server/app/tests/spec/models/auth_brokers/oauth.js
107:26 error Extra space before value for key "redirect" key-spacing
148:26 error Extra space before value for key "redirect" key-spacing
169:26 error Extra space before value for key "redirect" key-spacing
✖ 4 problems (4 errors, 0 warnings)
Warning: Task "eslint:app" failed. Used --force, continuing.
Running "eslint:tests" (eslint) task
Running "eslint:scripts" (eslint) task
Running "eslint:server" (eslint) task
Done, but with warnings.
I'm thinking we need to set the key-spacing rule in our .eslintrc file (or ideally upstream in the eslint-config-fxa module):
"key-spacing": [2, { "beforeColon": false, "afterColon": true }]If I try changing that locally against master branch, I get the following output:
➜ fxa-content-server git:(master) ✗ grunt eslint --force
Running "eslint:grunt" (eslint) task
Running "eslint:app" (eslint) task
/Users/pdehaan/dev/fxa-content-server_pd/fxa-content-server/app/scripts/views/force_auth.js
71:17 error Extra space before value for key "email" key-spacing
/Users/pdehaan/dev/fxa-content-server_pd/fxa-content-server/app/tests/spec/models/auth_brokers/oauth.js
107:26 error Extra space before value for key "redirect" key-spacing
148:26 error Extra space before value for key "redirect" key-spacing
169:26 error Extra space before value for key "redirect" key-spacing
✖ 4 problems (4 errors, 0 warnings)
Warning: Task "eslint:app" failed. Used --force, continuing.
Running "eslint:tests" (eslint) task
Running "eslint:scripts" (eslint) task
Running "eslint:server" (eslint) task
Done, but with warnings.| * CHANGE_PASSWORD: <specify in subclass>, | ||
| * DELETE_ACCOUNT: <specify in subclass>, | ||
| * LOADED: <specify in subclass>, | ||
| * LOGIN: <specify in subclass>\ |
pdehaan
Sep 22, 2015
Contributor
nit: stray "" at EOL.
nit: stray "" at EOL.
Behaviors are a way for brokers to specify the action a view should
take after the view interacts with the broker. Next steps could be screen
transitions or `halt`. Currently only `halt` behavior is supported.
Default view behaviors are defined in the BaseAuthenticationBroker. Subclasses
can override behaviors by overriding the `defaultBehaviors` property or by
calling `setBehavior`.
Example `defaultBehaviors` property:
```js
defaultBehaviors: {
afterSignIn: {
halt: false
}
},
...
```
|
@vladikoff - This is a cleaned up version of the behaviors we spoke about yesterday. Mind having a look? |
vladikoff
added a commit
that referenced
this pull request
Sep 24, 2015
feat(client): Add the internal behaviors API. r=vladikoff
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
No description provided.