-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feature(redux-devtools-inspector-monitor): sorted state tree #1264
Conversation
🦋 Changeset detectedLatest commit: 5d46901 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
edecfb1
to
3f55afa
Compare
useEffect(() => { | ||
if (!chrome || !chrome.storage) return; | ||
const storage = isFF | ||
? chrome.storage.local | ||
: chrome.storage.sync || chrome.storage.local; | ||
storage.get( | ||
['sortStateTreeAlphabetically', 'disableStateTreeCollection'], | ||
function (result) { | ||
setSortObjectKeys(!!result.sortStateTreeAlphabetically); | ||
setDisableCollection(!!result.disableStateTreeCollection); | ||
} | ||
); | ||
}, []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make it so these are props instead? Only the extension itself should be reading/writing settings from storage. It should then pass those settings down as props to the monitor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Will adjust it in the following days.
invertTheme={invertTheme} | ||
hideRoot | ||
sortObjectKeys={sortObjectKeys} | ||
{...(disableCollection ? { collectionLimit: 0 } : {})} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain what the use case for this option is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the state does have a lot of keys they are collapsed. This option prevents this.
collectionLimit: number
- sets the number of nodes that will be rendered in a collection before rendering them in collapsed ranges
I implemented the changes and replaced the options page. The settings are managed in the state now. |
dad8f9b
to
a7c68c0
Compare
I have rebased the pull request. |
…ree alphabetically and/or disable collections
@Methuselah96 Could you have a look again and tell me what's missing to get this merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience and willingness to work on this. Looks good.
This pull request adds the options to sort the state tree alphabetically, and the option to prevent collecting object keys together.
Partially solves #433