Repository navigation
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe Dock component now resolves its CSS through the .NET 9 asset map when available, while preserving backward compatibility for older targets, and passes the resulting URL to JavaScript for stylesheet injection. Sequence diagram for fingerprinted Dock CSS loadingsequenceDiagram
participant DockView
participant DockViewJS
participant AssetMap
participant Browser
DockView->>AssetMap: Resolve Assets[StylePath]
AssetMap-->>DockView: Return fingerprinted StyleUrl
DockView->>DockViewJS: init(Id, Options, Interop, StyleUrl)
DockViewJS->>Browser: addLink(StyleUrl)
Browser-->>DockViewJS: Load goldenlayout-bb.css
Flow diagram for backward-compatible Dock stylesheet URL resolutionflowchart TD
A[DockView initializes] --> B{Target is .NET 9 or newer?}
B -->|Yes| C["Resolve StyleUrl from Assets[StylePath]"]
B -->|No| D[Use StylePath directly]
C --> E[Invoke JavaScript init with StyleUrl]
D --> E
E --> F[addLink injects stylesheet]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/components/BootstrapBlazor.Dock/Components/DockView/DockView.razor.js" line_range="13" />
<code_context>
}
- await addLink("./_content/BootstrapBlazor.Dock/css/goldenlayout-bb.css")
+ await addLink(styleUrl)
const eventsData = new Map()
</code_context>
<issue_to_address>
**Reset loses stylesheet URL**
When the Dock is reset, including after a layout configuration change or a caller invoking `DockView.Reset`, `reset` calls `init(id, option, dock.invoke)` without the fourth argument, so `styleUrl` is undefined when `addLink` runs. The rebuilt Dock cannot add the resolved stylesheet URL and relies on the link from its earlier initialization.
Pass the resolved stylesheet URL to `init` from `reset`.
</issue_to_address>| } | ||
|
|
||
| await addLink("./_content/BootstrapBlazor.Dock/css/goldenlayout-bb.css") | ||
| await addLink(styleUrl) |
There was a problem hiding this comment.
🟡 Medium · Reset loses stylesheet URL
When the Dock is reset, including after a layout configuration change or a caller invoking DockView.Reset, reset calls init(id, option, dock.invoke) without the fourth argument, so styleUrl is undefined when addLink runs. The rebuilt Dock cannot add the resolved stylesheet URL and relies on the link from its earlier initialization.
Pass the resolved stylesheet URL to init from reset.
Prompt for AI agents
In `src/components/BootstrapBlazor.Dock/Components/DockView/DockView.razor.js` at line 13:
**Reset loses stylesheet URL**
When the Dock is reset, including after a layout configuration change or a caller invoking `DockView.Reset`, `reset` calls `init(id, option, dock.invoke)` without the fourth argument, so `styleUrl` is undefined when `addLink` runs. The rebuilt Dock cannot add the resolved stylesheet URL and relies on the link from its earlier initialization.
Pass the resolved stylesheet URL to `init` from `reset`.
Link issues
fixes #1205
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Support fingerprinted CSS asset URLs during Dock initialization.
Bug Fixes:
Enhancements:
Build: