Skip to content

[MOB-11551] create iterableEmbeddedMessageElements class #643

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

Draft
wants to merge 3 commits into
base: evan/MOB-11550-iterable-embedded-message-button-class
Choose a base branch
from

Conversation

evantk91
Copy link
Contributor

@evantk91 evantk91 commented Jun 4, 2025

🔹 JIRA Ticket(s) if any

✏️ Description

This pull request creates the IterableEmbeddedMessageElements class and associated classes.

@evantk91 evantk91 changed the base branch from master to evan/MOB-11550-iterable-embedded-message-button-class June 4, 2025 14:48
Copy link

github-actions bot commented Jun 4, 2025

Lines Statements Branches Functions
Coverage: 43%
43.62% (226/518) 19.07% (37/194) 37.64% (64/170)

Copy link

codeclimate bot commented Jun 4, 2025

❌ 7 blocking issues (10 total)

Tool Category Rule Count
eslint Lint Error loading TSDoc config file:
Error encountered for /home/runner/work/react-native-sdk/tsdoc.json:
Unable to resolve "extends" reference to "typedoc/tsdoc.json": Cannot find module 'typedoc/tsdoc.json' from '/home/runner/work/react-native-sdk'
6
eslint Lint 'text' is already declared in the upper scope on line 74 column 11. 1
qlty Duplication Found 52 lines of similar code in 2 locations (mass = 91) 2
qlty Structure Function with many parameters (count = 7): constructor 1

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

@@ -0,0 +1,47 @@
export class IterableEmbeddedMessageDefaultAction {
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. Error loading TSDoc config file:
Error encountered for /home/runner/work/react-native-sdk/tsdoc.json:
Unable to resolve "extends" reference to "typedoc/tsdoc.json": Cannot find module 'typedoc/tsdoc.json' from '/home/runner/work/react-native-sdk'
[eslint:tsdoc/syntax]


2. Found 39 lines of similar code in 2 locations (mass = 76) [qlty:similar-code]

@@ -0,0 +1,71 @@
import { IterableEmbeddedMessageDefaultAction } from './IterableEmbeddedMessageDefaultAction';
Copy link

Choose a reason for hiding this comment

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

Error loading TSDoc config file:
Error encountered for /home/runner/work/react-native-sdk/tsdoc.json:
Unable to resolve "extends" reference to "typedoc/tsdoc.json": Cannot find module 'typedoc/tsdoc.json' from '/home/runner/work/react-native-sdk'
[eslint:tsdoc/syntax]

Comment on lines +14 to +21
constructor(
title?: string,
body?: string,
mediaUrl?: string,
mediaUrlCaption?: string,
defaultAction?: IterableEmbeddedMessageDefaultAction,
buttons?: IterableEmbeddedMessageElementsButton[],
text?: IterableEmbeddedMessageText[]
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 = 7): constructor [qlty:function-parameters]

IterableEmbeddedMessageElementsButton.fromDict(button)
);

const text = dict.text?.map((text) =>
Copy link

Choose a reason for hiding this comment

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

'text' is already declared in the upper scope on line 47 column 11. [eslint:@typescript-eslint/no-shadow]

@@ -0,0 +1,45 @@
export class IterableEmbeddedMessageText {
Copy link

Choose a reason for hiding this comment

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

Error loading TSDoc config file:
Error encountered for /home/runner/work/react-native-sdk/tsdoc.json:
Unable to resolve "extends" reference to "typedoc/tsdoc.json": Cannot find module 'typedoc/tsdoc.json' from '/home/runner/work/react-native-sdk'
[eslint:tsdoc/syntax]

@@ -1,2 +1,5 @@
export * from './IterableEmbeddedManager';
Copy link

Choose a reason for hiding this comment

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

Error loading TSDoc config file:
Error encountered for /home/runner/work/react-native-sdk/tsdoc.json:
Unable to resolve "extends" reference to "typedoc/tsdoc.json": Cannot find module 'typedoc/tsdoc.json' from '/home/runner/work/react-native-sdk'
[eslint:tsdoc/syntax]

@@ -0,0 +1,47 @@
export class IterableEmbeddedMessageDefaultAction {
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. Error loading TSDoc config file:
Error encountered for /home/runner/work/react-native-sdk/tsdoc.json:
Unable to resolve "extends" reference to "typedoc/tsdoc.json": Cannot find module 'typedoc/tsdoc.json' from '/home/runner/work/react-native-sdk'
[eslint:tsdoc/syntax]


2. Found 39 lines of similar code in 2 locations (mass = 76) [qlty:similar-code]

@@ -0,0 +1,71 @@
import { IterableEmbeddedMessageDefaultAction } from './IterableEmbeddedMessageDefaultAction';
Copy link

Choose a reason for hiding this comment

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

Error loading TSDoc config file:
Error encountered for /home/runner/work/react-native-sdk/tsdoc.json:
Unable to resolve "extends" reference to "typedoc/tsdoc.json": Cannot find module 'typedoc/tsdoc.json' from '/home/runner/work/react-native-sdk'
[eslint:tsdoc/syntax]

Comment on lines +14 to +21
constructor(
title?: string,
body?: string,
mediaUrl?: string,
mediaUrlCaption?: string,
defaultAction?: IterableEmbeddedMessageDefaultAction,
buttons?: IterableEmbeddedMessageElementsButton[],
text?: IterableEmbeddedMessageText[]
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 = 7): constructor [qlty:function-parameters]

IterableEmbeddedMessageElementsButton.fromDict(button)
);

const text = dict.text?.map((text) =>
Copy link

Choose a reason for hiding this comment

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

'text' is already declared in the upper scope on line 47 column 11. [eslint:@typescript-eslint/no-shadow]

@@ -0,0 +1,45 @@
export class IterableEmbeddedMessageText {
Copy link

Choose a reason for hiding this comment

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

Error loading TSDoc config file:
Error encountered for /home/runner/work/react-native-sdk/tsdoc.json:
Unable to resolve "extends" reference to "typedoc/tsdoc.json": Cannot find module 'typedoc/tsdoc.json' from '/home/runner/work/react-native-sdk'
[eslint:tsdoc/syntax]

@evantk91 evantk91 marked this pull request as draft June 4, 2025 23:18
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