Skip to content

[SDK-393] cleanup#834

Open
lposen wants to merge 7 commits intoemb-ootb/masterfrom
loren/embedded/SDK-393-cleanup
Open

[SDK-393] cleanup#834
lposen wants to merge 7 commits intoemb-ootb/masterfrom
loren/embedded/SDK-393-cleanup

Conversation

@lposen
Copy link
Copy Markdown
Contributor

@lposen lposen commented Apr 6, 2026

🔹 JIRA Ticket(s) if any

✏️ Description

This is just a cleanup task. Comments are cleaned up and documentation is added.

@lposen lposen requested a review from Copilot April 6, 2026 22:13
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

Lines Statements Branches Functions
Coverage: 67%
67.5% (484/717) 53.57% (180/336) 64.4% (161/250)

@qltysh
Copy link
Copy Markdown

qltysh bot commented Apr 6, 2026

Qlty

Coverage Impact

This PR will not change total coverage.

Modified Files with Diff Coverage (1)

RatingFile% DiffUncovered Line #s
Coverage rating: A Coverage rating: A
...edded/components/IterableEmbeddedCard/IterableEmbeddedCard.tsx100.0%
Total100.0%
🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@qltysh
Copy link
Copy Markdown

qltysh bot commented Apr 6, 2026

1 new issue

Tool Category Rule Count
qlty Structure Function with high complexity (count = 13): IterableEmbeddedCard 1

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR is a small SDK cleanup focused on improving the embedded messaging developer experience by exporting missing types and making embedded APIs/components easier to discover via clearer JSDoc examples.

Changes:

  • Export IterableEmbeddedViewProps from the package entrypoint.
  • Add/expand JSDoc for embedded components and helpers (including fenced code blocks for examples).
  • Minor formatting cleanup in embedded component code.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/index.tsx Re-exports IterableEmbeddedViewProps from the embedded module.
src/embedded/hooks/useEmbeddedView/useEmbeddedView.ts Wraps the existing usage example in a fenced tsx code block.
src/embedded/hooks/useEmbeddedView/getStyles.ts Wraps the existing usage example in a fenced ts code block.
src/embedded/hooks/useEmbeddedView/getMedia.ts Wraps the existing usage example in a fenced ts code block.
src/embedded/components/IterableEmbeddedView.tsx Exports IterableEmbeddedViewProps and adds a detailed usage example in docs.
src/embedded/components/IterableEmbeddedNotification/IterableEmbeddedNotification.tsx Adds JSDoc with a usage example.
src/embedded/components/IterableEmbeddedCard/IterableEmbeddedCard.tsx Replaces TODO doc with proper JSDoc and applies small formatting cleanup.
src/embedded/components/IterableEmbeddedBanner/IterableEmbeddedBanner.tsx Replaces TODO doc with proper JSDoc and adds a usage example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lposen lposen marked this pull request as ready for review April 6, 2026 22:32
Copy link
Copy Markdown
Member

@joaodordio joaodordio left a comment

Choose a reason for hiding this comment

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

Left too minor comments for
Improving clarity. But otherwise LGTM

* metadata: {
* messageId: 'test-message-123',
* placementId: 101,
* campaignId: 123456,
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.

The type IterableEmbeddedMessageMetadata has campaignId?: number | null. The example implies it’s required. Minor, but could confuse developers.

* placementId: 101,
* campaignId: 123456,
* },
* elements: {
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.

The type IterableEmbeddedMessage has elements?: IterableEmbeddedMessageElements | null.

Same issue, a message with no elements is valid (e.g. a metadata-only message), but the example doesn’t reflect that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's not exactly required for the view, but it would result in a very strange looking component as everything would be empty.

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