Skip to content

Conversation

@tarrow
Copy link
Contributor

@tarrow tarrow commented Jul 24, 2020

Use Redux Middleware to provide a place to transparently
inject a function to be called on zoomOut.

Additionally tweaked the tests and used a mocked store for
snapshots.

n.b. class for streamgraph backlink is not added in this
commit

tarrow and others added 10 commits July 24, 2020 17:46
Use Redux Middleware to provide a place to transparently
inject a function to be called on zoomOut.

Additionally tweaked the tests and used a mocked store for
snapshots.

n.b. class for streamgraph backlink is not added in this
commit
=> using valid state values instead
- fixed test import
- added test for streamgraph
(for testing purposes)
@Konstiman
Copy link
Contributor

Thanks for the PR!

It works well with the normal headstart, there were though some bugs in the streamgraph. I fixed them all.

I also changed things I believe were wrong:

  • Initiating store state with null, which is a value that doesn't represent a valid state. I replaced it with a valid state value in both subreducers.
  • Dispatching the event from backlink: instead of passing dispatch into the component, I used the mapDispatchToProps function. Based on the tutorials I've seen, this approach is used more often.

Moreover, I returned features that I think are useful:

  • The onclick warn saying there was a react component click: Chris wanted this feature for testing.
  • The onclick tests.

Then I added some more tests, added the backlink-streamgraph class for the streamgraph version and cleaned things a bit (deleted the obsolete snapshot, removed hide_backlink from the code and formatted some files with Prettier).

I'm merging the PR now and I'll continue with changes in my branch.

@Konstiman Konstiman merged commit 1bc3f44 into refactoring-01-mvp Jul 28, 2020
@Konstiman Konstiman deleted the refactoring-01-mvp-middleware branch August 20, 2020 09:54
chreman pushed a commit to chreman/Headstart that referenced this pull request Oct 13, 2021
…toring-01-mvp-middleware

Use Middleware to trigger mediator actions

Former-commit-id: 1bc3f44
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.

3 participants