feat(app): editor blocks: callout, spoiler, formulas, files, video, study button
All checks were successful
CI / check (push) Successful in 8m34s
CI / deploy (push) Successful in 1m1s

Blocks beyond the editor's own, each built once for editor and view:
- callout: eight kinds in theme colours, kind, title and "folded at
  first" from its header; written in place, left with Enter on its
  empty last line; never inside another
- spoiler: written in plain sight, hidden behind Reveal read-only
- formula on its own line, written on its own screen with a preview
  and snippet buttons, and formulas within a line (Σ in the format
  bar); set by flutter_math_fork behind MathView, LaTeX's numbered
  environments read as their aligned forms
- image and sound picked from the device, kept as synced files
- YouTube video from its link, with its start and a caption: a card
  until played, nothing fetched before; played in place where a web
  view exists (youtube_player_iframe, privacy-enhanced), else opened
  in the browser, behind YoutubeVideos in Dependencies
- study button: a studyset, a tag or all cards, with or without its
  topics, back first; its StudyFocus rides on the study route and
  narrows that session only
- tables, already in the editor, now insertable everywhere

An Insert button opens on the format bar, so blocks can be inserted on
phones too; the desktop's / menu lists the same blocks, translated.
Card faces now dock the format bar while written, so cards get blocks
and formatting on phones as well. The blocks are listed in
EditorBlocks: the core's, plus the features' through
EditorBlocksScope. Blocks of a type the app doesn't know say they need
a newer version and stay as they are, so formatVersion stays 1.

Their types and keys are in content_blocks.dart, which RichContent
reads: a block's text counts as text, and a video or study button
isn't blank. The path import now makes formulas real ones.

integration_test/youtube_player_test.dart plays a real video through
the app's player on a device, which no widget test can: YouTube
refuses embeds that don't say where they are embedded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-03 12:20:41 +02:00
commit ec34bb2334
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -52,6 +52,7 @@ dependencies:
# The app's own browser half of GitHub sign-in on Linux and Windows
# (LoopbackWebAuth) plugs in here, and opens the browser and brings the window
# back with the same packages flutter_web_auth_2 uses.
flutter_math_fork: ^0.7.4
flutter_web_auth_2_platform_interface: ^5.0.0
fractional_indexing_dart: ^1.0.7
# Pinned exactly: every device on one app version must compute the same
@ -82,6 +83,7 @@ dependencies:
sqlite3: ^3.6.0
url_launcher: ^6.3.2
window_to_front: ^0.0.4
youtube_player_iframe: ^6.0.2
dev_dependencies:
fake_async: ^1.3.3
@ -92,6 +94,9 @@ dev_dependencies:
sdk: flutter
# A test drives sign-in through its front, as Serverpod's GitHub sign-in does.
flutter_web_auth_2: ^5.1.0
# Checks on a device what no widget test can see (integration_test/).
integration_test:
sdk: flutter
# The sync tests (test/sync/) sign in like the app and read the server's database.
postgres: ^3.5.16
serverpod_auth_core_client: 4.0.3