-
Notifications
You must be signed in to change notification settings - Fork 616
chore: Remove unused getBreakpointDeclarations function and any related code. #6100
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
Conversation
🦋 Changeset detectedLatest commit: d1c2cbd The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
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.
Pull Request Overview
This PR removes an obsolete responsive styling utility and associated code/tests following the migration to CSS modules.
- Deleted
breakpointHigher
,breakpointLower
, andmediaQueries
fromlayout.ts
- Stripped out the
getBreakpointDeclarations
implementation and imports, leaving only unused helper functions - Cleaned up
PageHeader
tests by removing deprecated media-query-based style assertions
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
packages/react/src/utils/layout.ts | Removed unused breakpoint helper functions and the mediaQueries export |
packages/react/src/utils/getBreakpointDeclarations.ts | Removed the core implementation; left only two helper functions |
packages/react/src/PageHeader/PageHeader.test.tsx | Dropped renderStyles tests and media-query imports |
.changeset/tangy-facts-guess.md | Added changeset entry for the patch release |
Comments suppressed due to low confidence (3)
packages/react/src/utils/getBreakpointDeclarations.ts:1
- [nitpick] After removing
getBreakpointDeclarations
, this file no longer matches its name. Consider renaming or relocating it to reflect its remaining helper functions, or deleting it if truly unused.
import type {ResponsiveValue} from '../hooks/useResponsiveValue'
packages/react/src/utils/getBreakpointDeclarations.ts:3
- The helper functions
areAllValuesTheSame
andhaveRegularAndWideSameValue
are no longer referenced. Remove these dead functions to clean up unused code.
export function areAllValuesTheSame(responsiveValue: ResponsiveValue<boolean | number | string>): boolean {
packages/react/src/PageHeader/PageHeader.test.tsx:3
- The
MatchMediaMock
import and correspondingmatchmedia
variable are no longer used in the tests—remove them to avoid dead code and potential linter warnings.
import MatchMediaMock from 'jest-matchmedia-mock'
size-limit report 📦
|
While removing feature flags, I was making note of some utils that aren't needed anymore. These weren't exported out of the package so there's no external use, and since we've refactored to CSS modules there's no internal use either.
Changelog
New
Changed
Removed
Remove unused getBreakpointDeclarations function and any related code.
Rollout strategy
Testing & Reviewing
Merge checklist