The prebuilt admin inside FluentCMS.Admin.Hosting, served without the app's project (A-55)

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp

調査の方向性

Read docs/planning/admin-technical-spec.md sections 2.8, 6.1, 6.3 and 10.8, then inspect admin/src/FluentCMS.Admin.Hosting/AdminHostingExtensions.cs and the package check in eng/check-packages.cs. Start by testing whether packaged fingerprinted and compressed assets retain their endpoints; the issue calls for a one-day spike to choose the serving path. Done means the package-only host serves the admin and passes every listed acceptance check, including publish size and removal of icon assemblies.

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

説明

area:admin area:host type:feature

Problem

AQ8 ships the static build twice: as a zip on the release (A-43), and inside FluentCMS.Admin.Hosting, so that a host that wants the first-party admin adds one package and MapFluentCmsAdmin(). The second does not exist:

  • The package serves only what the host builds. MapFluentCmsAdmin serves the host's own static web assets and stops the host when it finds no {application}.staticwebassets.endpoints.json, with "The host references the admin app's project" (admin/src/FluentCMS.Admin.Hosting/AdminHostingExtensions.cs, lines 70 to 77). The package's README says the prebuilt app "comes later (AQ8)".
  • A host made from packages has no project to reference. FluentCMS.Admin.App is not a package (Directory.Build.props, lines 46 to 48), so the host of dotnet new fluentcms cannot serve an admin, which row 11.1 and A-44 ask for.
  • Two follow-ups of the package (#3178). A host that references the app's project gets the component library's four icon assemblies in its publish root, 22.6 MB that arrive as NuGet runtime assets and that no server code loads. And a malformed index.html, with no <base href> or two, stops the host with FCMS1103, titled "FluentCMS not registered".

Proposal

  • The package carries the build. FluentCMS.Admin.Hosting packs the published wwwroot of FluentCMS.Admin.App, the same files as the zip of A-43, and MapFluentCmsAdmin serves them when the host references no admin app. A host that references an app project of its own (the fluentcms-admin template, 6.2) serves that one, and the README says how each case is told apart.
  • One way of serving. The files are answered as today: fingerprinted files cached for good, the compressed copy by Accept-Encoding, index.html with its base set and config.json from configuration never cached, the fallback for client routes, the headers of 6.1. Two ways are open. As static web assets of the package, MapStaticAssets keeps doing all of it, if a package can carry an app's fingerprinted and compressed assets with their endpoints. As plain files of the package beside the host's output, the package answers them itself and the checks of the Compose job on caching and encoding get a copy for this path. The lane takes the first if a spike of a day proves it, and the second otherwise.
  • The reference host keeps its project reference, since the image is built from source and one build gives both (6.1).
  • The icon assemblies stay out of a host, whichever way it gets the app, and out of deps.json.
  • A code of its own for an index.html the package cannot set the base of.
  • What it costs. The pull request records the size of the package and the time the publish adds to dotnet pack, and the check of the packages (eng/check-packages.cs) asks that the package holds index.html and the Blazor script.

Acceptance

  • A host with FluentCMS.Admin.Hosting as a package and no app project serves the admin at /admin: the page with its base, config.json from configuration, a fingerprinted file cached for good and in Brotli, and a client route on reload
  • A host that references an app project of its own serves that app, with a half the first-party build does not have
  • The reference host and the image serve as before, and the Compose job passes unchanged
  • The publish root of a host holds no Microsoft.FluentUI.AspNetCore.Components.Icons.* assembly, and deps.json names none
  • An index.html without a <base href> stops the host with a code and a title of its own
  • The Pack job fails when the package lacks the build; the pull request states the package's size
  • The items of #3178 on the icon assemblies and on the code of a malformed index.html are ticked

Design: docs/planning/admin-technical-spec.md, sections 2.8, 6.1, 6.3 and 10.8 (A-55, split from A-43); AQ8. Rows 10.2, 11.1. Takes two items of #3178. Needs A-43. A-44 needs it. Size: M.

主要言語
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 を短くまとめたダイジェスト。