Skip to content

DOP-5744: TS - Chapters #1467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jun 30, 2025
Merged

DOP-5744: TS - Chapters #1467

merged 15 commits into from
Jun 30, 2025

Conversation

mmeigs
Copy link
Collaborator

@mmeigs mmeigs commented Jun 24, 2025

Stories/Links:

DOP-5744

Current Behavior:

Put a link to current staging or production behavior, if applicable

Staging Links:

Put a link to your staging environment(s), if applicable

Notes:

Typescriptify Chapters components.

Also, creates the ASTNode type.

README updates

    • This PR introduces changes that should be reflected in the README, and I have made those updates.
    • This PR does not introduce changes that should be reflected in the README

Copy link

netlify bot commented Jun 24, 2025

Deploy Preview for docs-frontend-stg ready!

Name Link
🔨 Latest commit 1327074
🔍 Latest deploy log https://app.netlify.com/projects/docs-frontend-stg/deploys/6862e2442307800008c1d89c
😎 Deploy Preview https://deploy-preview-1467--docs-frontend-stg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mmeigs mmeigs marked this pull request as ready for review June 25, 2025 13:26
@mmeigs mmeigs requested review from ASteinheiser and rayangler June 25, 2025 13:26
Copy link
Collaborator

@rayangler rayangler left a comment

Choose a reason for hiding this comment

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

Is there an existing staging link for this? If not, I can try to test locally!

Copy link
Collaborator

@ASteinheiser ASteinheiser left a comment

Choose a reason for hiding this comment

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

Looks good! Left some small questions/comments

Comment on lines +137 to +145
const children = isString(data['description'])
? ([{ type: 'text', value: data['description'] }] as TextNode[])
: data['description'];

return {
type: 'directive',
name: 'card',
children: data['description'],
children,
argument: [],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just curious, but this was typescript showing us a potential issue here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep! We've typed data.description as string | ASTNode[] but children has to be ASTNode[] - so we just have to make sure that if a string is the value it's turned into a TextNode.

@docs-builder-bot
Copy link

docs-builder-bot commented Jun 30, 2025

🔄 Deploy Preview for docs-frontend-stg processing

Item Details
🔨 Latest Commit d5e80a6b8ddc9fd15bf3e4da6341e0e7ca037b4f
😎 Deploy Preview https://deploy-preview-1467--docs-frontend-stg.netlify.app
🔍 Build Logs View Logs

@mmeigs mmeigs requested a review from rayangler June 30, 2025 14:33
@mmeigs mmeigs merged commit 8afdeb4 into main Jun 30, 2025
6 checks passed
@mmeigs mmeigs deleted the DOP-5744-chapters branch June 30, 2025 19:24
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.

4 participants