Skip to content

improve title input behavior, fix url slug update#811

Merged
moehdotdev merged 1 commit into
mainfrom
home-uiux-changes
Jun 14, 2026
Merged

improve title input behavior, fix url slug update#811
moehdotdev merged 1 commit into
mainfrom
home-uiux-changes

Conversation

@moehdotdev

Copy link
Copy Markdown
Member

improve title input behavior and fix url slug update

what changed:

title input:

  • switched from Input to Textarea with field-sizing-content so it auto-expands for long titles instead of scrolling
  • rows=1, resize=none, overflow=hidden keep it compact by default
  • applied to both the private note page and the public note page
  • public note page now also gets enter-to-focus-editor behavior (same as private)

slug / url update:

  • replaced the manual slugify logic with a shared generateSlug utility from lib/generateSlug
  • switched from router.replace to window.history.replaceState so the url updates without triggering a next.js navigation or re-render
  • url is now built from window.location.href and segment [3] is replaced, which is more explicit than slicing from the end

validation:

  • max title length bumped from 55 to 60 chars in all three places it's defined (NotePageClient, AppSidebar, WorkingSpacePageClient)
  • validation failure now shows a destructive toast instead of silently clearing the input

editor:

  • removed autofocus from EditorContent since the title textarea now takes focus on load

toast styles:

  • gradient from-* stop moved from 70% to 60% on both default and destructive variants
  • destructive variant gets a proper border border-border instead of relying on border-destructive/50
image image

switch workspace name update from onblur to debounced onChange

same pattern as the note title instead of waiting for the input to lose focus, the workspace name now saves as you type with a 100ms debounce.

what changed:

  • removed handleNameBlur and replaced it with debouncedUpdateWorkSpaceName
  • validation failure now shows a destructive toast (same copy as note title: "naming failed") and resets the input to the current workspace name
  • on success, blurs the input and sets isEditingName to false
  • handleNameKeyDown kept as-is for enter/escape behavior
  • added useToast and useDebouncedCallback imports
  • minor: trailing {" "} added after </AlertDialogFooter> (probably accidental, worth removing)

switch workspace name update from onblur to debounced onChange
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
notevo Building Building Preview, Comment Jun 14, 2026 12:16pm

@moehdotdev moehdotdev merged commit bb5264f into main Jun 14, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant