GMT-1740: promote deep-import types to public API - #3412
Draft
dreamwasp wants to merge 13 commits into
Draft
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 0af0581 ☁️ Nx Cloud last updated this comment at |
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
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.
Collaborator
|
📬 Published Alpha Packages:
|
…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.
Contributor
|
🚀 Styleguide deploy preview ready! Preview URL: https://6a8f38a50ca4c03105429dff--gamut-preview.netlify.app |
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).Moved to a separate PR
Menu/elements:List/ListItem/ListLink/ListButton→MenuList/MenuListItem/MenuListLink/MenuListButton(collided with the already-publicListcomponent) — pulled out for independent review since it's a breaking rename on top of the promotion.Form/SelectDropdown:IconOptioncomponent →IconOptionComponent(collided with theIconOptiontype onexport *) — same reasoning, pulled out.Docs
Foundations/Utilities/Utilities.mdxin Storybook, alongside the other style-utility helpers (boxShadow,fontSmoothing,noSelect, screen-reader helpers), documentingInteractiveSelectors.Versioning
gamutandgamut-iconsminor — all changes here are additive exports fromgamut's already-published API; the renames only affect paths that were never previously public.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.npx nx release plan:check— should report all touched projects (gamut,gamut-icons) as covered by the version plan.PR Links and Envs