Skip to content

fix(reading): make the term-edit modal non-blocking while reading - #253

Merged
HugoFara merged 2 commits into
mainfrom
fix/reading-modal-tabs
Jul 25, 2026
Merged

fix(reading): make the term-edit modal non-blocking while reading#253
HugoFara merged 2 commits into
mainfrom
fix/reading-modal-tabs

Conversation

@HugoFara

Copy link
Copy Markdown
Owner

Clicking a word already opened a compact, non-blocking popover, but "Add"/"Edit" switched to a stock Bulma modal: an 86%-opacity backdrop covering the full viewport, plus a card filling ~95% of the screen height on mobile — hiding the text the reader was just looking at.

Changes

  • Drop the modal-background dimming, and on mobile pin the card to the bottom as a capped-height sheet, mirroring the existing word-popover bottom-drawer treatment.
  • Split the edit form into tabs (Translation / Example / Notes / Tags), shown one at a time via the wordEditForm Alpine component, so the sheet fits a 50vh cap without scrolling and most of the reading text stays visible.
  • Applied to both word_modal.php and multi_word_modal.php.

Note on authorship and scope

The first commit is HugoFara's, authored 2026-07-04. It had been sitting unpushed on a local branch; this PR rebases it onto current main (three merges newer than where it was written) and puts it up for review unchanged — the patch is byte-identical to the original.

The second commit is mine and is style-only: PHPCS (PSR-12) flagged one line in each modal view, at 122 and 141 characters. main is clean of those warnings, so they came in with this change. Wrapped the attribute list and the <template> body; no markup or behaviour change.

Verification

Re-verified on the current base rather than where the work was authored: Psalm 0 errors, PHPCS clean, TypeScript typecheck clean, PHPUnit 9085 passed, Vitest 4445 passed (the commit brings its own word_edit_form.test.ts covering the tab component), assets rebuilt.

The visual behaviour itself — the sheet layout and tab switching — has not been exercised in a browser here; the automated cover is the component unit tests. Worth a manual look on a narrow viewport before merging.

HugoFara added 2 commits July 25, 2026 18:45
Clicking a word already opened a compact, non-blocking popover, but
"Add"/"Edit" switched to a stock Bulma modal: an 86%-opacity backdrop
covering the full viewport plus a card filling ~95% of the screen
height on mobile, hiding the text the reader was just looking at.

Drop the modal-background dimming and, on mobile, pin the card to the
bottom as a capped-height sheet (mirrors the existing word-popover
bottom-drawer treatment). Split the edit form into tabs (Translation /
Example / Notes / Tags), shown one at a time via the wordEditForm
Alpine component, so the sheet fits a 50vh cap without scrolling and
most of the reading text stays visible. Applied to both word_modal.php
and multi_word_modal.php.
PHPCS (PSR-12) flagged one line in each modal view at 122 and 141
characters. Wrapped the attribute list and the <template> body; no
markup or behaviour change.
@HugoFara
HugoFara merged commit 5059847 into main Jul 25, 2026
14 checks passed
@HugoFara
HugoFara deleted the fix/reading-modal-tabs branch July 25, 2026 19:29
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