@checkstack/anomaly-frontend 0.4.4 → 0.4.6

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,54 @@
1
1
  # @checkstack/anomaly-frontend
2
2
 
3
+ ## 0.4.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [ba07ae2]
8
+ - @checkstack/healthcheck-common@1.2.0
9
+ - @checkstack/healthcheck-frontend@0.20.0
10
+
11
+ ## 0.4.5
12
+
13
+ ### Patch Changes
14
+
15
+ - f23f3c9: Gate decorative motion and blur effects behind
16
+ `usePerformance().isLowPower` on a focused set of high-traffic plugin
17
+ pages (Dashboard, Dependency map, System node, Notification bell,
18
+ Announcement banner / cards, Anomaly field overrides editor, SLO
19
+ attribution chart, Catalog droppable group). Hover scales, backdrop
20
+ blurs, `animate-pulse`/`animate-ping` accents, and entry transitions
21
+ now drop to static states on low-power devices; functional UX
22
+ transitions (Drawer/Dialog open-close, colour transitions) are left
23
+ alone.
24
+
25
+ Standardise the post-mutation error-toast voice on plugin pages by
26
+ migrating multi-clause `toast.error(extractErrorMessage(error, "Failed
27
+ to X"))` call sites onto the `toastError(toast, "Failed to X", error)`
28
+ helper from `@checkstack/ui`. The helper applies the canonical
29
+ `"action: message"` prefix and 100-character truncation in one place,
30
+ and the now-orphaned `extractErrorMessage` imports are dropped from
31
+ the affected files. No business logic or component APIs changed.
32
+
33
+ - Updated dependencies [f23f3c9]
34
+ - Updated dependencies [f23f3c9]
35
+ - Updated dependencies [f23f3c9]
36
+ - Updated dependencies [f23f3c9]
37
+ - Updated dependencies [f23f3c9]
38
+ - Updated dependencies [f23f3c9]
39
+ - Updated dependencies [f23f3c9]
40
+ - Updated dependencies [f23f3c9]
41
+ - @checkstack/common@0.11.0
42
+ - @checkstack/healthcheck-frontend@0.19.5
43
+ - @checkstack/notification-common@1.2.0
44
+ - @checkstack/notification-frontend@0.4.5
45
+ - @checkstack/frontend-api@0.5.2
46
+ - @checkstack/ui@1.10.0
47
+ - @checkstack/anomaly-common@1.2.2
48
+ - @checkstack/catalog-common@2.2.2
49
+ - @checkstack/healthcheck-common@1.1.2
50
+ - @checkstack/signal-frontend@0.1.4
51
+
3
52
  ## 0.4.4
4
53
 
5
54
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/anomaly-frontend",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
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/anomaly-common": "1.2.0",
17
- "@checkstack/catalog-common": "2.2.0",
18
- "@checkstack/common": "0.10.0",
19
- "@checkstack/frontend-api": "0.5.1",
20
- "@checkstack/healthcheck-common": "1.1.0",
21
- "@checkstack/healthcheck-frontend": "0.19.3",
22
- "@checkstack/notification-common": "1.1.0",
23
- "@checkstack/notification-frontend": "0.4.3",
24
- "@checkstack/signal-frontend": "0.1.3",
25
- "@checkstack/ui": "1.8.3",
16
+ "@checkstack/anomaly-common": "1.2.2",
17
+ "@checkstack/catalog-common": "2.2.2",
18
+ "@checkstack/common": "0.11.0",
19
+ "@checkstack/frontend-api": "0.5.2",
20
+ "@checkstack/healthcheck-common": "1.1.2",
21
+ "@checkstack/healthcheck-frontend": "0.19.5",
22
+ "@checkstack/notification-common": "1.2.0",
23
+ "@checkstack/notification-frontend": "0.4.5",
24
+ "@checkstack/signal-frontend": "0.1.4",
25
+ "@checkstack/ui": "1.10.0",
26
26
  "date-fns": "^4.1.0",
27
27
  "lucide-react": "^0.344.0",
28
28
  "react": "^18.2.0",
@@ -30,7 +30,7 @@
30
30
  "zod": "^4.2.1"
31
31
  },
