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

feat: storybook hooks docs #1010

Closed
wants to merge 66 commits into from
Closed

feat: storybook hooks docs #1010

wants to merge 66 commits into from

Conversation

zakybilfagih
Copy link

@zakybilfagih zakybilfagih commented Oct 12, 2022

Details(context, Jira ticket, how was the bug fixed, what does the new feature do)

  • added storybook docs for react sdk hooks
  • hooks list
    • useVideo
    • useVideoList
    • useScreenShare
    • useCustomEvent
    • useDevices
    • useParticipants
    • usePreviewJoin
    • useAVToggle
    • useRemoteAVToggle
    • useAutoplayError
    • useAudioLevelStyles

Choose one of these(put a 'x' in the bracket):

  • The change doesn't require a change to the documentation.
  • The documentation is updated accordingly.

Implementation note, gotchas, related work and Future TODOs (optional)

@vercel
Copy link

vercel bot commented Oct 12, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
dashboard-app ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Oct 26, 2022 at 8:56AM (UTC)
storybook-app ✅ Ready (Inspect) Visit Preview Oct 26, 2022 at 8:56AM (UTC)

@github-actions
Copy link
Contributor

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: feat/storybook-hooks

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@zakybilfagih zakybilfagih changed the title Feat/storybook hooks feat: storybook hooks docs Oct 12, 2022
@@ -0,0 +1,45 @@
import { StyledVideo } from './Video';
Copy link
Collaborator

Choose a reason for hiding this comment

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

this file should be wherever the component is ideally. does it not come under the same section? if not let's create a separate folder for all hooks.

import React from 'react';
import { ComponentStory } from '@storybook/react';

const VideoHook: ComponentStory<typeof StyledVideo> = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

.mdx would be needed for each hook. adding here just in case you missed this.

@github-actions
Copy link
Contributor

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: feat/storybook-hooks

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@@ -128,7 +132,8 @@ export class StoryBookSDK implements Partial<HMSActions> {
}

async detachVideo(_trackID: string, videoElement: HTMLVideoElement): Promise<void> {
videoElement.srcObject = null;
videoElement.removeAttribute('src');
videoElement.load();
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is the issue with previous code? that is what we do internally in sdk as well.

this.ignoredMessageTypes = msgTypes;
} else {
for (const msgType of msgTypes) {
if (!this.ignoredMessageTypes.includes(msgType)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this can be made as Set as well.

@github-actions
Copy link
Contributor

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: feat/storybook-hooks

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@github-actions
Copy link
Contributor

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: feat/storybook-hooks

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@github-actions
Copy link
Contributor

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: feat/storybook-hooks

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@github-actions
Copy link
Contributor

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: feat/storybook-hooks

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@github-actions
Copy link
Contributor

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: feat/storybook-hooks

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@github-actions
Copy link
Contributor

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: feat/storybook-hooks

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@github-actions
Copy link
Contributor

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: feat/storybook-hooks

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants