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

Add disableTracking to StoreConfig #519

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hrvbernardic
Copy link

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Currently there is no way to exclude certain store from devtools tracking through store config.

Issue Number: N/A

What is the new behavior?

With new disableTracking flag it is possible to disable tracking for a certain store allowing you to use it in a library and having an option to not pollute applications devtools tracking or providing an option to turn it on when needed.

Does this PR introduce a breaking change?

  • Yes
  • [x ] No

Other information

@@ -109,3 +109,6 @@ export function createWidget(id) {
}

export const tick = () => new Promise(process.nextTick);

@StoreConfig({ name: 'disabledTrackingConfig', disableTracking: true })
Copy link
Collaborator

Choose a reason for hiding this comment

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

I prefer not using devtools configuration in the store. It should be in the devtools options.

Copy link
Author

Choose a reason for hiding this comment

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

Ok, so my idea was to enable using Akita in libraries for complex components. This way I could disable it by default and the application developer wouldn't see them unless he chose to through let's say component's module configuration. I suppose you want me to add storeBlacklist to devtools options? In that case i should do it by providing storeBlacklistPattern since i will be relying on storeName's prefix.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Add storeBlacklist and support both strings and cb function.

Copy link
Collaborator

Choose a reason for hiding this comment

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

And add yourself to the contributors' list

Copy link
Author

Choose a reason for hiding this comment

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

Ok, deal.

Copy link
Author

Choose a reason for hiding this comment

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

I'll create a new PR

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.

None yet

2 participants