feat(mobile): ruban d'edition style Obsidian + correctifs mobile (#83, BUG-017 a BUG-020)
CI / lint (push) Successful in 1m13s
CI / security (push) Successful in 47s
CI / test (push) Successful in 2m41s
CI / build (push) Successful in 43s
CI / e2e (push) Successful in 11m14s

- #83: ruban horizontal defilable ancre au-dessus du clavier, commandes
  etendues (titres, barre, surligne, code bloc, citation, listes, cases,
  wikilinks, tags, pieces jointes, undo/redo, colle, police) et
  personnalisation persistee via l'icone engrenage
- BUG-017: cartes du tableau de bord compressibles (min-width:0)
- BUG-018: en-tete editeur mobile compact, boutons Annuler/Sauvegarder
  accessibles, barre IA plus tactile
- BUG-019: ancrage du ruban via visualViewport (--kb-offset)
- BUG-020: suppression de la double barre de defilement

Tests: mobile-editor 35/35, ai 50/50, 9 suites JSDOM, validate-imports,
pytest 961 passed / 6 skipped, ruff + mypy 0.
This commit is contained in:
2026-09-13 11:49:45 -04:00
parent 162a5b4acc
commit 520059d866
11 changed files with 841 additions and 126 deletions
+7 -7
View File
@@ -45,19 +45,19 @@ test.describe('Mobile editor (#69)', () => {
await expect(page.locator('body')).not.toHaveClass(/reading-mode/);
});
test('editor modal exposes the floating formatting toolbar', async ({ page, viewport }) => {
test('editor modal exposes the Obsidian-style editing ribbon', async ({ page, viewport }) => {
test.skip((viewport?.width ?? 0) > MOBILE_MAX_WIDTH, 'Mobile viewport required');
await boot(page);
// Force the editor modal open — the toolbar visibility is pure CSS.
// Force the editor modal open — the ribbon visibility is pure CSS.
await page.evaluate(() => document.getElementById('editor-modal').classList.add('active'));
const toolbar = page.locator('#me-toolbar');
await expect(toolbar).toBeVisible();
for (const action of ['bold', 'italic', 'code', 'list', 'link']) {
await expect(page.locator('#me-fmt-' + action)).toBeVisible();
for (const cmd of ['bold', 'italic', 'strike', 'highlight', 'wikilink', 'checkbox', 'undo', 'redo']) {
await expect(page.locator('#me-cmd-' + cmd)).toBeVisible();
}
await expect(page.locator('#me-paste')).toBeVisible();
await expect(page.locator('#me-ribbon-gear')).toBeVisible();
});
test('font zoom buttons persist the editor font size', async ({ page, viewport }) => {
@@ -65,8 +65,8 @@ test.describe('Mobile editor (#69)', () => {
await boot(page);
await page.evaluate(() => document.getElementById('editor-modal').classList.add('active'));
await page.locator('#me-font-plus').click();
await page.locator('#me-font-plus').click();
await page.locator('#me-cmd-font_larger').click();
await page.locator('#me-cmd-font_larger').click();
const stored = await page.evaluate(() => localStorage.getItem('obsigate-editor-font-size'));
expect(Number(stored)).toBeGreaterThan(13.5);
});