6 Commits
Author SHA1 Message Date
alamin-br 59da1eb2da feat: rich content in form view descriptions (#1851) (#5707)
* feat: rich text editor for form field description (creator)

* feat: render form field description as rich text (respondent)

* feat: rich text editor for form description (creator)

* feat: render form description as rich text (respondent)

Renders the form-level description read-only via RichTextEditor in
FormViewModeForm.vue (the public standard form), matching the field
description treatment from FormPageField.

FormViewModeSurvey.vue was checked and has no separate form-level
description/title render at all (it goes straight to fields), so no
change was needed there.

* docs: changelog for rich form descriptions (#1851)

* fix: only save form description after an actual edit

saveDescription ran on every editor blur and compared tiptap's
normalized markdown against the raw stored value, so clicking into
a legacy plain-text description (with chars like *, #, %) and away
without editing silently rewrote the stored value. Add a dirty flag
set only by update:modelValue (real edits) so blur without an edit
is a no-op.

Also drops the unused editor-class attribute on the description
RichTextEditor (no matching SCSS rule).

* perf: only mount field description editor when needed (v-if)

* fix: preserve in-progress description edit on external update; add e2e coverage

* fix: click-to-edit toggle for form descriptions; fix cursor reset

Replace the always-editable inline RichTextEditor on the form builder with a
shared FormViewDescription component that renders read-only markdown and mounts
the editor only while editing, behind an edit pencil (matching title/submit).

- Restores the edit affordance that regressed vs the old Editable.
- Passes model-value one-way and reads markdown back on blur, so typing after
  moving the cursor no longer resets to the end.
- No floating menu lingers on the form once editing stops.
- Removes the dirty/save-on-blur logic duplicated across FormViewField and
  FormViewModePreviewForm.

* test: cover form description toggle and save-on-blur

* fix: keep description editor menu stuck to cursor line on scroll

Pass the form preview's scroll container (.form-view__preview) to the editor so
its floating/bubble menu tracks the cursor line while the page scrolls, instead
of falling back to the editor's own non-scrolling root.

* Address PR review feedback (#5707)

- Route public form description render sites through FormViewDescription
- Pass scroll container as a resolver prop instead of a closest() lookup
- Wrap long unbroken words in form and field descriptions
- Use palette color variable for the description placeholder

* fix: clamp form description containers to the form column

The flex editor wrapper inside the inline-block description containers
made them shrink-to-fit their max-content width, letting long words
escape the form column on the public form.
2026-07-17 17:40:40 +02:00
716d43a9a8 Nuxt 3 migration (#4342)
Update the nuxt3 version.

Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
Co-authored-by: Bram Wiepjes <bramw@protonmail.com>
Co-authored-by: Cezary <cezary@baserow.io>
Co-authored-by: Tsering Paljor <tsering@baserow.io>
Co-authored-by: Przemyslaw Kukulski <przemyslaw+gh@baserow.io>
Co-authored-by: Bram <bram2w@users.noreply.github.com>
2026-01-22 10:27:19 +01:00
Bram Wiepjes a4013b0331 Resolve "Survey form style" 2022-09-02 12:24:17 +00:00
Bram Wiepjes bb25b6edfe Resolve "Forms - Show field only when conditions are met" 2022-07-26 08:38:24 +00:00
Zuhair Rayyes 5716a4db65 Resolve "Allow changing the text of the submit button in the form" 2022-01-04 14:00:38 +00:00
Bram Wiepjes 53ffd8f9c0 Resolve "Form view" 2021-07-11 18:02:37 +00:00