elf icon indicating copy to clipboard operation
elf copied to clipboard

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

Open st-clair-clarke opened this issue 2 years ago • 5 comments

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

st-clair-clarke avatar Jul 02 '22 21:07 st-clair-clarke

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

Eralmidia avatar Apr 17 '23 07:04 Eralmidia

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. 😅

naaajii avatar May 04 '23 09:05 naaajii

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

arvidOtt avatar May 12 '23 15:05 arvidOtt

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

arvidOtt avatar May 28 '23 10:05 arvidOtt

#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!

bhuber2010 avatar Mar 01 '24 23:03 bhuber2010