-
Notifications
You must be signed in to change notification settings - Fork 182
Add a section for tutorial videos #35
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
Conversation
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.
❌ Changes requested. Reviewed everything up to ece2edf in 2 minutes and 9 seconds
More details
- Looked at
194lines of code in5files - Skipped
0files when reviewing. - Skipped posting
4drafted comments based on config settings.
1. docs/tutorial-videos.mdx:7
- Draft comment:
Add a newline at end of file for consistency. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
While having a newline at end of file is a common convention, this is exactly the kind of thing that should be handled by ESLint/Prettier automation rather than manual code review comments. Our standards specifically mention that ESLint and Prettier should be set up to enforce code style rules automatically.
The comment is technically correct about a common convention. Maybe enforcing this manually is important if the automation isn't set up yet?
No - our standards explicitly state that ESLint/Prettier should be set up to handle code style rules automatically. Making manual comments about things that should be automated doesn't add value.
Delete this comment as it addresses a code style issue that should be handled by automated tooling rather than manual review.
2. src/components/VideoGrid.tsx:18
- Draft comment:
Avoid using direct DOM manipulation with innerHTML in React—this can bypass the virtual DOM and pose XSS risks. Instead, use state to conditionally render the <iframe>. - Reason this comment was not posted:
Marked as duplicate.
3. src/components/VideoGrid.tsx:16
- Draft comment:
Consider extracting the inline onClick handler into a separate function to improve readability and testability. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%
None
4. docs/tutorial-videos.mdx:7
- Draft comment:
Add a newline at the end of file to comply with typical Prettier/ESLint settings. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%
None
Workflow ID: wflow_6gmz7E2qe675bCW6
Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.
| className="video-container" | ||
| onClick={(e) => { | ||
| const target = e.currentTarget; | ||
| target.innerHTML = `<iframe src='https://www.youtube.com/embed/${video.id}?autoplay=1' title='${video.title}' allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture' allowFullScreen></iframe>`; |
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.
Avoid using innerHTML injection in the onClick handler. Use component state for conditional rendering of the iframe to prevent potential XSS risks and ensure React-managed DOM updates.
| <div className="video-grid"> | ||
| {videos.videos.map((video: Video) => ( | ||
| <div key={video.id} className="video-item"> | ||
| <div |
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.
Enhance accessibility by adding attributes (e.g., role='button', tabIndex=0) to the clickable video container.
| <div | |
| <div role="button" tabIndex={0} |
Important
Add a tutorial videos section with a new JSON data file, MDX page, React component, and CSS styling.
tutorial-videos.jsonto store video data withidandtitle.tutorial-videos.mdxto introduce the tutorial videos section usingVideoGridcomponent.sidebars.tsto includetutorial-videosin the sidebar.VideoGrid.tsxto render a grid of videos using data fromtutorial-videos.json.custom.cssfor.video-grid,.video-container, and.video-titleto format the video display.This description was created by
for ece2edf. It will automatically update as commits are pushed.