Skip to content

feat(editor): honour nb_rows on rich text settings and make the editor resizable - #264

Open
erdostom-bot wants to merge 1 commit into
maglevhq:mainfrom
erdostom-bot:agent/upstream-richtext-rows
Open

erdostom-bot wants to merge 1 commit into
maglevhq:mainfrom
erdostom-bot:agent/upstream-richtext-rows

Conversation

@erdostom-bot

Copy link
Copy Markdown

A text setting with html: true rendered the Tiptap editor at the uikit default of 4 rows no matter what nb_rows said: Maglev::Editor::Settings::Text::RichtextComponent never passed the option through, even though Maglev::Uikit::Form::RichtextComponent already supports rows via the --number-of-rows CSS variable.

  • Pass nb_rows as rows, so a section can opt into a taller editor per setting (e.g. { id: body, type: text, html: true, nb_rows: 15 }). Settings without nb_rows are unchanged (4 rows).
  • Add resize-y to .ProseMirror so the author can drag the box taller still.
  • Component spec for both the default and the nb_rows case.
  • app/assets/builds/maglev/tailwind.css regenerated with rake app:maglev:tailwindcss:build; it was stale, so the diff also picks up a few utilities already used by components.

Motivation: a "Rich text" section used for long agendas/minutes asks for 15 rows and was getting 4.

Tests: component specs green; RuboCop clean.

🤖 Generated with Claude Code

…r resizable

A text setting with `html: true` rendered the Tiptap editor at the uikit
default of 4 rows no matter what `nb_rows` said, because the editor
setting component never passed it through. Pass it as `rows` so a section
can ask for a taller editor, and add `resize-y` to `.ProseMirror` so the
author can drag the box taller still.

The built tailwind.css is regenerated with `rake app:maglev:tailwindcss:build`;
it was stale and also picks up a few utilities already used by components.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 6aaeea9)
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