Skip to content

Fix/prevent submit on enter in lists#10

Merged
thEpisode merged 14 commits intomainfrom
fix/prevent-submit-on-enter-in-lists
Feb 25, 2026
Merged

Fix/prevent submit on enter in lists#10
thEpisode merged 14 commits intomainfrom
fix/prevent-submit-on-enter-in-lists

Conversation

@jpuentevel
Copy link
Contributor

No description provided.

Declare React-related libraries as peerDependencies (react, react-dom, react-router-dom, @monaco-editor/react) so consumers provide them. Update rollup config to mark react-router-dom and @monaco-editor/react as externals and tidy the copy plugin targets. Modify OmniSearchOverlay to always render the command group when 'all' is selected, change filtering so empty queries only show priority commands while non-empty queries let CMDK handle matching, and adjust command item values to include a leading slash and description to improve matchability.
Remove react-router-dom and @monaco-editor/react from package.json peerDependencies and from rollup externals so they are no longer treated as external/peer packages. Also perform a cleanup in OmniSearchOverlay.component.jsx: remove non-functional comments, tighten up small code formatting and control-flow (consistent resetSearchState usage, minor guard/return style changes, and small refactors). No intended behavioral changes.
Clean up styling and improve readability in OmniSearchOverlay.component.jsx: remove fixed width/height/position and internal layout CSS from StyledCommand to rely on utility classes, replace the ShortcutLabel styled component with simple spans and utility classNames, and update Kbd elements to use inline-flex classes. Rename ambiguous iteration and callback params (cmd/cat -> command/category, e/event -> event) for clarity, adjust payload/result mapping variable names, and add className hooks to chips and containers. Also refine keyboard handling and selection logic to be more consistent and simplify overflow/scroll behavior.
Add react-router-dom ^7.13.0 to package.json to enable routing support in the project. Also restore the trailing newline at the end of the file.
Move react-router-dom from devDependencies to peerDependencies (>=6.0.0) in package.json and add it to rollup config's external array. This prevents bundling the router into the package and ensures consumers provide their own react-router-dom implementation.
Apply minor formatting changes: add a blank line after the dependencies entry in package.json and a blank line before the external array in rollup.config.cjs. No functional changes; just whitespace for readability.
Trim stray whitespace/blank lines in package.json and rollup.config.cjs to clean up formatting; no functional changes.
feat(editor): implement submit on enter and mobile view optimizations

- Add submitOnEnterExtension to TipTap editor components.
- Refine TextEditor responsive behavior using window size detection.
- Update package-lock.json with dependency changes.
- Refactored active value matching for static and slash commands to support prefix-based matching.
- Ensured consistent slash prefix appending when auto-completing search queries via Tab.
- Expanded keywords array for command items to improve indexing and searchability.
…locks

- Modified the custom `SubmitOnEnter` extension in the Tiptap simple-editor.
- Added conditions to check if the editor is currently focused inside a list (`listItem`, `bulletList`, `orderedList`, `taskList`, `taskItem`) or a `codeBlock`.
- If active in any of these formatting blocks, the custom submit event is prevented (`return false`), allowing Tiptap to handle the Enter key natively (like creating a new line or list item).
@thEpisode thEpisode merged commit 05449d0 into main Feb 25, 2026
@thEpisode thEpisode deleted the fix/prevent-submit-on-enter-in-lists branch February 25, 2026 15:47
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.

2 participants