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

Feature request - filter at a granular level #24

Open
TechAkayy opened this issue Dec 13, 2021 · 2 comments
Open

Feature request - filter at a granular level #24

TechAkayy opened this issue Dec 13, 2021 · 2 comments

Comments

@TechAkayy
Copy link
Contributor

TechAkayy commented Dec 13, 2021

Is it possible to support marking individual action/observable/computed loggable? This could be combined with the other local store filter request - #23

Ability to apply filters at global store, local store & for individual prop (observable/action/computed) will provide all the required flexibility during development.

Possible API could be similar to mobx's makeObservable:

mobx.makeObservable(this, {
    connectionStatus: observable
})

makeLoggable(this, {
  filters: {
    connectionStatus: true, // connectionStatus is an observable
    computeds: false,
    actions: false,
    observables: false,
  }
})

Thanks again!

@kubk
Copy link
Owner

kubk commented Dec 13, 2021

Thank you for splitting the tasks. This one isn't easy because Mobx sometimes doesn't provide all the information required to implement this feature. So far you can use Chrome built-in console filters. I'll try to come up with a solution.

@kubk kubk added the enhancement New feature or request label Dec 19, 2021
@dstaver
Copy link

dstaver commented Nov 15, 2022

It would be awesome to be able to filter. We have some really huge stores that easily crashes redux devtools, so I can't safely enable logging where I want right now.

I think a good first step for this would be a filter callback that gets the full mobx spyEvent and skips logging if the callback returns false. I agree that the information from Mobx is a bit tricky to work with.

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

No branches or pull requests

3 participants