Domiii / Domiii/dbux

Add "stats" button to Toolbar to control which stats to show on each ContextNode call graph node

Open
#478 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
171
Forks
13
PR merge metrics
No merged PRs in 30d

Description

* add new `stats` button to `Toolbar` for toggling stats information on `ContextNode`, when clicked...:
* [ ] store `statsMask` in `GraphRoot` state
* [ ] call `setStatsMask` on all `ContextNode` components
* [ ] add new `Enum` `StatsMask`
* [ ] `Enum` already provides several bit mask features for this. Missing operations need to be added (such as `has`, `add` and `delete`).
* [ ] Add a "Settings" (⚙️) button. When clicked toggles new `SettingsPanel` right under the `Toolbar`
* [ ] Add `StatsPanel` to `SettingsPanel`
* [ ] Allow choosing which stats to show when `Stats` are enabled (one checkbox per stat)
* This should support all types of stats from `StatsByContextQuery.get*` functions

Explanation:
* A mask in this case refers to a "bit mask", an integer housing one boolean per individual bit.

## Future Work (don't do for now)
* [ ] only `dp.queryImpl.statsByContext.subscribe()` when `statsEnabled` (can add that logic in `GraphRoot.update`)
* requires extra level of bookkeeping

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.