Skip to content

Comments

[SDK-366] parse-styles-for-components#817

Open
lposen wants to merge 8 commits intoemb-ootb/masterfrom
loren/embedded/SDK-366-new-parse-styles-for-components
Open

[SDK-366] parse-styles-for-components#817
lposen wants to merge 8 commits intoemb-ootb/masterfrom
loren/embedded/SDK-366-new-parse-styles-for-components

Conversation

@lposen
Copy link
Contributor

@lposen lposen commented Feb 24, 2026

🔹 JIRA Ticket(s) if any

✏️ Description

Parses styles according for each component type, with the ability to override them externally

Test

  • Run the example app
  • Click "get messages for placement ids" -- A slew of default styles should appear in the section below the hr
  • Switch between banner, card and notification -- The styles should change depending on the component
  • Click "set view config"
  • Update the json to override any of the styles. EG: {"backgroundColor":"blue"}
  • Look at the styles again -- They should have been overridden to apply your change
Screen.Recording.2026-02-23.at.5.02.20.PM.mov

@github-actions
Copy link

github-actions bot commented Feb 24, 2026

Lines Statements Branches Functions
Coverage: 63%
63.91% (434/679) 45.67% (132/289) 60.92% (145/238)

@qltysh
Copy link

qltysh bot commented Feb 24, 2026

Qlty

Coverage Impact

Unable to calculate total coverage change because base branch coverage was not found.

Modified Files with Diff Coverage (4)

RatingFile% DiffUncovered Line #s
New file Coverage rating: A
src/embedded/hooks/useEmbeddedView/useEmbeddedView.ts100.0%
New file Coverage rating: A
src/embedded/components/IterableEmbeddedView.tsx100.0%
New file Coverage rating: A
src/embedded/hooks/useEmbeddedView/embeddedViewDefaults.ts100.0%
New file Coverage rating: A
src/embedded/hooks/useEmbeddedView/getStyles.ts100.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

qltysh bot commented Feb 24, 2026

❌ 2 blocking issues (6 total)

Tool Category Rule Count
eslint Lint tsdoc-malformed-inline-tag: Expecting a TSDoc tag starting with "{@" 2
qlty Structure Function with high complexity (count = 9): Embedded 2
qlty Structure Function with many returns (count = 5): IterableEmbeddedView 1
qlty Structure Function with many parameters (count = 4): useEmbeddedView 1

</Text>
<Cmp {...props} />
</View>
) : 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 many returns (count = 5): IterableEmbeddedView [qlty:return-statements]


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

* @returns The styles.
*
* @example
* const styles = getStyles(IterableEmbeddedViewType.Notification, {
Copy link

Choose a reason for hiding this comment

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

tsdoc-malformed-inline-tag: Expecting a TSDoc tag starting with "{@" [eslint:tsdoc/syntax]

* borderCornerRadius: 10,
* primaryBtnBackgroundColor: '#000000',
* primaryBtnTextColor: '#000000',
* });
Copy link

Choose a reason for hiding this comment

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

tsdoc-escape-right-brace: The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag [eslint:tsdoc/syntax]

/** The props for the embedded view. */
{
config,
}: IterableEmbeddedComponentProps
Copy link

Choose a reason for hiding this comment

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

Function with many parameters (count = 4): useEmbeddedView [qlty:function-parameters]

@lposen lposen marked this pull request as ready for review February 24, 2026 01:07
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.

1 participant