@checkstack/dependency-frontend 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # @checkstack/dependency-frontend
2
2
 
3
+ ## 0.4.5
4
+
5
+ ### Patch Changes
6
+
7
+ - f23f3c9: Gate decorative motion and blur effects behind
8
+ `usePerformance().isLowPower` on a focused set of high-traffic plugin
9
+ pages (Dashboard, Dependency map, System node, Notification bell,
10
+ Announcement banner / cards, Anomaly field overrides editor, SLO
11
+ attribution chart, Catalog droppable group). Hover scales, backdrop
12
+ blurs, `animate-pulse`/`animate-ping` accents, and entry transitions
13
+ now drop to static states on low-power devices; functional UX
14
+ transitions (Drawer/Dialog open-close, colour transitions) are left
15
+ alone.
16
+
17
+ Standardise the post-mutation error-toast voice on plugin pages by
18
+ migrating multi-clause `toast.error(extractErrorMessage(error, "Failed
19
+ to X"))` call sites onto the `toastError(toast, "Failed to X", error)`
20
+ helper from `@checkstack/ui`. The helper applies the canonical
21
+ `"action: message"` prefix and 100-character truncation in one place,
22
+ and the now-orphaned `extractErrorMessage` imports are dropped from
23
+ the affected files. No business logic or component APIs changed.
24
+
25
+ - Updated dependencies [f23f3c9]
26
+ - Updated dependencies [f23f3c9]
27
+ - Updated dependencies [f23f3c9]
28
+ - Updated dependencies [f23f3c9]
29
+ - Updated dependencies [f23f3c9]
30
+ - @checkstack/common@0.11.0
31
+ - @checkstack/frontend-api@0.5.2
32
+ - @checkstack/dashboard-frontend@0.7.5
33
+ - @checkstack/gitops-frontend@0.4.5
34
+ - @checkstack/ui@1.10.0
35
+ - @checkstack/catalog-common@2.2.2
36
+ - @checkstack/dependency-common@1.1.2
37
+ - @checkstack/gitops-common@0.4.1
38
+ - @checkstack/healthcheck-common@1.1.2
39
+ - @checkstack/signal-frontend@0.1.4
40
+
3
41
  ## 0.4.4
4
42
 
5
43
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/dependency-frontend",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "license": "Elastic-2.0",
5
5
  "type": "module",
6
6
  "main": "src/index.tsx",
@@ -13,16 +13,16 @@
13
13
  "lint:code": "eslint . --max-warnings 0"
14
14
  },
