Skip to content

Conversation

@ornsteinfilip
Copy link
Member

No description provided.

… with more lucide-react icons""

This reverts commit dcee77c.
…roups

- Add window.Folio.Tiptap.customIcons for project-defined icons
- Add window.Folio.Tiptap.toolbarGroups for project-defined dropdown groups
- Add dropdown_group support in tiptap_config.toolbar
- Create FolioEditorToolbarNodeGroups component for grouped nodes
- Keep built-in ICON_MAP as fallback for common icons
- Projects can define their own icons and groups without modifying Folio
- Add toolbar_groups attr to Folio::Tiptap::Config
- Pass toolbar_groups through to_input_json to TipTap
- Support both config-based and window-based toolbar groups
- Allow projects to define dropdown groups from Rails initializer
@ornsteinfilip
Copy link
Member Author

ornsteinfilip commented Nov 29, 2025

@mreq Vybavil jsem na zkoušku tiptap skupinami ikonek. Přijde mi to pěkné a přehledné pro více tipů karet. Ještě to trochu rozvinu na našem webu v této samostatné branch.

Screenshot 2025-11-29 at 14 27 50 Screenshot 2025-11-29 at 14 47 08

- Add NODE_ICONS map to makeFolioTiptapNodesCommandGroup
- Support toolbar_groups configuration for grouped slash commands
- Each dropdown_group becomes a separate section in the popup
- Individual nodes show their configured icons instead of default cube
- Introduce support for custom icons from the lucide-react set for each node
- Allow organization of nodes into dropdown groups to streamline the toolbar
- Provide detailed configuration examples for setting up toolbar groups and icons in Rails
- Maintain backwards compatibility with existing toolbar functionality
@ornsteinfilip ornsteinfilip requested a review from mreq November 29, 2025 13:47
@mreq
Copy link
Member

mreq commented Dec 1, 2025

to vypada smysluplne 👍 na kod zatim nekoukam

cc @hoxgen

@hoxgen
Copy link
Contributor

hoxgen commented Dec 1, 2025

super!

ornsteinfilip and others added 12 commits December 1, 2025 15:37
…t delay support

- Refactor redis_client method to build Redis options dynamically
- Introduce redis_client_supports_reconnect_delay? method to check compatibility with reconnect_delay parameters
- Ensure backward compatibility with redis-client versions by conditionally adding reconnect_delay options
* fix(embed): add instagram blockquote styles so iframe can load with the proper width

* chore(changelog): add entry
…486)

* fix(modals): only close parent modal when present

* feat(modals): unify xl modals to 1172px

* fix(files): don't validate file placements marked for destruction

* fix(has_attachments): respect in-memory placements during validation

- Filter out marked_for_destruction placements in validation
- Use in-memory associations instead of DB queries in
  get_files_with_usage_constraints

Fixes bug where replacing cover via nested attributes would validate
old persisted file instead of new in-memory file.
…endering

Remove manual createTweet() calls after widgets.load() completes.
Twitter's widgets.load() automatically processes all .twitter-tweet
elements, so manual rendering was causing tweets to render twice.

Let widgets.load() handle all tweet rendering automatically.
* added MOV mime type + fxed env sample

* updated changelog

* feat(videos): add MOV/QuickTime video support

- Add video/quicktime MIME type registration
- Update uppy component to allow .mov file extension for video/quicktime uploads
- Update uppy component to display MOV instead of QUICKTIME in supported formats
- Update player component to map video/quicktime to video/mp4 for browser compatibility

---------

Co-authored-by: Petr Mlčoch <foton@centrum.cz>
…delines

