Skip to content

Commit bb8b0d9

Browse files
Merge pull request #704 from lukecotter/feat-optimised-timeline-set-default
feat: Enable new timeline by default
2 parents 26bd1b4 + 35c2a37 commit bb8b0d9

3 files changed

Lines changed: 8 additions & 11 deletions

File tree

lana/package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,11 @@
169169
"description": "Colors used for each event type on the Timeline",
170170
"additionalProperties": false
171171
},
172-
"lana.timeline.experimental.timeline": {
173-
"title": "Enable the new experimental Timeline",
172+
"lana.timeline.legacy": {
173+
"title": "Enable/ disable the legacy timeline. Default is false.",
174174
"type": "boolean",
175175
"default": false,
176-
"description": "Enables the faster experimental Timeline",
177-
"tags": [
178-
"experimental"
179-
]
176+
"description": "Enable/ disable the legacy timeline. Default is false."
180177
}
181178
}
182179
}

log-viewer/src/features/settings/Settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export type LanaSettings = {
1515
SOQL: '#5D4963';
1616
'System Method': '#5C3444';
1717
};
18-
experimental: { timeline: boolean };
18+
legacy: boolean;
1919
};
2020
};
2121

log-viewer/src/features/timeline/components/TimelineView.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class TimelineView extends LitElement {
2525
timelineKeys: TimelineGroup[] = [];
2626

2727
@state()
28-
private isNewTimelineEnabled: boolean | null = null;
28+
private useLegacyTimeline: boolean | null = null;
2929

3030
constructor() {
3131
super();
@@ -48,14 +48,14 @@ export class TimelineView extends LitElement {
4848
async connectedCallback() {
4949
super.connectedCallback();
5050
const settings = await getSettings();
51-
this.isNewTimelineEnabled = settings.timeline.experimental.timeline;
51+
this.useLegacyTimeline = settings.timeline.legacy;
5252
}
5353

5454
render() {
5555
let timelineBody;
56-
if (!this.timelineRoot || this.isNewTimelineEnabled === null) {
56+
if (!this.timelineRoot || this.useLegacyTimeline === null) {
5757
timelineBody = html`<timeline-skeleton></timeline-skeleton>`;
58-
} else if (this.isNewTimelineEnabled) {
58+
} else if (!this.useLegacyTimeline) {
5959
timelineBody = html`<timeline-flame-chart
6060
.apexLog=${this.timelineRoot}
6161
></timeline-flame-chart>`;

0 commit comments

Comments
 (0)