ngneat / elf

🧙‍♀️ A Reactive Store with Magical Powers
https://ngneat.github.io/elf/
MIT License
1.63k stars 93 forks source link

Support for 'trace' option in @ngneat/elf-devtools #296

Open st-clair-clarke opened 2 years ago

st-clair-clarke commented 2 years ago

Which @ngneat/elf-* package(s) are relevant/releated to the feature request?

@ngneat/elf-devtools

Description

@ngneat/elf-devtools only support some options as documented here dev-tools.

Could we get support for 'trace' option as well please.

Thanks

Proposed solution

It would be handled similarly to the current options.

Alternatives considered

None

Do you want to create a pull request?

No

Eralmidia commented 1 year ago

+1 Adding this would really push us to move from Akita to Elf.

naaajii commented 1 year ago

I believe this is fairly very simple as it should just add trace property in DevtoolsOptions & add the following code:

if (options.trace) {
      console.groupCollapsed(`[${displayName}]`);
      console.trace();
      console.groupEnd();  
}

but I'm unsure where would this go. 😅

arvidOtt commented 1 year ago

Happy to receive feedback on #459 👍 (it's my first contribution to Elf)

arvidOtt commented 1 year ago

@st-clair-clarke @NetanelBasal PR #459 was merged. Can this issue be closed now?

bhuber2010 commented 9 months ago

459 only logs on store add or remove, not really that helpful. A full trace as in regular redux devtools expects (via trace option) seems to require much deeper work. Adding the option manually (ignored typing for the test) just gives the base observable stack, when only 10 calls are shown by default. And it slows things down greatly already.

Not sure I have time to dig deeper to try and figure out a solution, but if someone does, that'd be amazing!