Skip to content

Image assets (2/3): Angular client ImageAssetService + Image widget (replicates mxtommy/Kip #1081) - #50

Closed
mairas wants to merge 2 commits into
mainfrom
replicate/pr-1081-image-assets-client
Closed

Image assets (2/3): Angular client ImageAssetService + Image widget (replicates mxtommy/Kip #1081)#50
mairas wants to merge 2 commits into
mainfrom
replicate/pr-1081-image-assets-client

Conversation

@mairas

@mairas mairas commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Replicates upstream PR mxtommy/Kip#1081 ("Image assets (2/3): Angular client ImageAssetService + Image widget") by dillan.

Method: commit-by-commit cherry-pick (linear history, no merge commits).

This is an experimental replica carried in the SKip fork for evaluation. It has not been built or tested against the fork — a build + review is required before merge.

dillan added 2 commits July 1, 2026 00:08
resolveKipPluginBaseUrl() extracts the <server>/plugins/kip/ resolution (mirroring
kip-series-api-client) and snapImageWidth() snaps a container width (x DPR) to the
server's variant allow-list so the client requests stable, cache-friendly URLs.

ImageAssetService wraps the plugin endpoints: upload (multipart FormData with progress),
list, delete, cacheStats, purgeCache, and urlFor(id, cssWidth, dpr) for the widget.
Requests are auto-authenticated by the JWT interceptor. 9 vitest cases green.
New widget-image renders a selected image (by id) via ImageAssetService, scaled to fit the
widget with object-fit (contain/cover) over a configurable background that defaults to
transparent so the dashboard shows through. It tracks its container width with the existing
kipResizeObserver directive and requests a server variant matched to that width (x DPR) so a
small widget never downloads a full-resolution image. Shows an empty state when nothing is
selected. Registered in WidgetService (component map + Component-category definition); adds the
`image` config block to IWidgetSvcConfig. 3 vitest cases (empty state, render+object-fit,
background default/override).
@mairas mairas added the upstream-replica Replica of an upstream mxtommy/Kip PR label Jun 30, 2026
@mairas

mairas commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Review: recommend close — superseded by #62

Client-side image-asset plumbing (image-asset.service, kip-plugin-url util, widget-image component, widget.service/interface wiring), replica of upstream Kip #1081. Its 10 changed source files are a strict subset of tip PR #62's ~20. Every shared file is either byte-identical to #62 or an earlier, simpler version that #62 strictly supersedes (lazy-load refactor; widget-image error-handling with a loadFailed signal + (error)/(load) handlers giving the marine-relevant "Image unavailable" fallback; the datachartAngleRange interface field). No change here is unique to #50.

Verified subset by both file set and substance. Adopting #62 alone captures everything in #50 plus the config UI and e2e harness. Recommend closing #50 in favor of #62.

@mairas

mairas commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #62 (its complete image feature is a strict superset of this). Closing per Tier 4 review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream-replica Replica of an upstream mxtommy/Kip PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants