Skip to content

Feature/view state service architecture#1

Merged
ReneSchwarzer merged 4 commits into
mainfrom
feature/view-state-service-architecture
Jun 22, 2026
Merged

Feature/view state service architecture#1
ReneSchwarzer merged 4 commits into
mainfrom
feature/view-state-service-architecture

Conversation

@ReneSchwarzer

Copy link
Copy Markdown
Member

This pull request refactors the Catalog and Seed content fragments, updating them to use a new data-driven architecture and modernizing their configuration and dependencies. The changes standardize naming conventions, update base classes, and switch from REST-based to data-based service patterns for tables and forms. Additionally, configuration and project file updates improve clarity and dependency management.

Refactoring to Data-Based Architecture

  • All Catalog and Seed form and table classes have been renamed from *RestForm*/*RestTable to *DataForm*/*DataTable, and their base classes have been updated accordingly (e.g., FragmentControlRestFormAddFragmentControlDataFormAdd). This standardizes naming and aligns with the new data-driven approach. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

  • Both CatalogTable and SeedTable now use a ServiceFactory with DataServiceBuilder to define their data endpoints, replacing the previous direct URI assignment. This enables more flexible and robust data querying and response handling. [1] [2]

Dependency and Configuration Updates

  • The project file now includes HtmlAgilityPack for all configurations and ensures WebExpress.WebApp is only included when not in DebugLocal. This clarifies dependency usage.

  • The web configuration file replaces the old <limit> section with a <kestrel> section, mapping connection and upload limits to Kestrel-specific settings for better compatibility and clarity.

Code Cleanup and Modernization

  • Added missing using statements for System.Net.Http and WebExpress.WebApp.WebData in table classes to support the new data service pattern. [1] [2]

These changes collectively modernize the codebase, improve maintainability, and align the implementation with updated architectural patterns.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the Catalog and Seed content fragments to use the newer data-driven service architecture (Data* controls + DataServiceBuilder) and updates configuration/dependencies to match the new setup.

Changes:

  • Migrated Catalog/Seed table fragments from REST URI wiring to ServiceFactory + DataServiceBuilder endpoints.
  • Updated Seed forms and Catalog forms to use FragmentControlDataForm* base classes (and renamed Seed form types accordingly).
  • Adjusted project/configuration: moved HtmlAgilityPack to an unconditional package reference and replaced <limit> config with <kestrel> settings.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/WebIndex/WebFragment/Content/Seed/SeedTable.cs Switched Seed table from RestUri to ServiceFactory/DataServiceBuilder.
src/WebIndex/WebFragment/Content/Seed/SeedDataFormAdd.cs Renamed Seed add form to SeedDataFormAdd and updated base class.
src/WebIndex/WebFragment/Content/Seed/SeedDataFormEdit.cs Renamed Seed edit form to SeedDataFormEdit and updated base class.
src/WebIndex/WebFragment/Content/Seed/SeedDataFormDelete.cs Renamed Seed delete form to SeedDataFormDelete and updated base class.
src/WebIndex/WebFragment/Content/Catalog/CatalogTable.cs Switched Catalog table from RestUri to ServiceFactory/DataServiceBuilder.
src/WebIndex/WebFragment/Content/Catalog/CatalogDataFormAdd.cs Updated Catalog add form base class to FragmentControlDataFormAdd.
src/WebIndex/WebFragment/Content/Catalog/CatalogDataFormEdit.cs Updated Catalog edit form base class to FragmentControlDataFormEdit.
src/WebIndex/WebFragment/Content/Catalog/CatalogDataFormDelete.cs Updated Catalog delete form base class to FragmentControlDataFormDelete.
src/WebIndex/WebExpress.Tutorial.WebIndex.csproj Made HtmlAgilityPack unconditional; kept WebExpress.WebApp package conditional for non-DebugLocal.
src/WebIndex.App/config/webexpress.config.xml Replaced legacy <limit> section with <kestrel> settings.
Comments suppressed due to low confidence (7)

src/WebIndex/WebFragment/Content/Seed/SeedTable.cs:22

  • _sitemapManager is now assigned but never used after switching from RestUri to ServiceFactory, leaving dead state in the control (and a compiler warning for an unused private field). Remove the field and the assignment.
    public sealed class SeedTable : FragmentControlDataTable
    {
        private readonly ISitemapManager _sitemapManager;

        /// <summary>

src/WebIndex/WebFragment/Content/Catalog/CatalogDataFormEdit.cs:21

  • The XML doc comment has a typo: "uir" should be "URI".
    src/WebIndex/WebFragment/Content/Catalog/CatalogDataFormAdd.cs:21
  • The XML doc comment has a typo: "uir" should be "URI".
    src/WebIndex/WebFragment/Content/Seed/SeedDataFormDelete.cs:18
  • The summary comment says this is an "edit" form, but the type is SeedDataFormDelete and the scope is Seed.Id.Delete. Update the summary to avoid misleading documentation.
    src/WebIndex/WebFragment/Content/Seed/SeedDataFormAdd.cs:19
  • This property represents a URL, but the XML doc comment refers to a "login identifier". Updating the comment will keep the docs consistent with the model (Model.Seed.Url) and UI label/placeholder.
    src/WebIndex/WebFragment/Content/Seed/SeedDataFormEdit.cs:22
  • This property represents a URL, but the XML doc comment refers to a "login identifier". Updating the comment will keep the docs consistent with the model (Model.Seed.Url) and UI label/placeholder.
    src/WebIndex/WebFragment/Content/Catalog/CatalogDataFormEdit.cs:18
  • PR description states that Catalog form classes were renamed from *RestForm* to *DataForm*, but these Catalog types are still named CatalogFormAdd/Edit/Delete (only the base classes changed). Either update the class names to match the new architecture (and file names) or adjust the PR description to reflect what actually changed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ReneSchwarzer ReneSchwarzer merged commit 245b3f6 into main Jun 22, 2026
1 check passed
@ReneSchwarzer ReneSchwarzer deleted the feature/view-state-service-architecture branch June 22, 2026 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants