Skip to content

chore: Migrate to the new documenter API#82

Closed
taheramr wants to merge 2 commits into
mainfrom
migrate-documenter
Closed

chore: Migrate to the new documenter API#82
taheramr wants to merge 2 commits into
mainfrom
migrate-documenter

Conversation

@taheramr

Copy link
Copy Markdown
Member

Description

Same as cloudscape-design/components#3475 and cloudscape-design/chat-components#72 but for this package

Related links, issue #, if available: n/a

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

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

@taheramr
taheramr requested a review from a team as a code owner May 22, 2025 11:12
@taheramr
taheramr requested review from just-boris and removed request for a team May 22, 2025 11:12

@taheramr taheramr left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

lol, this time I did not assign you :D

@codecov

codecov Bot commented May 22, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.28%. Comparing base (5ef2c97) to head (9c7f0c3).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #82   +/-   ##
=======================================
  Coverage   99.28%   99.28%           
=======================================
  Files          29       29           
  Lines         280      280           
  Branches       34       34           
=======================================
  Hits          278      278           
  Misses          1        1           
  Partials        1        1           

☔ 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.


// @ts-expect-error no types here
import apiDocs from "../../lib/components/internal/api-docs/components";
import componentDefinitions from "../../lib/components/internal/api-docs/components";

@taheramr taheramr May 22, 2025

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

decided to follow how we define the documenter tests everywhere by using the getAllComponents util

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks

@taheramr
taheramr force-pushed the migrate-documenter branch from 135f176 to 9c7f0c3 Compare May 22, 2025 11:20
Comment on lines +10 to +14
// overriding with a fake value so that when there are icon changes in components this test doesn't block it
const iconNameDefinition = definition.properties.find(({ name }: { name: string }) => name === "iconName");
if (iconNameDefinition && iconNameDefinition.inlineType?.type === "union") {
iconNameDefinition.inlineType.values = ["comes from @cloudscape-design/components"];
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not needed in this package

We can add it later, if we really start using icons in snapshots

Comment thread src/__tests__/utils.ts
Comment on lines +1 to +4
/* eslint-env node */
/* eslint-disable header/header */
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If you put comments in this order, they pass the linter without disabling

Suggested change
/* eslint-env node */
/* eslint-disable header/header */
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
/* eslint-env node */

@just-boris

Copy link
Copy Markdown
Member

Done already: #87

@just-boris just-boris closed this Oct 22, 2025
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