Skip to content

Conversation

@lposen
Copy link
Contributor

@lposen lposen commented Oct 13, 2025

🔹 JIRA Ticket(s) if any

✏️ Description

Added embedded view component

@github-actions
Copy link

Lines Statements Branches Functions
Coverage: 47%
47.27% (295/624) 24.05% (57/237) 44.73% (102/228)

@qltysh
Copy link

qltysh bot commented Oct 13, 2025

Diff Coverage: The code coverage on the diff in this pull request is 17.4%.

Total Coverage: This PR will decrease coverage by 1.16%.

File Coverage Changes
Path File Coverage Δ Indirect
src/embedded/components/IterableEmbeddedBanner.tsx 20.0
src/embedded/components/IterableEmbeddedCard.tsx 20.0
src/embedded/components/IterableEmbeddedNotification.tsx 20.0
src/embedded/components/IterableEmbeddedView.tsx 12.5
src/embedded/components/index.ts 100.0
src/embedded/enums/IterableEmbeddedViewType.ts 100.0
src/embedded/enums/index.ts 100.0
src/embedded/types/IterableEmbeddedComponentProps.ts 100.0
src/embedded/types/IterableEmbeddedViewConfig.ts 100.0
🛟 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.

This is from Qlty Cloud, the successor to Code Climate Quality. Learn more.

@qltysh
Copy link

qltysh bot commented Oct 13, 2025

5 new issues

Tool Category Rule Count
qlty Duplication Found 20 lines of similar code in 3 locations (mass = 75) 3
qlty Structure Function with high complexity (count = 5): IterableEmbeddedView 1
qlty Structure Function with many returns (count = 5): IterableEmbeddedView 1

This is from Qlty Cloud, the successor to Code Climate Quality. Learn more.

Comment on lines +18 to +35
export const IterableEmbeddedView = ({
viewType,
...props
}: IterableEmbeddedViewProps) => {
const Cmp = useMemo(() => {
switch (viewType) {
case IterableEmbeddedViewType.Card:
return IterableEmbeddedCard;
case IterableEmbeddedViewType.Notification:
return IterableEmbeddedNotification;
case IterableEmbeddedViewType.Banner:
return IterableEmbeddedBanner;
default:
return null;
}
}, [viewType]);

return Cmp ? <Cmp {...props} /> : null;
Copy link

Choose a reason for hiding this comment

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

Found 2 issues:

1. Function with high complexity (count = 5): IterableEmbeddedView [qlty:function-complexity]


2. Function with many returns (count = 5): IterableEmbeddedView [qlty:return-statements]

@lposen lposen added the embedded Issues/PRs related to Embedded Messages label Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

embedded Issues/PRs related to Embedded Messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants