-
Notifications
You must be signed in to change notification settings - Fork 28
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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' |
@@ -0,0 +1,45 @@ | |||
import { StyledVideo } from './Video'; |
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.
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> = () => { |
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.
.mdx would be needed for each hook. adding here just in case you missed this.
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' |
@@ -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(); |
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.
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)) { |
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.
this can be made as Set as well.
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' |
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' |
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' |
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' |
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' |
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' |
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' |
Details(context, Jira ticket, how was the bug fixed, what does the new feature do)
Choose one of these(put a 'x' in the bracket):
Implementation note, gotchas, related work and Future TODOs (optional)