Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Feature/ois/result tabs info #1147

Merged
merged 1 commit into from Jan 10, 2019
Merged

Feature/ois/result tabs info #1147

merged 1 commit into from Jan 10, 2019

Conversation

oyvindis
Copy link
Contributor

@oyvindis oyvindis commented Jan 9, 2019

Jira issue link: link

check applicable boxes

  • I have made tests to match the user stories
  • This code does not require tests that match user stories

@@ -21,7 +21,7 @@ export function configureStore() {

const enhancer = selectedCompose(
applyMiddleware(...middlewares),
persistState([/* 'featureToggle', */ 'settings'], { key: 'redux' })
persistState(['featureToggle', 'settings'], { key: 'redux' })
Copy link
Contributor

@markkopaas markkopaas Jan 9, 2019

Choose a reason for hiding this comment

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

Som vi snakket, vi har en fare nå, et brukere får status lest ut fra localstorage, og den skal overstyre din "initial state".

Det ser ut til meg, at hver feature, som har noen gang vært under featuretoggle kan aldri settes tilbake igjen.

Så vi trenger noe til å overstyre den initial state som var lastet ut fra localstore. Jeg tenkte om å håndtere action @@init, men da fant jeg ordentlig løsning :

reduxjs/redux#186 (comment)

Så, featureToggle skulle håndtere FEATURE_TOGGLE_INIT action, sånn, at det filtrerer ut bare de, som vi vill være aktive nå.
state=_.pick(state, [ ...listen av nåværende toggles])

@oyvindis oyvindis merged commit df7a2dc into develop Jan 10, 2019
@oyvindis oyvindis deleted the feature/ois/resultTabs-info branch January 10, 2019 08:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants