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

Modify middleware order and add backchannel injection sample #1331

Merged
merged 5 commits into from
Dec 5, 2018

Conversation

compulim
Copy link
Contributor

@compulim compulim commented Nov 9, 2018

Resolves #1430

Background

We want to enable custom middleware to modify existing behavior of saga. For example,

  • Add email to every DIRECT_LINE/POST_ACTIVITY
  • Automatically downscale photos

In order to enable this work, we need to tweak the middleware order. Moving custom middleware up will enable more scenarios, and should not disable any existing scenarios (because it is already at the bottom of the stack).

The sample would modify Redux action using custom middleware, and fed into saga for further processing (i.e. send it out).

Will fix #1430.

CHANGELOG.md

Changed

  • Core: Saga will run after custom middleware, in #1331
    • Custom middleware run before saga to allow user to modify default behavior

Fixed

  • Build: Webpack watch mode now emit non-minified code for shorter dev RTT, in #1331

Samples

  • Backchannel: Inject custom data into every POST_ACTIVITY, in #1331

@compulim compulim added 4.2 p1 Painful if we don't fix, won't block releasing labels Nov 9, 2018
@compulim compulim added this to the v4.2 milestone Nov 9, 2018
@coveralls
Copy link

coveralls commented Nov 9, 2018

Pull Request Test Coverage Report for Build 546

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.6%) to 45.581%

Totals Coverage Status
Change from base Build 544: 0.6%
Covered Lines: 722
Relevant Lines: 1412

💛 - Coveralls

@compulim
Copy link
Contributor Author

Adding @corinagum for code review.

@corinagum corinagum self-assigned this Nov 30, 2018
Copy link
Contributor

@corinagum corinagum left a comment

Choose a reason for hiding this comment

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

Approved, pending nitpick updates.

CHANGELOG.md Outdated Show resolved Hide resolved
samples/backchannel-inject-data-on-post/index.html Outdated Show resolved Hide resolved
@compulim compulim merged commit cfe9539 into microsoft:master Dec 5, 2018
@compulim compulim deleted the sample-inject-backchannel branch December 5, 2018 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1 Painful if we don't fix, won't block releasing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding custom data to channel data.
4 participants