15
15
  "dependencies": {
16
- "@checkstack/catalog-common": "2.2.0",
16
+ "@checkstack/catalog-common": "2.2.1",
17
17
  "@checkstack/common": "0.10.0",
18
- "@checkstack/dashboard-frontend": "0.7.3",
19
- "@checkstack/dependency-common": "1.1.0",
18
+ "@checkstack/dashboard-frontend": "0.7.4",
19
+ "@checkstack/dependency-common": "1.1.1",
20
20
  "@checkstack/frontend-api": "0.5.1",
21
21
  "@checkstack/gitops-common": "0.4.0",
22
- "@checkstack/gitops-frontend": "0.4.3",
23
- "@checkstack/healthcheck-common": "1.1.0",
22
+ "@checkstack/gitops-frontend": "0.4.4",
23
+ "@checkstack/healthcheck-common": "1.1.1",
24
24
  "@checkstack/signal-frontend": "0.1.3",
25
- "@checkstack/ui": "1.8.3",
25
+ "@checkstack/ui": "1.9.0",
26
26
  "@xyflow/react": "^12.10.2",
27
27
  "lucide-react": "^0.344.0",
28
28
  "react": "^18.2.0",
@@ -27,6 +27,8 @@ import {
27
27
  Badge,
28
28
  LoadingSpinner,
29
29
  useToast,
30
+ usePerformance,
31
+ cn,
30
32
  } from "@checkstack/ui";
31
33
  import { Maximize2, Save, RefreshCw, Trash2 } from "lucide-react";
32
34
  import type { ImpactType } from "@checkstack/dependency-common";
@@ -83,6 +85,7 @@ function autoLayout(
83
85
  }
84
86
 
85
87
  function DependencyMapContent() {
88
+ const { isLowPower } = usePerformance();
86
89
  const depClient = usePluginClient(DependencyApi);
87
90
  const catalogClient = usePluginClient(CatalogApi);
88
91
  const healthCheckClient = usePluginClient(HealthCheckApi);
@@ -469,7 +472,10 @@ function DependencyMapContent() {
469
472
  {/* Top-right panel with actions */}
470
473
  <Panel position="top-right" className="flex gap-2">
471
474
  {hasUnsaved && (
472
- <Badge variant="warning" className="animate-pulse">
475
+ <Badge
476
+ variant="warning"
477
+ className={cn(!isLowPower && "animate-pulse")}
478
+ >
473
479
  Unsaved
474
480
  </Badge>
475
481
  )}
@@ -478,7 +484,7 @@ function DependencyMapContent() {
478
484
  size="sm"
479
485
  onClick={handleSave}
480
486
  disabled={saveMutation.isPending || !hasUnsaved}
481
- className="bg-card/90 backdrop-blur-sm"
487
+ className={cn(isLowPower ? "bg-card" : "bg-card/90 backdrop-blur-sm")}
482
488
  >
483
489
  <Save className="h-4 w-4 mr-1" />
484
490
  {saveMutation.isPending ? "Saving..." : "Save Layout"}
@@ -491,7 +497,7 @@ function DependencyMapContent() {
491
497
  void refetchWarnings();
492
498
  void refetchPositions();
493
499
  }}
494
- className="bg-card/90 backdrop-blur-sm"
500
+ className={cn(isLowPower ? "bg-card" : "bg-card/90 backdrop-blur-sm")}
495
501
  >
496
502
  <RefreshCw className="h-4 w-4 mr-1" />
497
503
  Refresh
@@ -500,7 +506,7 @@ function DependencyMapContent() {
500
506
  variant="outline"
501
507
  size="sm"
502
508
  onClick={() => fitView({ padding: 0.3 })}
503
- className="bg-card/90 backdrop-blur-sm"
509
+ className={cn(isLowPower ? "bg-card" : "bg-card/90 backdrop-blur-sm")}
504
510
  >
505
511
  <Maximize2 className="h-4 w-4 mr-1" />
506
512
  Fit
@@ -509,7 +515,12 @@ function DependencyMapContent() {
509
515
 
510
516
  {/* Bottom-left legend */}
511
517
  <Panel position="bottom-left">
512
- <div className="bg-card/90 backdrop-blur-sm border border-border rounded-lg p-3 shadow-lg max-w-64">
518
+ <div
519
+ className={cn(
520
+ "border border-border rounded-lg p-3 shadow-lg max-w-64",
521
+ isLowPower ? "bg-card" : "bg-card/90 backdrop-blur-sm",
522
+ )}
523
+ >
513
524
  <p className="text-xs font-semibold text-muted-foreground mb-2 uppercase tracking-wider">
514
525
  Legend
515
526
  </p>
@@ -590,7 +601,12 @@ function DependencyMapContent() {
590
601
  }).isLocked;
591
602
  return (
592
603
  <Panel position="top-left">
593
- <div className="bg-card/95 backdrop-blur-sm border border-border rounded-lg shadow-lg p-4 w-72 space-y-3">
604
+ <div
605
+ className={cn(
606
+ "border border-border rounded-lg shadow-lg p-4 w-72 space-y-3",
607
+ isLowPower ? "bg-card" : "bg-card/95 backdrop-blur-sm",
608
+ )}
609
+ >
594
610
  <div className="space-y-1">
595
611
  <p className="text-sm font-semibold text-foreground">
596
612
  {edgeSourceLocked ? "Dependency (GitOps)" : "Edit Dependency"}
@@ -1,5 +1,6 @@
1
1
  import { memo } from "react";
2
2
  import { Handle, Position, type NodeProps, type Node } from "@xyflow/react";
3
+ import { cn, usePerformance } from "@checkstack/ui";
3
4
 
4
5
  export interface SystemNodeData extends Record<string, unknown> {
5
6
  label: string;
@@ -59,6 +60,7 @@ export const SystemNodeComponent = memo(function SystemNodeComponent({
59
60
  data,
60
61
  selected,
61
62
  }: NodeProps<SystemNode>) {
63
+ const { isLowPower } = usePerformance();
62
64
  const effectiveStatus = combineStatus(data.status, data.derivedState);
63
65
  const styles = statusStyles[effectiveStatus];
64
66
  const hasConnections = data.upstreamCount > 0 || data.downstreamCount > 0;
@@ -73,14 +75,16 @@ export const SystemNodeComponent = memo(function SystemNodeComponent({
73
75
  />
74
76
 
75
77
  <div
76
- className={`
77
- rounded-xl border-2 shadow-lg backdrop-blur-sm
78
- transition-all duration-200
79
- ${styles.border} ${styles.bg} ${styles.glow}
80
- ${selected ? "ring-2 ring-primary ring-offset-2 ring-offset-background" : ""}
81
- hover:scale-[1.02] cursor-grab active:cursor-grabbing
82
- min-w-[140px] max-w-[220px] overflow-hidden
83
- `}
78
+ className={cn(
79
+ "rounded-xl border-2 shadow-lg",
80
+ !isLowPower && "backdrop-blur-sm transition-all duration-200",
81
+ styles.border,
82
+ styles.bg,
83
+ styles.glow,
84
+ selected && "ring-2 ring-primary ring-offset-2 ring-offset-background",
85
+ !isLowPower && "hover:scale-[1.02]",
86
+ "cursor-grab active:cursor-grabbing min-w-[140px] max-w-[220px] overflow-hidden",
87
+ )}
84
88
  >
85
89
  {/* Main body */}
86
90
  <div className="px-4 py-3">
@@ -90,7 +94,7 @@ export const SystemNodeComponent = memo(function SystemNodeComponent({
90
94
  <div
91
95
  className={`w-2.5 h-2.5 rounded-full ${styles.dot}`}
92
96
  />
93
- {effectiveStatus !== "operational" && (
97
+ {effectiveStatus !== "operational" && !isLowPower && (
94
98
  <div
95
99
  className={`absolute inset-0 w-2.5 h-2.5 rounded-full ${styles.dot} animate-ping opacity-75`}
96
100
  />