Skip to content
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

[MOB-9676] docs and doc generator #610

Merged
merged 28 commits into from
Jan 6, 2025

Conversation

lposen
Copy link
Contributor

@lposen lposen commented Nov 21, 2024

🔹 JIRA Ticket(s) if any

✏️ Description

Added documentation and a doc generator (though we're not currently serving the docs anywhere)

…ackage.json for documentation generation; make properties in IterableInAppMessage optional for better flexibility.
…; update ESLint configuration to include TSDoc syntax rule
…and to package.json; enhance Iterable class documentation and export additional types for improved type safety.
…ing; update README and configuration files accordingly.
…config.mjs with updated settings; enhance README and add comments to IterableAuthResponseResult enum
…p descriptions and examples for IterableInbox, IterableInboxEmptyState, IterableInboxMessageCell, IterableInboxMessageDisplay, and IterableInboxMessageList to improve clarity and usability.
…n hooks: add detailed comments, examples, and interface definition for better clarity and usability.
…ions and comments for IterableInboxImpressionRowInfo, IterableInboxRowViewModel, and IterableInboxCustomizations interfaces to improve clarity and usability.
…classes: add detailed descriptions, constructor comments, and improve clarity for properties. Update IterableInboxImpressionRowInfo interface documentation.
…bleLogger, and IterableUtil classes: add detailed descriptions, constructor comments, and examples to improve clarity and usability.
…e class: add detailed descriptions, constructor comments, and examples to improve clarity and usability. Documentation based on iterable public documentation.
…ep linking examples, and update parameter descriptions for better understanding.
… descriptions, clarify usage, and improve overall clarity and usability.
…or IterableInAppTrigger, IterableInAppContentType, IterableInAppTriggerType, and IterableInAppContent; update package.json for simplified docs command.
…prove usability, and remove TODOs for better understanding.
Copy link

github-actions bot commented Nov 21, 2024

Lines Statements Branches Functions
Coverage: 38%
38.11% (178/467) 11.42% (20/175) 32.46% (50/154)

@lposen lposen requested a review from evantk91 December 13, 2024 19:49
Base automatically changed from 2.0.0-alpha/MOB-10141-make-lint-rules-stricter to 2.0.0-alpha/master December 13, 2024 21:01
Copy link
Contributor

@evantk91 evantk91 left a comment

Choose a reason for hiding this comment

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

Generally looks good. Lots of nit picks and small changes.

saveToInbox: boolean;
inboxMetadata: {
createdAt?: number;
expiresAt?: number;
Copy link
Contributor

Choose a reason for hiding this comment

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

In the android SDK, createdAt, expiresAt, customPayload, and priorityLevel are non null. We need to think about if we want to make these optional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

GREAT point. Let me think about it. I'll likely change.

type IterableInboxCustomizations,
type IterableInboxEmptyStateProps,
type IterableInboxImpressionRowInfo,
type IterableInboxMessageCellProps,
type IterableInboxProps,
Copy link
Contributor

Choose a reason for hiding this comment

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

Strange why were all these imports added here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These were needed for the docs generator. It will only document public components.

typedoc.json Outdated
"excludeReferences": false,
"includeFolders": false
},
}
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is configuration for the documentation generator

src/core/classes/IterableConfig.ts Show resolved Hide resolved
@@ -115,7 +115,7 @@ export class IterableInAppManager {
* If set to false, the SDK will immediately retrieve and process in-app messages from the message queue.
* The default value of isAutoDisplayPaused is false (in the native code).
*
* @param {boolean} paused whether the automatic displaying should be paused
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason all the types were removed from description?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They're meant to be left out in typescript -- the doc generator adds them automatically

src/inApp/classes/IterableInboxMetadata.ts Show resolved Hide resolved
example/src/hooks/useIterableApp.tsx Show resolved Hide resolved
example/src/hooks/useIterableApp.tsx Show resolved Hide resolved
src/core/classes/IterableAction.ts Show resolved Hide resolved
Copy link
Contributor

@evantk91 evantk91 left a comment

Choose a reason for hiding this comment

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

Added pic for reference for IterableAction

src/core/classes/IterableAction.ts Show resolved Hide resolved
Copy link
Contributor

@evantk91 evantk91 left a comment

Choose a reason for hiding this comment

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

Looking good. Went through the PR comments in a call :)

@lposen lposen merged commit 4a3e470 into 2.0.0-alpha/master Jan 6, 2025
3 of 4 checks passed
@lposen lposen deleted the 2.0.0-alpha/MOB-9676-new-doc-generator branch January 6, 2025 19:51
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.

2 participants