You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
This PR refactors various Razor components to centralize asset and external link resolution through the WebsiteOptions configuration, replacing hardcoded paths and URLs with dynamic values obtained via GetAssetUrl and configured properties.
Class diagram for WebsiteOptions and usage of GetAssetUrl
classDiagram
class WebsiteOptions {
+string GithubRepositoryUrl
+string WikiUrl
+string GetAssetUrl(assetPath)
}
class Index {
+WebsiteOption: IOptions<WebsiteOptions>
}
class Chats {
+WebsiteOption: IOptions<WebsiteOptions>
}
class BootstrapBlazorIcons {
+WebsiteOption: IOptions<WebsiteOptions>
}
class Template5 {
+WebsiteOption: IOptions<WebsiteOptions>
}
class HomeLayout {
+WebsiteOption: IOptions<WebsiteOptions>
}
class MainLayout {
+WebsiteOption: IOptions<WebsiteOptions>
}
class Header {
+WebsiteOption: IOptions<WebsiteOptions>
}
Index --> WebsiteOptions : uses
Chats --> WebsiteOptions : uses
BootstrapBlazorIcons --> WebsiteOptions : uses
Template5 --> WebsiteOptions : uses
HomeLayout --> WebsiteOptions : uses
MainLayout --> WebsiteOptions : uses
Header --> WebsiteOptions : uses
Loading
File-Level Changes
Change
Details
Files
Introduce WebsiteOptions dependency for dynamic resolution
Add '@Inject IOptions WebsiteOption' to pages and samples lacking it
Trigger a new review: Comment @sourcery-ai review on the pull request.
Continue discussions: Reply directly to Sourcery's review comments.
Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with @sourcery-ai issue to create an issue from it.
Generate a pull request title: Write @sourcery-ai anywhere in the pull
request title to generate a title at any time. You can also comment @sourcery-ai title on the pull request to (re-)generate the title at any time.
Generate a pull request summary: Write @sourcery-ai summary anywhere in
the pull request body to generate a PR summary at any time exactly where you
want it. You can also comment @sourcery-ai summary on the pull request to
(re-)generate the summary at any time.
Generate reviewer's guide: Comment @sourcery-ai guide on the pull
request to (re-)generate the reviewer's guide at any time.
Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
pull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore.
Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
request to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment @sourcery-ai review to trigger a new review!
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
Consider centralizing the WebsiteOption injection and GetAssetUrl helper in a shared base component to avoid repetitive code in each Razor file.
Ensure the "All releases" link is pointing to the correct Releases page; using WikiUrl may be misleading if a dedicated ReleasesUrl is expected.
Assets in tags (e.g., video sources) still use static paths; consider updating those to use GetAssetUrl as well for consistency.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments- Consider centralizing the WebsiteOption injection and GetAssetUrl helper in a shared base component to avoid repetitive code in each Razor file.
- Ensure the "All releases" link is pointing to the correct Releases page; using WikiUrl may be misleading if a dedicated ReleasesUrl is expected.
- Assets in <source> tags (e.g., video sources) still use static paths; consider updating those to use GetAssetUrl as well for consistency.
Sourcery is free for open source - if you like our reviews please consider sharing them ✨
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (c866e93) to head (ed40945). ⚠️ Report is 1 commits behind head on main.
documentationImprovements or additions to documentation
2 participants
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.
Link issues
fixes #6648
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Standardize asset references and external links by leveraging WebsiteOptions configuration across server components.
Bug Fixes:
Enhancements: