Skip to content
This repository has been archived by the owner. It is now read-only.

feat(client): Add the internal behaviors API. #3097

Merged
merged 1 commit into from Sep 24, 2015
Merged

feat(client): Add the internal behaviors API. #3097

merged 1 commit into from Sep 24, 2015

Conversation

@shane-tomlinson
Copy link
Member

@shane-tomlinson shane-tomlinson commented Sep 22, 2015

No description provided.

* LOGIN: <specify in subclass>\
* }
*/
_commands:null,

This comment has been minimized.

@pdehaan

pdehaan Sep 22, 2015
Contributor

nit: Add space after semi.
(wonders if ESLint or JSCS catches this stuff — Travis is green, so apparently not...)

This comment has been minimized.

@shane-tomlinson

shane-tomlinson Sep 22, 2015
Author Member

thanks @pdehaan, I didn't notice that!

This comment has been minimized.

@pdehaan

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.
* CHANGE_PASSWORD: <specify in subclass>,
* DELETE_ACCOUNT: <specify in subclass>,
* LOADED: <specify in subclass>,
* LOGIN: <specify in subclass>\

This comment has been minimized.

@pdehaan

pdehaan Sep 22, 2015
Contributor

nit: stray "" at EOL.

@shane-tomlinson shane-tomlinson changed the title Refactor extract behaviors WIP: feat(client): Start on behaviors. Sep 23, 2015
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
  }
},
...
```
@shane-tomlinson
Copy link
Member Author

@shane-tomlinson shane-tomlinson commented Sep 23, 2015

@vladikoff - This is a cleaned up version of the behaviors we spoke about yesterday. Mind having a look?

@shane-tomlinson shane-tomlinson changed the title WIP: feat(client): Start on behaviors. feat(client): Start on behaviors. Sep 23, 2015
@shane-tomlinson shane-tomlinson added this to the FxA-27: fennec web login milestone Sep 23, 2015
@shane-tomlinson shane-tomlinson changed the title feat(client): Start on behaviors. feat(client): Add the (internal) behaviors API. Sep 23, 2015
@shane-tomlinson shane-tomlinson changed the title feat(client): Add the (internal) behaviors API. feat(client): Add the internal behaviors API. Sep 23, 2015
vladikoff added a commit that referenced this pull request Sep 24, 2015
feat(client): Add the internal behaviors API. r=vladikoff
@vladikoff vladikoff merged commit 233401c into mozilla:master Sep 24, 2015
4 checks passed
4 checks passed
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.003%) to 98.871%
Details
@shane-tomlinson shane-tomlinson deleted the shane-tomlinson:refactor-extract-behaviors branch Feb 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants