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

User sessions plugin improvements #7

Merged

Conversation

offtherailz
Copy link

Description

  • doc improvements
  • add enable/disable autoSave on plugin's mount/unmount
  • fixed a bug that didn't load the userContext with the path /context/context-name (while it was working for /context/context-name/1234). It was caused by a forced skip ( I think it was done to make tests work) and fixed tests.
  • Added a test utility for more complex interactions like this one.
  • fixed tests

@offtherailz
Copy link
Author

Please @mbarto can you look at this to confirm my hypothesis and review my changes? Thank you

@@ -112,7 +112,7 @@ const createSessionFlow = (mapId, contextName, action$, getState) => {
).flatMap(([id, data]) => {
const userName = userSelector(getState())?.name;
return Observable.of(loadUserSession(buildSessionName(id, mapId, userName))).merge(
action$.ofType(USER_SESSION_LOADED).flatMap(({session}) => {
action$.do(console.log).ofType(USER_SESSION_LOADED).take(1).switchMap(({session}) => {
Copy link
Owner

Choose a reason for hiding this comment

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

Is the console.log expected, or did you forget to remove it?

Copy link
Owner

@mbarto mbarto left a comment

Choose a reason for hiding this comment

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

No concerns, have a look at my comment about console.log

@mbarto mbarto merged commit ad8e9f9 into mbarto:user_sessions_plugin Apr 29, 2020
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.

2 participants