-
-
Notifications
You must be signed in to change notification settings - Fork 488
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
feat: gray out non-matches when searching #554
feat: gray out non-matches when searching #554
Conversation
Hmm, if this bug wasn't active earlier but is now visible, we will need to fix it before we can ship this feature. Are you able to debug further on why this happens and if updating our version of FoamTree would help fix the situation? Ever since #412 we've got FoamTree from an NPM package. I don't recall right now on how updating this package will happen so it needs some thought behind it. Looking through the changelogs of FoamTree could show if this bug has existed on FoamTree side and has now been fixed. |
7c2d117
to
aa96b63
Compare
Hmm, I don't think FoamTree is open source? I don't even see a way to file an issue. You are using the latest version (3.5.0). |
Yeah FoamTree is not open source but they do distribute it via npm |
Interesting. If i change the Is it viable to work around this for now by always redrawing all groups, i.e. Edit: Thinking this through more: if the highlight groups changes (which is where this I have updated the PR along these lines. |
aa96b63
to
8680d12
Compare
Thanks for looking more into why this case happened 😊. I'm not that familiar with the treemap interaction code so it is very helpful to have you figure this out, too. It sounds like the original code could've used the |
This PR reduces the saturation (from 60 to 10) for non-matches. Fixes webpack-contrib#553
8680d12
to
0ee0c48
Compare
the i have not noticed any rendering lag for the example above, which has maybe 100 top-level groups, and 600 total groups. |
Okay thanks for the extra information! That sounds like a useful optimization to have. I suspect that operation is costly so with users having even more groups and maybe a less powerful machine could get performance issues they weren't seeing earlier. However, we are indeed debouncing changes done to the search input here: webpack-bundle-analyzer/client/components/Search.jsx Lines 42 to 44 in 3893041
so maybe the performance issue wouldn't be that bad. I don't know what other code paths call to this method that now calls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I took this for a spin, too, and even with a CPU slowdown of 6x I can't see any performance issues with this code.
Thank you for the contribution, this looks ace! I'll create a changelog entry for this and merge after
This is now in v4.8.0! 🚀 |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) | devDependencies | minor | [`4.7.0` -> `4.8.0`](https://renovatebot.com/diffs/npm/webpack-bundle-analyzer/4.7.0/4.8.0) | --- ### Release Notes <details> <summary>webpack-contrib/webpack-bundle-analyzer</summary> ### [`v4.8.0`](https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/HEAD/CHANGELOG.md#​480) [Compare Source](webpack-contrib/webpack-bundle-analyzer@v4.7.0...v4.8.0) - **Improvement** - Support reading large (>500MB) stats.json files ([#​423](webpack-contrib/webpack-bundle-analyzer#423) by [@​henry-alakazhang](https://github.com/henry-alakazhang)) - Improve search UX by graying out non-matches ([#​554](webpack-contrib/webpack-bundle-analyzer#554) by [@​starpit](https://github.com/starpit)) - **Internal** - Add Node.js v16.x to CI and update GitHub actions ([#​539](webpack-contrib/webpack-bundle-analyzer#539) by [@​amareshsm](https://github.com/amareshsm)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [x] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMzMuMCIsInVwZGF0ZWRJblZlciI6IjM0LjEzMy4wIn0=--> Co-authored-by: cabr2-bot <cabr2.help@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1783 Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
This PR reduces the saturation (from 60 to 10) for non-matches.
Note: there seems to be a bug in foamtree? It does not redraw some of the nodes until you hover over them. This seems to be a preexisting issue.
Fixes #553
Click to see the outdated details about the
.redraw()
behavior we've discussed in this PRFoamTree bug?
This gif shows how randomly some of the nodes are not redrawn (by foamtree) until you hover over them. I think this bug is masked by the current highlighting behavior, which does not change the color of non-matching nodes.