Skip to content

Conversation

dreamwasp
Copy link
Contributor

@dreamwasp dreamwasp commented Sep 11, 2025

Overview

Added ability to add data- + aria- attrs to combobox and swaps groupHeading color to text-secondary

I also broke some files down into smaller nested files + some act test warnings

PR Checklist

  • Related to designs:
  • Related to JIRA ticket: [GM-1296 + GM-1299]
  • I have run this code to verify it works
  • This PR includes unit tests for the code change
  • This PR includes testing instructions tests for the code change
  • The alpha package of this PR is passing end-to-end tests in all relevant Codecademy repositories

Testing Instructions

  1. Go to SelectDropdown => Custom input props
  2. Inspect and see the data-attrs
  3. Head to a story with group titles and see the new title colors
  4. Check it with VO
  5. Finish and do a celebratory dance

PR Links and Envs

Repository PR Link
Monolith Monolith PR
Mono Mono PR

Copy link

nx-cloud bot commented Sep 11, 2025

View your CI Pipeline Execution ↗ for commit 5adaf71

Command Status Duration Result
nx run-many --target=build --all ✅ Succeeded 18s View ↗
nx run-many --target=verify --parallel=3 --all ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-18 14:56:09 UTC

Copy link

nx-cloud bot commented Sep 11, 2025

View your CI Pipeline Execution ↗ for commit c7d4920

Command Status Duration Result
nx run-many --target=build --all ✅ Succeeded 17s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-11 14:49:15 UTC

Base automatically changed from cass-gm-1292 to main September 12, 2025 14:54
@dreamwasp dreamwasp marked this pull request as ready for review September 16, 2025 19:04
@dreamwasp dreamwasp requested a review from a team as a code owner September 16, 2025 19:04
- Add ExtendedOption and SelectDropdownGroup type exports
- Bump version to 66.4.2 to ensure changes are picked up
- Enables importing these types for select dropdown typing
Copy link
Contributor

@LinKCoding LinKCoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some (super) nits and some Qs around typing. <- after some clarification I'd be happy to approve :)

The combobox attrs look great!
Asked via slack about the hidden <input> element being duplicated, but if there's no workaround then 🤷

The color for Groups also look good :)

VO works as expected, i.e. compared to prod

Thanks for also fixing the act() warnings!

},
}),
option: (provided, state: OptionState) => {
return {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also a super super nit: could opt to remove this return and wrap the whole object in parens instead like the other styling?


### Abbreviated options

⚠️
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intentional?

disabled?: boolean;
/** Optional text displayed on the right side of the option */
rightLabel?: string;
/** Size specification for the option (typically 'small' or 'medium') */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: is there a reason for the wording here, "typically 'small' or 'medium'"?
looks like those should be the only two sizes, could this be more strictly typed? Is there some kind of edge case?

/** Optional text displayed on the right side of the option */
rightLabel?: string;
/** Size specification for the option (typically 'small' or 'medium') */
size?: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or maybe taken from SelectDropdownSizes in component-props.ts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or actually the BaseSelectProps from packages/gamut/src/Form/SelectDropdown/types/styles.ts?

*/
export interface SelectDropdownSizes {
/** Visual size of the component */
size?: 'small' | 'medium';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this pull from packages/gamut/src/Form/SelectDropdown/types/styles.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oop bad robot, i'll fix!!

@codecademydev
Copy link
Collaborator

📬Published Alpha Packages:

@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]

@codecademydev
Copy link
Collaborator

🚀 Styleguide deploy preview ready!

https://68cc1e9bbb12ef654af0f393--gamut-preview.netlify.app

Deploy Logs

Copy link
Contributor

@LinKCoding LinKCoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! the types look much DRYer!

* This is only relevant when the dropdown width is set to be larger or smaller than the input width.
*/
menuAlignment?: 'left' | 'right';
/** Visual size of the component */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover comment about size

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants