GMT-1740: promote deep-import types to public API - #3412
Open
dreamwasp wants to merge 19 commits into
Open
Conversation
…o public API Part of the GMT-1740 exports-map migration. Promotes types from packages/gamut/src/PopoverContainer/types.ts and Form/SelectDropdown/types/* to the package root so consumers can stop reaching into internal dist/ paths.
|
View your CI Pipeline Execution ↗ for commit 3f89af8 ☁️ Nx Cloud last updated this comment at |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3412 +/- ##
==========================================
- Coverage 91.33% 90.97% -0.36%
==========================================
Files 407 277 -130
Lines 6841 5909 -932
Branches 2230 2004 -226
==========================================
- Hits 6248 5376 -872
+ Misses 584 524 -60
Partials 9 9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Dropped during the export-* switch, breaking GridForm/types.ts's import.
…ublic API Renamed to match real usage (Anchor, Tag, Tip, Pagination — not just Button/ButtonBase), then exported from the root barrel. Documented alongside the other style utility helpers in Storybook.
# Conflicts: # packages/gamut/src/Anchor/index.tsx # packages/gamut/src/ButtonBase/ButtonBase.tsx # packages/gamut/src/Menu/MenuItem.tsx # packages/gamut/src/PopoverContainer/PopoverContainer.tsx # packages/gamut/src/PopoverContainer/types.ts
gamut and gamut-icons minor bumps for the new public exports.
…ate PR Menu/elements' List->MenuList rename and Form/SelectDropdown's IconOption->IconOptionComponent rename are breaking changes layered on top of new exports; splitting them out for independent review. Only InteractiveSelectors (not yet public, so no compat surface) stays here. - Menu/elements: MenuList*/reverted to List*, and Menu/index.tsx no longer exports './elements' (would collide with the public List component). - Form/SelectDropdown: IconOptionComponent reverted to IconOption and no longer exported from the barrel; the ./types export (Rule 2, non-breaking) is untouched.
7e79633 correctly un-exported the ButtonBase component but also deleted the ButtonBaseElements type export, which predates this branch and is a real public dependency (7 mono call sites use it for ref typing). Restore just the type export; ButtonBase itself stays unexported.
Babel compiles each file independently and can't see across files that these re-exported names are type-only, so it emitted a runtime import for bindings that don't exist in the compiled output — breaking consumer webpack builds with "export 'X' was not found in './Y'".
Collaborator
|
📬 Published Alpha Packages:
|
Contributor
|
🚀 Styleguide deploy preview ready! Preview URL: https://6a91b641616a592c52516a14--gamut-preview.netlify.app |
dreamwasp
marked this pull request as ready for review
August 28, 2026 16:26
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.
Overview
Promotes deep-import-only paths (
@codecademy/gamut/dist/...) to public exports, closing the gap between whatmono/platformwere actually reaching for and what the barrel exposes. Every export here traces to real, counted deep-import sites (74 acrossmono/platform), found by grepping consumer repos rather than guessing — full rationale ingmt-1740-dist-exports-rfc.md.New public exports (
@codecademy/gamut)InteractiveSelectors—ButtonBase/ButtonBase's shared interactive-state selector enum, renamed fromButtonSelectorsto match its real usage (Button,Anchor,Tag,Tip,Pagination), exported in place of theButtonBasecomponent itself (kept internal on purpose — see JSDoc inButtonBase.tsx).buttonProps— the variance prop-group backingButtonProps, fromButton/shared.Tip/shared/types(all 14 names) — shared prop/placement types for InfoTip/PreviewTip/ToolTip.Form/types— switched from a single hand-picked export toexport *, picking upFormValues/BaseInputPropsand restoringCheckboxPaddingProps(a regression from an earlier pass that brokeGridForm/types.ts).PopoverContainer/types(all 7 names) —PopoverContainerProps/TargetRef/etc., the single most depended-on internal type in the inventory (29 platform sites).createCodeBlockOverride,createInputOverride,createTagOverride,createVideoOverride,standardOverrides.Form/SelectDropdown— fullexport *from./types(SelectDropdownProps,MultiSelectDropdownProps, etc.). TheIconOptioncomponent itself stays internal-only for now (see "Moved to a separate PR" below).IconStyleProps(type) — from@codecademy/gamut-icons, the style-prop group behindGamutIconProps.Rename (not yet public, so no compatibility surface to protect)
ButtonBase:ButtonSelectors→InteractiveSelectors(renamed for clarity — it's shared byButton,Anchor,Tag,Tip, andPagination, not button-specific).Docs
Foundations/Utilities/Utilities.mdxin Storybook, alongside the other style-utility helpers (boxShadow,fontSmoothing,noSelect, screen-reader helpers), documentingInteractiveSelectors.PR Checklist
Testing Instructions
yarn nx build gamutandyarn nx build gamut-icons— both should compile clean with no TS errors./distpath):InteractiveSelectorscode sample.InteractiveSelectorsrename's call sites to confirm nothing regressed visually:Button,Anchor,Tag,Tip(InfoTip/PreviewTip), andPagination, in both light and dark mode.PR Links and Envs