Open
Conversation
Deploy previewhttps://deploy-preview-1305--mui-internal.netlify.app/ Bundle size
PerformanceTotal duration: 19.29 ms 🔺+3.15 ms(+19.5%) | Renders: 4 (+0) | Paint: 79.84 ms 🔺+10.86 ms(+15.7%)
Check out the code infra dashboard for more information about this PR. |
Replaces the old tools-public Toolpad page (which was hardcoded to the wrong issue and capped at the first 30 reactions) with a client-side viewer in the code-infra dashboard. Accepts any public GitHub issue, PR, or comment URL and groups reactions by emoji. Caps results at 300 by default; the truncation alert links to the same URL with `?all=1` to fetch every page.
Follows the pattern from #1220: keep the Toolpad page as a markdown link to the new tool in code-infra-dashboard instead of deleting it outright.
Add a submit button next to the URL input, drop comment-URL support (issue comments and PR review comments) to keep the parser and fetcher focused on the issue/PR case.
Under `dynamic = 'force-static'`, Next.js silently renders `useSearchParams()` with empty params during prerender but returns the real query on the client, causing SSR/client divergence for any view that surfaces search params in its JSX. React 19 often can't recover inside complex trees (e.g. MUI TextField), so the DOM gets stuck in the server-rendered state. Wrap `useSearchParams()` in a `useSyncExternalStore` gate so the hook returns an empty `URLSearchParams` during SSR + the hydration render, then switches to the real value after hydration commits. Consumers transition through a normal state change, which flows through their event handlers correctly.
b5dd79f to
ea5bc21
Compare
Contributor
|
What exactly is this tool used for ? |
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.
Summary
Replaces the old
tools-publicToolpad pagedesign_kits_issue_111with a client-side viewer incode-infra-dashboardat/reactions.The old tool was buggy in two independent ways:
mui-design-kits#10, despite the page name suggesting#111.The new tool accepts any public GitHub issue, PR, or comment URL (issue comments via
#issuecomment-…and PR review comments via#discussion_r…), paginates properly viaoctokit.paginate.iterator, and groups reactions by emoji in aDataGridPremium.To prevent a viral issue from blowing the unauthenticated 60 req/hr budget, results are capped at 3 pages × 100 reactions by default. When truncated, an alert links to the same URL with
?all=1to fetch every page.The old Toolpad page is deleted.