[utils] Move getFilter, serializeValue, and stringifyAsLabel to @base-ui/utils#4449
[utils] Move getFilter, serializeValue, and stringifyAsLabel to @base-ui/utils#4449flaviendelangle wants to merge 3 commits intomui:masterfrom
getFilter, serializeValue, and stringifyAsLabel to @base-ui/utils#4449Conversation
…/utils Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
commit: |
Bundle size report
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Claude Code reviewSummaryThis PR extracts three utilities from Moved utilities:
Review Verdict: Looks good ✓The PR is a clean mechanical extraction with no logic changes. All imports are correctly updated and no stale references remain. What's done well
Minor observations (non-blocking)
|
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
What do you think of depending on @base-ui/react in other packages instead of placing some of these in @base-ui/utils? Reason is, the utils package is meant to be low-level stuff that could be used in any repository (core, X), whereas @base-ui/react is Base UI proper. The utils package is only in the @base-ui org because we needed to put it somewhere.
There was a problem hiding this comment.
I know that we don't want to expose stuff from @base-ui/react as stable everytime we want to use it in other package within the company. The package is stable and we care a lot about its DX so anything made public there should be made public because we want people to use it, not because of internal needs.
With that being said, we have two alternatives to this:
- expose stuff from
@base-ui/reactasunstable_ - create a new
@base-ui/internalspackage
I just don't want us to loose time figuring out how to share some code everytime we need a new util.
Because this will happen more and more as we create new packages.
I need to access those utils on the Tree component in the new repo.
Summary
serializeValue,stringifyAsLabel, and theFilter/getFilterutilities from@base-ui/reactinternal utils to@base-ui/utilsso they can be shared across packages.@base-ui/reactto use@base-ui/utils/filter,@base-ui/utils/serializeValue, and@base-ui/utils/stringifyAsLabeldirectly.packages/react/src/utils/serializeValue.tsfile.Test plan
🤖 Generated with Claude Code