32
32
  "devDependencies": {
33
- "@checkstack/scripts": "0.3.2",
33
+ "@checkstack/scripts": "0.3.3",
34
34
  "@checkstack/tsconfig": "0.0.7",
35
35
  "@types/react": "^18.2.0",
36
36
  "typescript": "^5.0.0"
@@ -24,6 +24,8 @@ import {
24
24
  Slider,
25
25
  Input,
26
26
  Tooltip,
27
+ cn,
28
+ usePerformance,
27
29
  } from "@checkstack/ui";
28
30
  import type {
29
31
  AnomalyFieldConfig,
@@ -362,6 +364,7 @@ function FieldAccordionItem({
362
364
  onResetField,
363
365
  applyPreset,
364
366
  }: FieldAccordionItemProps) {
367
+ const { isLowPower } = usePerformance();
365
368
  const [advancedOpen, setAdvancedOpen] = useState(preset === "custom");
366
369
  // Tracks an explicit "Custom" click — needed because clicking Custom doesn't
367
370
  // change values, so `detectPreset` still resolves to whatever the prior
@@ -400,10 +403,13 @@ function FieldAccordionItem({
400
403
  return (
401
404
  <AccordionItem
402
405
  value={field}
403
- className={`
404
- rounded-xl border bg-card text-card-foreground shadow-sm transition-all duration-200 overflow-hidden
405
- ${isOverridden ? "border-primary/40 shadow-md" : "border-border/40 opacity-80 hover:opacity-100"}
406
- `}
406
+ className={cn(
407
+ "rounded-xl border bg-card text-card-foreground shadow-sm overflow-hidden",
408
+ !isLowPower && "transition-all duration-200",
409
+ isOverridden
410
+ ? "border-primary/40 shadow-md"
411
+ : "border-border/40 opacity-80 hover:opacity-100",
412
+ )}
407
413
  >
408
414
  <AccordionTrigger className="px-5 py-4 hover:no-underline">
409
415
  <div className="flex items-center justify-between flex-1 gap-4 mr-4">
@@ -544,6 +550,7 @@ interface PresetSelectorProps {
544
550
  }
545
551
 
546
552
  function PresetSelector({ value, onChange, disabled }: PresetSelectorProps) {
553
+ const { isLowPower } = usePerformance();
547
554
  const options: Preset[] = ["strict", "balanced", "relaxed", "custom"];
548
555
  const description =
549
556
  value === "custom"
@@ -567,16 +574,14 @@ function PresetSelector({ value, onChange, disabled }: PresetSelectorProps) {
567
574
  type="button"
568
575
  onClick={() => onChange(opt)}
569
576
  disabled={disabled}
570
- className={`
571
- px-4 py-1.5 text-xs font-semibold rounded-md transition-all
572
- ${
573
- selected
574
- ? "bg-background text-foreground shadow-sm"
575
- : "text-muted-foreground hover:text-foreground"
576
- }
577
- disabled:opacity-50 disabled:cursor-not-allowed
578
- capitalize
579
- `}
577
+ className={cn(
578
+ "px-4 py-1.5 text-xs font-semibold rounded-md",
579
+ !isLowPower && "transition-all",
580
+ selected
581
+ ? "bg-background text-foreground shadow-sm"
582
+ : "text-muted-foreground hover:text-foreground",
583
+ "disabled:opacity-50 disabled:cursor-not-allowed capitalize",
584
+ )}
580
585
  >
581
586
  {opt}
582
587
  </button>
@@ -667,6 +672,7 @@ function AdvancedDisclosure({
667
672
  onToggle,
668
673
  children,
669
674
  }: AdvancedDisclosureProps) {
675
+ const { isLowPower } = usePerformance();
670
676
  return (
671
677
  <div className="border border-border/40 rounded-md bg-background/30">
672
678
  <button
@@ -676,7 +682,11 @@ function AdvancedDisclosure({
676
682
  >
677
683
  <span>Advanced</span>
678
684
  <ChevronDown
679
- className={`w-4 h-4 transition-transform ${open ? "rotate-180" : ""}`}
685
+ className={cn(
686
+ "w-4 h-4",
687
+ !isLowPower && "transition-transform",
688
+ open && "rotate-180",
689
+ )}
680
690
  />
681
691
  </button>
682
692
  {open && (