replace youtube prompt with dialog, responsive embed styles, width fix#675
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
replace youtube prompt with dialog + responsive embed styles + note width fix
what changed
slash-command.tsxyoutube embed dialogreplaced the browser
prompt()call with a properYoutubeDialogcomponent. the dialog validates the url with zod before allowing submission, shows inline error messages, and supports enter-to-submit. it's mounted imperatively withcreateRootso it works outside of the react tree where the slash command runs. the embed button stays disabled until the url passes validation.globals.cssresponsive youtube embed stylesadded
[data-youtube-video]styles so embedded youtube iframes are always full width, useaspect-ratio: 16/9, have rounded corners, and a subtle border. slightly less rounded on mobile (8px vs 12px).NotePageClient.tsxresponsive note widthchanged the fixed-width note layout from a hard
w-[900px](which overflowed on smaller screens) toDesktop:w-[900px] w-full px-4. now it's full width with padding on anything below the desktop breakpoint.HomeClientLayout.tsxminor cleanuptightened the header padding from
px-5topx-4and reformatted thememowrapper to be more compact.prompt()is a browser-blocking native dialog with no styling, no validation, and no undo. the new dialog integrates with the rest of the ui and prevents bad urls from being embedded. the note width fix prevents horizontal scroll on tablets.