-
Notifications
You must be signed in to change notification settings - Fork 48
Started injecting the ability to configure the database connectionstring #333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v0.7
Are you sure you want to change the base?
Started injecting the ability to configure the database connectionstring #333
Conversation
There was a problem hiding this comment.
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 introduces the ability to configure the database connection string during the startup process.
- Added a new Step3 Razor component to collect database connection details from the user.
- Updated Step2 to redirect to the new database configuration step instead of marking startup as completed.
- Extended the ApplicationState model with new properties and an overridden configuration getter to support database connection strings.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/SharpSite.Web/Components/Startup/Step3.razor | New component for collecting and saving database configuration details. |
| src/SharpSite.Web/Components/Startup/Step2.razor | Updated navigation logic to redirect to Step3 for database configuration. |
| src/SharpSite.Web/ApplicatonState.cs | Added new connection string properties and updated configuration retrieval logic. |
| src/SharpSite.Abstractions/ApplicationStateModel.cs | Overridden method to include new configuration keys. |
| .github/copilot-instructions.md | Updated instructions as documentation for coding style and guidelines. |
Comments suppressed due to low confidence (1)
src/SharpSite.Web/ApplicatonState.cs:27
- The file is named 'ApplicatonState.cs' but the class is 'ApplicationState'. Consider renaming the file to match the class name for consistency.
public string ContentConnectionString { get; set; } = string.Empty;
There was a problem hiding this comment.
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 adds a new database configuration step to the startup flow and updates the application state to support configurable connection strings.
- Introduces a new Razor component (Step3.razor) to capture database configuration details.
- Updates the navigation and button actions in Step2.razor to transition to the new configuration step.
- Extends the ApplicationState model and its abstraction to include content and security connection strings.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/SharpSite.Web/Components/Startup/Step3.razor | New interactive page to configure the database connection string. |
| src/SharpSite.Web/Components/Startup/Step2.razor | Updates to button labels and navigation for transitioning to Step3. |
| src/SharpSite.Web/ApplicationState.cs | Adds properties for connection strings and an override for configuration retrieval. |
| src/SharpSite.Abstractions/ApplicationStateModel.cs | Introduces a virtual method for configuration lookup. |
| .github/copilot-instructions.md | Updates to local development coding style instructions. |
There was a problem hiding this comment.
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 adds support for configuring the database connection string during startup by introducing a dedicated UI step and updating related application state and database initialization services.
- Introduces Step3.razor with an EditForm for database configuration.
- Updates Step2.razor to redirect to step 3 instead of finalizing startup immediately.
- Updates ApplicationState and database service registrations to support new connection string properties and database schema migration.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/SharpSite.Web/Components/Startup/Step3.razor | Adds a new interactive page for configuring the database connection string and handling database schema updates. |
| src/SharpSite.Web/Components/Startup/Step2.razor | Updates navigation and method names to integrate with the new database configuration step. |
| src/SharpSite.Web/ApplicationState.cs | Introduces new properties and a GetConfigurationByName override to handle DB connection strings. |
| src/SharpSite.Data.Postgres/RegisterPostgresServices.cs | Implements database management methods to create and migrate the Postgres database. |
| src/SharpSite.Abstractions/ApplicationStateModel.cs | Enhances the configuration lookup with support for additional configuration keys. |
| src/SharpSite.Abstractions.Base/IRegisterServices.cs | Adds the IManageDatabase interface to decouple database management functionality. |
| .github/copilot-instructions.md | Contains updated guidelines and style instructions for Blazor and .NET development. |
Comments suppressed due to low confidence (2)
src/SharpSite.Web/Components/Startup/Step2.razor:62
- [nitpick] The method name 'Next' is somewhat generic; consider renaming it to 'ProceedToDatabaseConfiguration' or a similar descriptive name to clearly convey its purpose.
private async Task Next(MouseEventArgs args)
src/SharpSite.Web/ApplicationState.cs:30
- [nitpick] Consider defining configuration key names as constants to reduce the risk of typos and to ensure consistency across the codebase.
public override string GetConfigurationByName(string name, string defaultValue = "")
Fixes #254