Skip to content

Conversation

@JonasBa
Copy link
Member

@JonasBa JonasBa commented Dec 31, 2025

Summary

Consolidates segmentedControl.chonk.tsx into segmentedControl.tsx and removes chonk naming prefixes.

Changes

  • Moved all content from segmentedControl.chonk.tsx to segmentedControl.tsx
  • Renamed styled components:
    • ChonkStyledGroupWrapGroupWrap
    • ChonkStyledSegmentWrapSegmentWrap
    • ChonkStyledLabelWrapLabelWrap
    • ChonkStyledVisibleLabelVisibleLabel
  • Removed export keyword from Priority type (internal-only)
  • Updated import to use button/styles instead of button/styles.chonk
  • Deleted segmentedControl.chonk.tsx

Test plan

  • ✅ Linting passes
  • ✅ Knip passes (no unused exports)
  • ✅ No remaining chonk references (except external dependencies and intentional DO_NOT_USE naming)

@JonasBa JonasBa requested a review from a team as a code owner December 31, 2025 18:16
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 31, 2025
import type {CollectionChildren} from '@react-types/shared/src/collections';
import {LayoutGroup} from 'framer-motion';

import {DO_NOT_USE_getChonkButtonStyles} from 'sentry/components/core/button/styles';

This comment was marked as outdated.

@JonasBa
Copy link
Member Author

JonasBa commented Dec 31, 2025

@cursoragent rename DO_NOT_USE_getChonkButtonStyles to DO_NOT_USE_getButtonStyles and fix the module export error

@cursor
Copy link
Contributor

cursor bot commented Dec 31, 2025

View PR

Perfect! I've successfully completed the requested changes. Here's what I did:

Changes Made

  1. Renamed the function in /workspace/static/app/components/core/button/styles.chonk.tsx:

    • DO_NOT_USE_getChonkButtonStylesDO_NOT_USE_getButtonStyles
  2. Fixed the module export error by adding a re-export in /workspace/static/app/components/core/button/styles.tsx:

    • Added export {DO_NOT_USE_getButtonStyles} from './styles.chonk';
    • This allows the function to be imported from 'sentry/components/core/button/styles'
  3. Updated all imports:

    • segmentedControl.tsx: Changed import and usage to use DO_NOT_USE_getButtonStyles
    • button.tsx: Updated the import alias to use the new name
    • linkButton.tsx: Updated the import alias to use the new name

Verification

✅ No TypeScript errors related to the module export
✅ No remaining references to DO_NOT_USE_getChonkButtonStyles
✅ All linter checks pass
✅ Function is now properly exported from styles.tsx and can be imported correctly

The module export error is resolved and the function has been renamed as requested, removing the "chonk" naming convention.


Open in Cursor Open in Web

Learn more about Cursor Agents

@JonasBa JonasBa force-pushed the jb/chonk/segmented-control-cleanup branch from 3bbb1f5 to 79cf5c0 Compare January 6, 2026 20:58
import type {CollectionChildren} from '@react-types/shared/src/collections';
import {LayoutGroup} from 'framer-motion';

import {DO_NOT_USE_getChonkButtonStyles} from 'sentry/components/core/button/styles';

This comment was marked as outdated.

@JonasBa JonasBa merged commit 3843b82 into master Jan 7, 2026
52 checks passed
@JonasBa JonasBa deleted the jb/chonk/segmented-control-cleanup branch January 7, 2026 17:25
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants