Repository navigation
Add FlBadge, FlTag and FlAvatar - #104
Conversation
pournasserian
left a comment
There was a problem hiding this comment.
Blocking review of 8e309f7: several enabled Remove buttons are wired to Ignore (including an entire list); the static callback example also exposes controls that cannot act. This contradicts the no-empty-actions contract. Please give the gallery operable interactions or an explicitly non-operable presentation. Simplify the focus helper to avoid an unresolved TaskCompletionSource if its follow-up render never occurs. The failed-image CSS is engine-dependent; verify the visible initials, not only computed styles, and bring the branch up to date from main before merge.
pournasserian
left a comment
There was a problem hiding this comment.
6953f30 remains blocked: Src is now an inline style, so a valid same-origin photo disappears under the supported self-only style CSP. Rewriting CONTRIBUTING to permit it is not an acceptable fix. Also remove the unconditional engine-name skip in ForcedColoursKeepTheAvatarEdge; if the media query matches, test a real edge and fix its styling. Keep operable tag/focus improvements; use CSP-compatible native image markup with an honest, readable no-script fallback. A broken image need not be pixel-identical to initials so long as the consumer gets a usable fallback (but do not weaken the existing target, accessibility, or forced-colour floors).
pournasserian
left a comment
There was a problem hiding this comment.
Re-reviewed integrated 9755b8c on 533540c. CSP policy exception and style attribute are gone: loaded same-origin native img and readable failed-photo initials are verified with scripting off; no engine-name forced-colour waiver. Tag examples have operable actions and focus after removal, and main API/route/text entries survive. Windows Firefox full subset had variable failures despite the passing policy check. Release/consumer confirmation, required PR CI, and hosted cross-browser investigation are in flight; no merge yet.
|
Hosted PR CI (46168186944) is green: 242 component tests, 467 Chromium passes, one explicit standalone skip. The separate Linux cross-browser run 46168239715 failed 3 Firefox and 10 WebKit rows, all in existing C1 number-step focus (#70), segmented keyboard boundaries (#73), and temporal focus / second JS-disabled POST (#74). No Data row failed. Do not interpret that as a green full nightly. Running the same nightly workflow on exact base 533540c (46169433472) and investigating by owning issue before merge. |
pournasserian
left a comment
There was a problem hiding this comment.
Coordinator re-review after integrating the three owner-scoped cross-browser fixes at bb32981. Compared the complete binary/full-index #67 diff against the prior reviewed diff: byte-identical. Merge-tree conflicts: none. Prior baseline-vs-candidate failures matched exactly and the combined fixes passed both Linux engines. Now require fresh PR CI, Linux Firefox/WebKit and packaged evidence on 123bd36; no check bypass.
|
Accepted and merged on the reviewed 123bd36 tree. Final PR CI 46173784293: 242 component and 467 Chromium tests passed. Final Linux Firefox/WebKit workflow 46173865833: 467 passed in each, zero failures, one explicit standalone skip per engine. Build, pack, and size report passed; the package hash matched the isolated consumer. No Safari or manual speech pass is claimed. |
Adds
FlBadge,FlTagandFlAvatarfor statuses, removable choices and people, using the existingbadge.css,tag.cssandavatar.cssandFlIcon. No new library JavaScript, inline style or dependency.Head under review:
123bd367bb697f786b7d6c3d6f763ace86bad1eb(mainbb32981merged in by the coordinator; its delta against the new base is identical to the earlier #67 delta). Hosted CI and the Firefox/WebKit nightly for this head are the coordinator's and are forthcoming; nothing below claims them. No further commits are planned.Evidence on exactly
123bd36(Windows 11 ARM64, .NET 10; Playwright's Chromium, Firefox and WebKit builds, not Safari; local logs in the evidence folder…\opencode\c1-ses_ddde3f47cffexqAc6zbKkGZTPF\67):dotnet build -c Release -warnaserror: exit 0, 0 warnings, 0 errors (release-build-r7.log).dotnet pack src/FluentCMS.Components -c Release --no-build -o package6: exit 0.python3 .github/scripts/package_size.py package6\FluentCMS.Components.1.0.0.nupkg: exit 0; gzip css 36044 B, js 2044 B, dll 46447 B (size6.txt). No gallery, png or svg entries in the nupkg; the forced-coloursborder-color: CanvasTextrule is present.3943D603544F771171F06DD1002CCC1B1D13A8F98AAFD0DEDFFE50E5A535DE62. Isolated consumer (consumer6, ownNUGET_PACKAGES,NUGET_HTTP_CACHE_PATH,NUGET_PLUGINS_CACHE_PATH, local feed plus nuget.org):dotnet runexit 0; the nupkg it restored into its pristine cache has the same SHA-256. It renders badge, tag (submit button with name/value) and avatar (img, empty alt, no style) and rejects an inert removable tag (consumer6-run.log).dotnet test --project tests/FluentCMS.Components.Browser --filter-class "*Data.AvatarPolicyTests"withFLUENTCMS_BROWSER= chromium, webkit, firefox: each exit 0, 2/2 passed, 0 skipped (policy5-*.log, pixels inpixels7). Understyle-src 'self'; style-src-attr 'none'; img-src 'self'with JavaScript off a loaded photo changed ~69 % of its avatar and a failed one kept 100 % of the initials. Thesecuritypolicyviolationevents show the control (style-src-attr | inline, written by script) in all three engines and, besides it, only the gallery'sdata:favicon (Chromium, Firefox).Earlier evidence (heads
9755b8cand before; not repeated on123bd36):Browser.Data60/60 in Chromium and WebKit on9755b8c; unit 242 passed; segmented 21/21; ChromiumLayout,FormsandButton*on older integrated heads. Firefox history: local fullDataruns were unstable across earlier heads (58/58, then 54/59, 58/59, 55/59, one browser crash, and 5, 1 and 4 failures on later heads; different tests each time: Tab/focus reads over the 3 s timeout, interactive takeover waits,GalleryPassesAxehanging). After aTabStartchange no full local FirefoxDatapass was repeated. Firefox is unconfirmed until the hosted run.API.
FlBadge:Tone,Dot,Icon,Square,ChildContent. Text only, never a focus stop. A standalone count carries what it counts in hidden text the caller passes.FlTag:Text,Icon,InList,Removable,OnRemove,RemoveSubmit+RemoveAttributes,RemoveLabel,Disabled,FocusRemoveAsync(). The remove button is a native button named byFlText.Remove("Remove {0}"). A removable tag needsOnRemoveorRemoveSubmit, or it throws: no inert buttons.FocusRemoveAsync()is one@refandFocusAsync, called by the host after it renders (the host owns focus after a removal); without an interactive mode the framework throws.FlAvatar:Name,Initials,Src,Icon,Size,Category,Decorative. Standalone: onerole="img"witharia-label; decorative:aria-hidden.FlTextkeeps main's identities:Close 0, Loading 1, Clear 2, ShowPassword 3, Decrease 4, Increase 5, InvalidDate 6, InvalidDateTime 7, InvalidTime 8;Remove = 9(English "Remove {0}") is added after them. All main routes, thebutton-states.jsblocks (button, card, input, textarea, segmented) and the new.fl-tagtwin are kept.Avatar photo and strict policy.
Srcrenders<img class="fl-avatar__image" alt="">over the initials, nostyleattribute, no JavaScript.avatar.csssizes the image to the avatar's width, centred, with no height of its own (animgwith a definite height draws the browser's broken-image glyph when it fails: a corner icon in Chromium, a box that hides the initials in WebKit). A square photo fills the avatar, a taller one is cropped, a wider one leaves a band of the avatar's fill. In forced colours.fl-avatarsetsborder-color: CanvasText.CONTRIBUTING.mdis identical to main.Gallery (
/badge,/tag,/avatar). Tag variants and the wrapping list are realGETforms operable without script (each removal adds its key to the address and keeps earlier ones); the callback/focus example exists only on the interactive routes (the static route shows a note linking to them); the states table isinert. The avatar photos are a same-origin PNG and a missing file.Decisions on #27 items are unchanged: outline badge,
FlAvatarGroup/Maxand the tag tooltip are deferred; the avatar name over a quieter line is composed from existing markup.Not covered: Safari, a screen reader, real forced colours, a non-English provider outside bUnit, the appearance of very wide or tall photos beyond the documented fit.
Closes #67