Mobile : raccourci « Séance en cours » dans la barre haute + hub sans débordement à 375 px
Qualité & Sécurité / Web (ESLint · angular-eslint + sonarjs) (push) Successful in 1m43s
Qualité & Sécurité / MegaLinter (PMD · Ruff · Bandit · gitleaks · hadolint) (push) Successful in 2m3s
Qualité & Sécurité / Trivy (CVE dépendances Maven / pip / npm) (push) Failing after 1m3s
Build & Push Images / build (brain) (push) Successful in 2m40s
Build & Push Images / build (core) (push) Successful in 4m24s
Build & Push Images / build (web) (push) Successful in 2m35s
Build & Push Images / build-switcher (push) Successful in 24s

- Barre haute mobile : pastille « Séance en cours » (mode compact du
  raccourci, 44 px) — un tap ramène à la séance, liste déroulante s'il y en a
  plusieurs (fermée par Échap ou un tap à côté).
- Hub campagne : l'en-tête de section « Arcs narratifs » passe à la ligne au
  lieu de déborder (3 boutons depuis l'ajout de « Méthode guidée »).

Vérifié : core clean verify (1206 tests), web build + 337 vitest, lint sans
erreur, e2e Playwright 80/80 (desktop + mobile 375 px) sur la branche
fusionnée.
À redéployer : web.
This commit is contained in:
2026-10-17 14:07:20 +02:00
parent b323c681f8
commit d926545e3d
6 changed files with 82 additions and 14 deletions
+2
View File
@@ -25,6 +25,8 @@
<span>DM Loremind</span>
</span>
}
<!-- Séance en cours : un tap y ramène (visible seulement si une séance tourne). -->
<app-active-session-shortcut compact class="topbar-session"></app-active-session-shortcut>
<button type="button" class="topbar-btn topbar-search"
[attr.aria-label]="'mobileShell.search' | translate"
(click)="openSearch()">
+2
View File
@@ -12,6 +12,7 @@ import { GlobalSearchComponent } from './shared/global-search/global-search.comp
import { UpdateBannerComponent } from './shared/update-banner/update-banner.component';
import { ConfirmDialogHostComponent } from './shared/confirm-dialog/confirm-dialog-host.component';
import { WritingCoachPanelComponent } from './shared/writing-coach/writing-coach-panel.component';
import { ActiveSessionShortcutComponent } from './sessions/active-session-shortcut/active-session-shortcut.component';
import { LayoutService } from './services/layout.service';
import { GlobalSearchService } from './services/global-search.service';
import { VersionCheckerService } from './services/version-checker.service';
@@ -36,6 +37,7 @@ const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), selec
UpdateBannerComponent,
ConfirmDialogHostComponent,
WritingCoachPanelComponent,
ActiveSessionShortcutComponent,
AsyncPipe
],
templateUrl: './app.component.html',
@@ -307,8 +307,10 @@
.section-header {
display: flex;
flex-wrap: wrap; // écran étroit : les actions passent sous le titre au lieu de déborder
align-items: center;
justify-content: space-between;
gap: 0.75rem;
margin-bottom: 1.5rem;
h2 { color: #d1d5db; font-size: 1rem; font-weight: 600; }
@@ -316,6 +318,7 @@
.section-header-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.5rem;
}
@@ -4,8 +4,14 @@
[class.shortcut-main--current]="entries.length === 1 && isCurrent(entries[0])"
[attr.aria-expanded]="entries.length > 1 ? expanded : null"
[title]="(entries.length === 1 ? 'playAccess.shortcut.openTitle' : 'playAccess.shortcut.listTitle') | translate"
[attr.aria-label]="compact ? ((entries.length === 1 ? 'playAccess.shortcut.openTitle' : 'playAccess.shortcut.listTitle') | translate) : null"
(click)="onMainClick()">
<span class="live-dot" aria-hidden="true"></span>
@if (compact) {
@if (entries.length > 1) {
<span class="compact-count" aria-hidden="true">{{ entries.length }}</span>
}
} @else {
<span class="shortcut-texts">
<span class="shortcut-label">
@if (entries.length === 1) {
@@ -18,7 +24,8 @@
<span class="shortcut-sub">{{ entries[0].session.name }}</span>
}
</span>
@if (entries.length > 1) {
}
@if (entries.length > 1 && !compact) {
<lucide-icon class="shortcut-icon" [img]="expanded ? ChevronUp : ChevronDown" [size]="14"></lucide-icon>
}
</button>
@@ -111,3 +111,41 @@
.shortcut-item-name { font-size: 0.8rem; font-weight: 500; }
.shortcut-item-ctx { font-size: 0.7rem; color: #9ca3af; }
// --- Mode compact (barre haute mobile) ----------------------------------------------
:host(.compact) {
position: relative;
.active-shortcut { margin-top: 0; }
.shortcut-main {
justify-content: center;
gap: 0.3rem;
width: auto;
min-width: 44px;
height: 44px;
padding: 0 0.55rem;
}
.live-dot { width: 10px; height: 10px; }
.shortcut-list {
position: absolute;
top: calc(100% + 6px);
right: 0;
z-index: 30;
width: min(280px, calc(100vw - 2rem));
padding: 0.4rem;
background: #0f0f1a;
border: 1px solid #2a2a45;
border-radius: 8px;
box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
}
.compact-count {
font-size: 0.8rem;
font-weight: 700;
color: #d1fae5;
font-variant-numeric: tabular-nums;
}
@@ -1,4 +1,4 @@
import { Component, DestroyRef, OnInit } from '@angular/core';
import { Component, DestroyRef, ElementRef, HostBinding, HostListener, Input, OnInit, booleanAttribute } from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { NavigationEnd, Router } from '@angular/router';
import { filter } from 'rxjs/operators';
@@ -11,8 +11,8 @@ import { ActiveSessionEntry, ActiveSessionsService } from '../../services/active
* un clic y ramène depuis n'importe quel écran. Plusieurs séances (plusieurs tables) :
* le bouton déplie la liste, la plus récente en tête.
*
* <p>Composant autonome (styles propres) pour pouvoir le réutiliser tel quel dans la
* barre haute mobile.</p>
* <p>Composant autonome (styles propres). En mode {@code compact} (barre haute mobile) :
* une pastille de 44 px, et la liste s'ouvre en menu déroulant (Échap / tap à côté la ferme).</p>
*/
@Component({
selector: 'app-active-session-shortcut',
@@ -24,6 +24,9 @@ export class ActiveSessionShortcutComponent implements OnInit {
readonly ChevronDown = ChevronDown;
readonly ChevronUp = ChevronUp;
/** Barre haute mobile : pastille seule, liste en menu déroulant. */
@Input({ transform: booleanAttribute }) @HostBinding('class.compact') compact = false;
entries: ActiveSessionEntry[] = [];
expanded = false;
currentUrl = '';
@@ -31,7 +34,8 @@ export class ActiveSessionShortcutComponent implements OnInit {
constructor(
private activeSessions: ActiveSessionsService,
private router: Router,
private destroyRef: DestroyRef
private destroyRef: DestroyRef,
private host: ElementRef<HTMLElement>
) {}
ngOnInit(): void {
@@ -50,6 +54,18 @@ export class ActiveSessionShortcutComponent implements OnInit {
});
}
@HostListener('document:click', ['$event'])
onDocumentClick(event: MouseEvent): void {
if (this.compact && this.expanded && !this.host.nativeElement.contains(event.target as Node)) {
this.expanded = false;
}
}
@HostListener('document:keydown.escape')
onEscape(): void {
if (this.expanded) this.expanded = false;
}
/** Une seule séance : on y va ; plusieurs : on déplie la liste. */
onMainClick(): void {
if (this.entries.length === 1) {