[FIR-290] Add FfToastService with positions, auto-dismiss and on-demand container#49
Merged
Conversation
Contributor
Author
|
❌ Rework — la orquestación duplica una capacidad existente del framework. Objeciones numeradas:
Nota de alcance: el pause-on-hover del timer JS queda fuera de este rework — necesita que core exponga pausa (creado FIR-311). La barra de progreso puede mantenerse como visual ligada a (Se publica como comentario porque GitHub no permite request-changes sobre un PR propio; el estado formal de rework vive en Jira.) |
…tainer pattern The design system no longer duplicates core's AlertService: FfToastService, provideFfToasts and the internal body-mounted container are removed. A new public ff-toast-container pattern renders duck-typed FfToastItem entries (core's Toast fits structurally) inside six always-present aria-live regions, keeps the role=alert wrapper, CSS enter/progress animations and prefers-reduced-motion support, and exposes dismissed/hoverStarted/hoverEnded outputs so the app layer wires dismiss and pause/resume to the orchestrator. The ff-toast JSDoc points back to core's AlertService as the orchestrator.
Reverts the ff-toast primitive contract to its pre-delivery form (no requiredProviders, no service-rendered aria clauses) and adds the ff-toast-container pattern contract: composes ff-toast, structural toasts input, dismissed/hoverStarted/hoverEnded string outputs, always-present polite regions, role=alert on errors and hover-driven external pause/resume. Registered in the barrel and ALL_CONTRACTS (23 primitives + 2 patterns).
The playground registers provideAlerts() instead of provideFfToasts and the toast page drives ff-toast-container from AlertService: activeToasts() as input, dismiss on dismissed and pauseToast/resumeToast on the hover outputs (exercising the FIR-311 pause/resume). Demos cover the semantic types (destructive maps to the error variant), core toast positions and the duration-bound progress bar.
…reflyframework/firefly-frontend-framework into feature/FIR-290_toast-service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qué
Crea el servicio imperativo de toasts del DS (FIR-290 / FF-CAT-08, bloqueante P0 — ToastService de hub se usa en 29 ficheros de Flydocs):
FfToastService:show()+ atajos success/error/info/warning,dismiss(id),clear(), signaltoasts.provideFfToasts(config?)con defaults (timeout 4000, top-right, dismissible).aria-live="polite",role="alert"en errores, barra de progreso y transiciones 100% CSS (pausa on hover sincronizada con el timer JS,prefers-reduced-motionrespetado). Sin@angular/animations.ff-toast(átomo) intacto; contrato conrequiredProvidersy cláusulas aria; demo imperativa en el catálogo.Notas para review
Verificación
pnpm nx test design-system→ 25 files / 448 ✓ (26 del servicio) · contract 13 ✓ · lint 0 errores · build playground ✓Ref: FIR-290