-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add interface mode preference to Settings (#2583)
* feat: add interface mode preference to Settings * Refactor existing layout preferences so they are all persisted * Made a new namespace within the layout slice so that all values there will get persisted without having to add stuff to the persistence code AND we avoid namespace collisions * Wrapped layout slice getters and setters in a hook to provide descriptive names without modifying the underlying values * Remove duplicate testID that was causing e2e to fail --------- Co-authored-by: Amanda Bullington <albullington@gmail.com>
- Loading branch information
1 parent
768bea7
commit 31ce899
Showing
12 changed files
with
122 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import useStore from "stores/useStore"; | ||
|
||
// Wraps values from the layout slice with descriptive names | ||
const useLayoutPrefs = ( ) => useStore( state => ( { | ||
// Vestigial stuff | ||
obsDetailsTab: state.obsDetailsTab, | ||
setObsDetailsTab: state.setObsDetailsTab, | ||
isAllAddObsOptionsMode: state.isAdvancedUser, | ||
setIsAllAddObsOptionsMode: state.setIsAdvancedUser, | ||
|
||
// newer stuff | ||
...state.layout | ||
} ) ); | ||
|
||
export default useLayoutPrefs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters