Follow-ups of the wrapped component set, from the review of #3172

オープン
#3,178 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp

調査の方向性

This issue collects follow-ups from reviews of #3172, #3183, #3191, and #3197; it does not name implementation files or tests. Start by choosing one checklist item and reading its linked issue and review context to find the affected entry point. Done means completing that item and checking it off here; the list spans several packages and substantial design work.

索引モデルが issue の本文から書いたものです。

説明

area:admin type:feature

The review of #3172 (#3140, A-02) ran the gallery in a browser and left these for later issues. Each is taken by the issue of the admin plan that needs it first, and ticked here when that issue is done.

  • Data grid: accessible selection and one tab stop per row, before the first list view of A2. Chromium's tree shows selection cells as gridcell with an empty name and no checked or selected state, rows carry no aria-selected, the select-all header is unnamed and not reachable by keyboard, Space does not toggle, and every cell is a tab stop (19 Tab presses across a 4 by 4 grid). Replace the library's select column with a real checkbox per row and in the header, and take data cells out of the tab order. (#3243)
  • Data grid for list views: external sort with several keys, server paging, loading and empty states, and column order (a column rendered later is appended and not placed, which breaks the per-user column choice). (#3243)
  • Inputs for field editors (4.6, 4.17): a number input, ReadOnly, Dir and Lang per content locale, OnBlur for validation on leave, AutoComplete, MaxLength with a counter; the time picker drops seconds; a select with a value and no placeholder cannot be cleared; dates and times follow the browser's locale and not the user's culture. (#3245)
  • Accent color: with an accent set, 12 of the library's 57 brand tokens follow it, so hover and pressed states stay the library's blue; the color on the accent is fixed white, so an accent of #ffd400 gives 1.43:1 on primary buttons. Derive the ramp and guard the contrast.
  • Icon names for plugin menu items: spec 5.1 names icons by string, and CmsIcon takes an enumeration of 20. Decide the set and a trim-safe lookup by name (A-18). (#3317)
  • The library's built-in strings ("Row selected" and the like) come from its own localizer in English. Feed it from the admin's resources.
  • Toasts: error toasts dismiss themselves after 7 seconds like the rest (WCAG 2.2.1), and the live region is created together with its content. Route messages through the shell's live regions (#3143).
  • Dialog and drawer: no visible close button; a dialog removed from the tree while open cannot return focus; the wrappers re-render the dialog's subtree several times per toggle inside it.
  • Compile assets of the library still flow to FluentCMS.Admin and to plugin halves, with the architecture test of A-06 as the only guard; PrivateAssets="compile" would make misuse a compile error. (#3321)

For A-10 (#3148): the library emits a <style> element for the drawer and inline style attributes on grid cells, so style-src needs 'unsafe-inline'; it uses no eval, no inline script and no inline event attribute.

From the review of #3183 (#3180):

  • The gallery's texts in the resources: 100 of the 130 keys of AdminResources.resx are System.Components.*, sample titles and names included, and every contributed translation would have to carry them once a test asks for every key in each shipped culture. Decide whether the gallery's texts are exempt or move to a resource file of their own.
  • A built-in favicon: without faviconUrl the browser asks for /favicon.ico and logs a 404 on every first load, on the error page too, and spec 2.5 promises a built-in one.

From the review of #3191 (#3148, the hosting package):

  • Client routes whose last segment has a dot answer 404 on reload (/admin/media/photo.jpg, /admin/content/1.2), since the fallback to index.html takes only paths that do not look like files. Record the constraint for the routes of the areas, or narrow the fallback to known extensions.
  • A configured fluentcms-admin client is not checked against what the served admin needs: with a secret, or without the scopes, the host starts and config.json still lists the five scopes. Refuse it while the admin is on, or document it.
  • A public seam in place of InternalsVisibleTo from Core to FluentCMS.Admin.Hosting, which ties the package to Core's exact version (A-47).
  • The static files of /admin count against the pre-authentication rate limit: a cold load is about 230 requests against 6000 per minute per address, so an office behind one address can meet 429 after a deploy. Exempt the static endpoints or document RateLimit:PreAuth.
  • Turning the admin off keeps the client row when no other client is configured.

From the second review of #3191 (#3148):

  • A code of its own for a malformed index.html: the host stops with FCMS1103, titled "FluentCMS not registered", when the admin's index.html has no <base href> or two; the code fits a missing manifest or file, not that.

  • The component library's icon assemblies in the host's publish root: 22.6 MB of the 25.1 MB of browser assemblies beside wwwroot are the four Microsoft.FluentUI.AspNetCore.Components.Icons.* assemblies, which arrive as NuGet runtime assets and not through the app's output. Keep them out of the host; removing files after publish is not enough, since deps.json would still list them.

  • Cross-Origin-Opener-Policy: same-origin and preview: a preview in an iframe of another origin is unaffected, but one opened with window.open to another origin loses its opener both ways (no postMessage, no handle to reuse or close). If preview needs that, the header becomes same-origin-allow-popups.

  • A path base made of dot segments (/.., /.) passes the start check of the hosting package, whose pattern allows dots; the page's base would then be /../admin/. It is the operator's own setting, so it is a mistake and not an attack, but the check could refuse a segment that is only dots.

From the review of #3197 (#3146, the shell):

  • Focus after a navigation from the drawer: under 1024 pixels every sidebar navigation ends on the button that opened the drawer and not on the page's h1, with nothing announcing that the page changed, because the wrapped dialog raises no callback after a programmatic close, so the layout has no hook. The wrapped set gives the hook, the layout moves focus to the heading, and the end-to-end harness (#3149) asserts it. Before the first list views ship. (#3243)
  • Theme items as radio items: the component library raises a radio or checkbox menu item's change event again when its state is set back, which made the theme flip; the user menu uses plain items with a check icon and hidden text. menuitemradio with aria-checked is the right pattern once the wrapper can offer it.
  • A site switch discards an unsaved form without asking: the layout drops the page while the new site loads. Sign-out asks; the switch does not. Save the tracked drafts on a switch (the draft key holds the site), or ask. With the content forms. (#3246)
  • content/{type}/{id} is kept across a site switch when the type exists in the new site, although an entry of a site-scoped type does not; go to the list unless the type is global. The same for a page of a plugin that is disabled in the new site. With the content lists. (#3243)
  • Grants limited to a locale: the server narrows /me/access and /schema by the request's locale, and the shell asks in the site's default only, so a translator limited to fr on an en site sees no types and no notice. The locale switcher re-reads both per locale and resets the locale in the same step as the site (A-17). (#3252)
  • IAdminAccess.Allows is too coarse for two cases: an instance-only endpoint (/users, /members, /jobs, /system) for a caller whose site role lists the permission, where the page always answers 403; and a grant limited to a resource, such as a media folder, which appears only among the limited permissions, so a usable page is hidden. It also offers nothing per content type, which the create and publish buttons of the lists and forms need.
  • ContentType.{name} and a plugin menu entry's label key are looked up in the admin package's own resources, so only a satellite assembly of FluentCMS.Admin can add one. Decide the extension point for a team's app and for a plugin's admin half.
  • FocusOnNavigate acts only when the page type changes: content/article to content/author will be one page type, and focus will not move to the heading. (#3243)
主要言語
C#
スター
567
フォーク
107
平均マージ
1時間 19分
マージ済み PR(30日)
353

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

fluentcms/FluentCMS のほかの issue

fluentcms/FluentCMS の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。