feat: allow toggling frameworks in Mockolate benchmark chart#34
Merged
Conversation
Click a row to mark it inactive — the bar widths recompute their max from the remaining active rows, so toggling Moq off makes the smaller frameworks' differences visible. Inactive state is shared across the Time and Memory blocks and persists across N=1/N=10 param tabs.
There was a problem hiding this comment.
Pull request overview
Adds interactivity to the Mockolate benchmark chart so readers can toggle individual frameworks on/off, with bar scaling recomputed from the remaining active rows. This improves comparability when one framework dominates the scale, and keeps the inactive selection consistent across Time/Memory blocks and across N parameter tabs.
Changes:
- Make benchmark rows clickable (as
<button>when data exists) and track inactive libraries in shared component state. - Recompute the bar-scale maximum from active (non-missing, non-inactive) rows to improve visual resolution.
- Add CSS module styles to reset button defaults, provide hover/focus-visible affordances, and visually mark inactive rows.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Docs/pages/src/components/MockolateBenchmarkResult/styles.module.css | Adds button reset/interaction styling and inactive-row presentation (opacity + strike-through). |
| Docs/pages/src/components/MockolateBenchmarkResult/index.tsx | Introduces inactive-library state + toggle handler, converts rows to buttons, and rescales bars based on active rows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Click a row to mark it inactive — the bar widths recompute their max from the remaining active rows, so toggling Moq off makes the smaller frameworks' differences visible. Inactive state is shared across the Time and Memory blocks and persists across N=1/N=10 param tabs.