-
Notifications
You must be signed in to change notification settings - Fork 40
[SDK-143] improve-docs #766
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
lposen
wants to merge
7
commits into
master
Choose a base branch
from
feature/SDK-143-improve-docs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0216fab
chore: update TypeDoc configuration and dependencies; add new documen…
lposen 2170979
chore: update TypeDoc configuration to reference documentation files …
lposen bef8d54
docs: enhance type definitions and improve documentation in Iterable …
lposen 8d973f0
docs: add GitHub Actions workflow for validating documentation
lposen 885deaa
docs: update documentation structure and remove outdated guides
lposen 522392c
docs: update TypeDoc configuration and enhance documentation for Hook…
lposen 464a845
docs: update TSDoc configuration to include mermaid plugin and simpli…
lposen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: Validate Documentation | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
| branches: | ||
| - master | ||
| merge_group: | ||
| types: | ||
| - checks_requested | ||
|
|
||
| jobs: | ||
| validate-docs: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 # Fetch full history for proper git info | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/setup | ||
|
|
||
| - name: Validate documentation | ||
| run: yarn docs --validation --treatWarningsAsErrors --json /dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| // Expand all navigation folders on page load | ||
| (function () { | ||
| 'use strict'; | ||
|
|
||
| function expandAllNavigation() { | ||
| // Find all details elements in various navigation contexts | ||
| const selectors = [ | ||
| '.tsd-navigation details', | ||
| '#tsd-nav-container details', | ||
| '.site-menu details', | ||
| '.tsd-accordion', | ||
| 'nav details', | ||
| ]; | ||
|
|
||
| let foundAny = false; | ||
| selectors.forEach((selector) => { | ||
| const elements = document.querySelectorAll(selector); | ||
| if (elements.length > 0) { | ||
| foundAny = true; | ||
| elements.forEach((el) => { | ||
| if (el.tagName === 'DETAILS') { | ||
| el.open = true; | ||
| } | ||
| }); | ||
| } | ||
| }); | ||
|
|
||
| return foundAny; | ||
| } | ||
|
|
||
| // Strategy 1: Try immediately | ||
| expandAllNavigation(); | ||
|
|
||
| // Strategy 2: Hook into TypeDoc's app if available | ||
| let checkCount = 0; | ||
| const maxChecks = 50; // Check for up to 5 seconds | ||
|
|
||
| function checkAndExpand() { | ||
| checkCount++; | ||
|
|
||
| if (expandAllNavigation()) { | ||
| // Keep expanding even if found, in case more navigation loads | ||
| if (checkCount < maxChecks) { | ||
| setTimeout(checkAndExpand, 100); | ||
| } | ||
| } else if (checkCount < maxChecks) { | ||
| setTimeout(checkAndExpand, 100); | ||
| } | ||
| } | ||
|
|
||
| // Strategy 3: MutationObserver for dynamic content | ||
| // eslint-disable-next-line no-undef | ||
| const observer = new MutationObserver(() => { | ||
| expandAllNavigation(); | ||
| }); | ||
|
|
||
| // Strategy 4: Multiple event listeners | ||
| window.addEventListener('load', () => { | ||
| expandAllNavigation(); | ||
| checkAndExpand(); | ||
|
|
||
| // Start observing after page load | ||
| const navContainer = document.querySelector( | ||
| '#tsd-nav-container, .site-menu' | ||
| ); | ||
| if (navContainer) { | ||
| observer.observe(navContainer, { | ||
| childList: true, | ||
| subtree: true, | ||
| }); | ||
| } | ||
| }); | ||
|
|
||
| // Strategy 5: Check for TypeDoc's app initialization | ||
| if (window.app) { | ||
| expandAllNavigation(); | ||
| } else { | ||
| Object.defineProperty(window, 'app', { | ||
| configurable: true, | ||
| set: function (value) { | ||
| delete window.app; | ||
| window.app = value; | ||
| setTimeout(expandAllNavigation, 100); | ||
| setTimeout(expandAllNavigation, 500); | ||
| }, | ||
| get: function () { | ||
| return window._app; | ||
| }, | ||
| }); | ||
| } | ||
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,10 @@ | ||
| import { useIsFocused } from '@react-navigation/native'; | ||
| import { useEffect, useState } from 'react'; | ||
| import { | ||
| useEffect, | ||
| useState, | ||
| type PropsWithChildren, | ||
| type ReactElement, | ||
| } from 'react'; | ||
| import { | ||
| Animated, | ||
| NativeEventEmitter, | ||
|
|
@@ -161,6 +166,9 @@ export interface IterableInboxProps | |
| * It handles fetching messages, displaying them in a list, and showing individual message details. | ||
| * It also manages the state of the inbox, including loading state, selected message, and visible message impressions. | ||
| * | ||
| * @category React Components | ||
| * @group React Components | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tsdoc-undefined-tag: The TSDoc tag "@group" is not defined in this configuration [eslint:tsdoc/syntax] |
||
| * | ||
| * @example | ||
| * ```tsx | ||
| * const [visible, setVisible] = useState<boolean>(false); | ||
|
|
@@ -186,15 +194,18 @@ export interface IterableInboxProps | |
| * ) | ||
| * ``` | ||
| */ | ||
| export const IterableInbox = ({ | ||
| returnToInboxTrigger = true, | ||
| messageListItemLayout = () => null, | ||
| customizations = {} as IterableInboxCustomizations, | ||
| tabBarHeight = 80, | ||
| tabBarPadding = 20, | ||
| safeAreaMode = true, | ||
| showNavTitle = true, | ||
| }: IterableInboxProps) => { | ||
| export const IterableInbox = ( | ||
| params: PropsWithChildren<IterableInboxProps> | ||
| ): ReactElement => { | ||
| const { | ||
| returnToInboxTrigger = true, | ||
| messageListItemLayout = () => null, | ||
| customizations = {} as IterableInboxCustomizations, | ||
| tabBarHeight = 80, | ||
| tabBarPadding = 20, | ||
| safeAreaMode = true, | ||
| showNavTitle = true, | ||
| } = params; | ||
| const defaultInboxTitle = 'Inbox'; | ||
| const inboxDataModel = new IterableInboxDataModel(); | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,15 @@ | ||
| { | ||
| "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json" | ||
| "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", | ||
| "extends": ["typedoc/tsdoc.json"], | ||
| "noStandardTags": false, | ||
| "tagDefinitions": [ | ||
| { | ||
| "tagName": "@os", | ||
| "syntaxKind": "block" | ||
| }, | ||
| { | ||
| "tagName": "@mermaid", | ||
| "syntaxKind": "block" | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tsdoc-undefined-tag: The TSDoc tag "@category" is not defined in this configuration [eslint:tsdoc/syntax]