- Add root AGENTS.md with code formatting, linting, Rails best practices, and View Components guidelines
- Add AGENTS.md template generator for Rails apps using Folio
- Update docs/components.md with BEM class name construction details
- Update tiptap/AGENTS.md with Code Formatting and Linting section
…pages (#490)

* fix(tiptap): make commands support editor.can() checks

Fix moveFolioTiptapPageUp/Down and other commands to properly support
editor.can() checks by removing early returns when dispatch is undefined.

When TipTap calls editor.can(), it passes dispatch=undefined to check if
a command can execute. The previous implementation returned false immediately
in this case, preventing proper validation.

Changes:
- Remove early 'if (!dispatch) return false' checks from command wrappers
- Make dispatch optional in utility functions (moveFolioTiptapPage,
  addOrDeletePage, moveFolioTiptapNode, addOrDeleteColumn, cancelFolioTiptapFloat)
- Validate conditions first, then only perform operations if dispatch is provided
- Fix TypeScript namespace from 'pages' to 'folioTiptapPages' to match node name

This fixes the inactive arrow buttons in folioTiptapPage bubble menus.

* feat(tiptap): remove trailing empty paragraphs from all block elements recursively

- Extend removeTrailingEmptyParagraph to recursively process nested block elements
- Remove trailing empty paragraphs from float aside, columns, styled wrap, pages, etc.
- Only remove trailing empty paragraphs if they follow other content
- Keep single empty paragraph if it's the only item
- Refactor to use early returns for better readability

* docs(tiptap): add early returns preference to AGENTS.md

* feat(tiptap): refactor paragraph placeholder to use wrapper component with FloatingPortal

- Create HasParagraphPlaceholder wrapper component to handle placeholder logic
- Use FloatingPortal to escape stacking context issues
- Add editor update listener to show placeholder when content changes (only when hovering)
- Update all node views (page, column, float-aside, float-main, styled-wrap) to use new wrapper
- Add default #ffffff fallback to f-tiptap-root__background-color CSS variable
- Update placeholder styles: smaller font, Plus icon, centered layout, bottom padding

* chore(deps): update tiptap packages to v3.11.1 and floating-ui packages

- Update all @tiptap/* packages from 3.0.1/3.0.7 to 3.11.1
- Update @floating-ui/dom from 1.7.2 to 1.7.4
- Update @floating-ui/react from 0.27.12 to 0.27.16

Key improvements:
- Added native RTL/bidirectional text direction support in Tiptap
- Improved TypeScript generics for Node.extend
- Fixed TrailingNode extension bug
- Fixed getViewportRect to account for scrollbar-gutter
- Added ShadowRoot container support in FloatingPortal

* fix(tiptap): improve placeholder styles in float layouts

- Apply two-line placeholder with webkit line-clamp when float aside is narrow (max-width: 250px), using the aside's container context
- Offset placeholder in float main to account for aside width and position using CSS custom properties
- Cap placeholder width when aside is on the right to prevent overlap

* guard(forms): ensure consistent rendering of form partials in edit and new pages

* fix(embed): instagram embed from url width (#485)

* fix(embed): add instagram blockquote styles so iframe can load with the proper width

* chore(changelog): add entry

* fix(has_attachments): respect in-memory placements during validation (#486)

* fix(modals): only close parent modal when present

* feat(modals): unify xl modals to 1172px

* fix(files): don't validate file placements marked for destruction

* fix(has_attachments): respect in-memory placements during validation

- Filter out marked_for_destruction placements in validation
- Use in-memory associations instead of DB queries in
  get_files_with_usage_constraints

Fixes bug where replacing cover via nested attributes would validate
old persisted file instead of new in-memory file.

* chore(tiptap): build

* Revert "guard(forms): ensure consistent rendering of form partials in edit and new pages"

This reverts commit 74594d5.

* fix(tiptap): improve placeholder styles in float layouts

- Always use two-line placeholder for empty paragraphs that are only child of [data-node-view-content-react] in float aside/main
- Add webkit clamp styles for float main placeholder
- Apply placeholder offset/limit in float main only to first child paragraphs
- Remove media query by setting default CSS custom property values (0) so calc() evaluates correctly at all breakpoints

* chore(tiptap): build

* fix(embed): remove manual Twitter tweet rendering to prevent double rendering

Remove manual createTweet() calls after widgets.load() completes.
Twitter's widgets.load() automatically processes all .twitter-tweet
elements, so manual rendering was causing tweets to render twice.

Let widgets.load() handle all tweet rendering automatically.

* feat(files): improve MOV videos support (#487)

* added MOV mime type + fxed env sample

* updated changelog

* feat(videos): add MOV/QuickTime video support

- Add video/quicktime MIME type registration
- Update uppy component to allow .mov file extension for video/quicktime uploads
- Update uppy component to display MOV instead of QUICKTIME in supported formats
- Update player component to map video/quicktime to video/mp4 for browser compatibility

---------

Co-authored-by: Petr Mlčoch <foton@centrum.cz>

* docs: add AGENTS.md with Rails best practices and View Components guidelines

- Add root AGENTS.md with code formatting, linting, Rails best practices, and View Components guidelines
- Add AGENTS.md template generator for Rails apps using Folio
- Update docs/components.md with BEM class name construction details
- Update tiptap/AGENTS.md with Code Formatting and Linting section

* docs: update AGENTS.md template

* docs(agents): update commit examples with real project commits

---------

Co-authored-by: Filip Ornstein <filip@sinfin.cz>
Co-authored-by: Vláďa <34059901+VladaTrefil@users.noreply.github.com>
Co-authored-by: Petr Mlčoch <foton@centrum.cz>
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.

5 participants