Skip to content

Commit 121b8ad

Browse files
committed
remove remaning use of custom computed based dacorator @uniquely
1 parent fe1b2f8 commit 121b8ad

2 files changed

Lines changed: 10 additions & 22 deletions

File tree

ui/app/components/line-chart.gjs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
import Component from '@glimmer/component';
77
import { tracked } from '@glimmer/tracking';
88
import { hash } from '@ember/helper';
9-
import { didInsert, didUpdate } from '@ember/render-modifiers';
9+
import { guidFor } from '@ember/object/internals';
1010
import { schedule, next } from '@ember/runloop';
11+
import { didInsert, didUpdate } from '@ember/render-modifiers';
1112
import d3 from 'd3-selection';
1213
import d3Scale from 'd3-scale';
1314
import d3Axis from 'd3-axis';
@@ -20,7 +21,6 @@ import Tooltip from 'nomad-ui/components/chart-primitives/tooltip';
2021
import VAnnotations from 'nomad-ui/components/chart-primitives/v-annotations';
2122
import windowResize from 'nomad-ui/modifiers/window-resize';
2223
import styleString from 'nomad-ui/utils/properties/glimmer-style-string';
23-
import uniquely from 'nomad-ui/utils/properties/uniquely';
2424

2525
const lerp = ([low, high], numPoints) => {
2626
const step = (high - low) / (numPoints - 1);
@@ -64,11 +64,16 @@ export default class LineChart extends Component {
6464
@tracked element = null;
6565
@tracked ready = false;
6666

67-
@uniquely('title') titleId;
68-
@uniquely('desc') descriptionId;
69-
7067
latestMouseX = 0;
7168

69+
get titleId() {
70+
return `title-${guidFor(this)}`;
71+
}
72+
73+
get descriptionId() {
74+
return `desc-${guidFor(this)}`;
75+
}
76+
7277
get xProp() {
7378
return this.args.xProp || 'time';
7479
}

ui/app/utils/properties/uniquely.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)