Merged
Conversation
…footer visibility - Fixed ID assignment in ResourceComponentService, CustomComponentService, ResourceDelimiterService, and ResourceTypeService to use Max(ID)+1 instead of Count+1 - This prevents ID collisions when adding new items after deletions - Fixed AddModal footer being cut off by moving it inside modern-modal-content container - Updated modal CSS to properly handle scrolling body with fixed footer using flexbox layout
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request fixes two issues: an ID collision bug when adding components after deletions, and a modal footer visibility problem in the AddModal component.
Changes:
- Updated ID assignment logic in four service classes to use
Max(ID) + 1instead ofCount + 1, preventing ID collisions after item deletions - Repositioned the modal footer inside the
modern-modal-contentcontainer in AddModal.razor - Adjusted CSS flexbox properties to ensure proper scrolling behavior with a fixed footer
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Services/ResourceTypeService.cs | Changed ID assignment to use max existing ID + 1 to prevent collisions |
| src/Services/ResourceDelimiterService.cs | Changed ID assignment to use max existing ID + 1 to prevent collisions |
| src/Services/ResourceComponentService.cs | Changed ID assignment to use max existing ID + 1 to prevent collisions |
| src/Services/CustomComponentService.cs | Changed ID assignment and removed duplicate ID assignment logic that was overwriting the correct value |
| src/Components/Modals/AddModal.razor | Moved footer inside modern-modal-content container for proper layout |
| src/wwwroot/css/modern-components.css | Updated flexbox properties to ensure scrollable body with fixed footer |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…e warnings and improve ResourceDelimiterService - Added unit tests for ID collision prevention in ResourceComponentService, CustomComponentService, ResourceDelimiterService, and ResourceTypeService - Upgraded Newtonsoft.Json from 9.0.1 to 13.0.3 to resolve security vulnerability (NU1903) - Upgraded Microsoft.NET.Test.Sdk from 16.11.0 to 17.12.0 - Fixed ResourceDelimiterService null handling bug that caused ArgumentNullException when items is null - Fixed ResourceDelimiterService to disable other delimiters when adding a new enabled delimiter (not just when updating) - Fixed nullable reference warnings across test suite using object casting pattern: ((object?)variable).Should()... - Build now completes with 0 warnings, all 417 tests passing (403 succeeded, 14 skipped)
Add test coverage for ID collision fix, upgrade packages, fix nullabl…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix ID collision bug when adding components after deletion and modal footer visibility
Fixes #188