Skip to content

Conversation

@Who-is-PS
Copy link
Member

Issue #, if available:
AWSUI-61340

Description of changes:

Fixed an issue where CodeEditorProps.Language type values were incorrectly formatted in generated component definitions. The LiteralUnion<BuiltInLanguage, string> type was not properly recognized as a primitive string type, causing language values to appear as "\"javascript\"" instead of "javascript" in the documentation.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.77%. Comparing base (3df5b77) to head (afa61e9).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #101      +/-   ##
==========================================
+ Coverage   96.68%   96.77%   +0.09%     
==========================================
  Files          11       11              
  Lines         845      869      +24     
  Branches      284      297      +13     
==========================================
+ Hits          817      841      +24     
  Misses         28       28              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Who-is-PS
Copy link
Member Author

Expected test is failing. Will follow our SOP once it is released.

@Who-is-PS Who-is-PS marked this pull request as ready for review November 19, 2025 13:15
@Who-is-PS Who-is-PS requested a review from a team as a code owner November 19, 2025 13:15
@cansuaa cansuaa removed the request for review from a team November 20, 2025 11:49
expect(values).toContain('java');

// Should have 'string' representing the intersection type
expect(values).toContain('string');
Copy link
Member

Choose a reason for hiding this comment

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

I don't think that this is a valid representation of the type. For example, if we follow this through to the website, it would suggest that there would be an item "string" in the language selector dropdown, but that is not valid, as it's not a literal value, it's a type. We need to retain that differentiation between literal values and types in the documenter output.

The more that I think about this problem, the more that I think the problem is maybe not actually in the documenter but in the website: the documenter is currently generating output that accurately represents the underlying typings, the website just needs some extra logic to be able to handle some of the edge-cases better

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.

2 participants