Skip to content

fix(coding-conventions): Rename ToolBox to getToolBox in charts components - #121926

Open
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/rename-charts-toolbox-function
Open

fix(coding-conventions): Rename ToolBox to getToolBox in charts components#121926
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/rename-charts-toolbox-function

Conversation

@sentry

@sentry sentry Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

The ToolBox function, a utility for generating ECharts ToolboxComponentOption objects, was named with a capital letter. This violates React's naming convention for non-component functions, which reserves capitalized names for React components.

This capitalization triggered the no-capitalized-function-calls lint rule and React Compiler diagnostic, flagging it as a potential component being called incorrectly.

To resolve this, the ToolBox function has been renamed to getToolBox in its definition (static/app/components/charts/components/toolBox.tsx) and all its import and call sites across the codebase. The get prefix clarifies its role as a factory function and avoids naming collisions with local variables (e.g., const toolBox = useMemo(...) in useChartXRangeSelection.tsx).

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Fixes CODING-CONVENTIONS-1YB

@sentry
sentry Bot requested a review from a team as a code owner August 13, 2026 01:43
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 13, 2026
@ryan953 ryan953 added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant