Skip to content

Commit f2d3fe2

Browse files
committed
Default sidebar to open
1 parent 1b39ae9 commit f2d3fe2

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

src/review/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export class ReviewComponent {
9090
private editingCommentKey?: string;
9191
private search: ReviewSearchState;
9292
private helpVisible = false;
93-
private fileSidebarVisible = false;
93+
private fileSidebarVisible = true;
9494

9595
private inlineAnnotationsVisible = true;
9696
private visibleExplanationKeys = new Set<string>();

test/review/component.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ describe("ReviewComponent", () => {
274274
() => undefined,
275275
);
276276

277+
highlightedComponent.handleInput("t");
277278
(highlightedComponent as any).search.query = "needle";
278279
(highlightedComponent as any).search.jump(1, 0);
279280
const output = highlightedComponent.render(200).join("\n");
@@ -287,6 +288,7 @@ describe("ReviewComponent", () => {
287288

288289
(component as any).selected = 2;
289290
component.handleInput("f");
291+
component.handleInput("t");
290292
const output = component.render(100).join("\n");
291293

292294
assert.match(output, /src\/a\.ts/);
@@ -314,15 +316,11 @@ describe("ReviewComponent", () => {
314316
});
315317

316318
(component as any).selected = 2;
317-
component.handleInput("t");
318319
let output = component.render(100).join("\n");
319320
assert.match(output, /src\/a\.ts/);
320321
assert.match(output, /src\/b\.ts/);
321322
assert.doesNotMatch(output, /Files/);
322-
assert.match(
323-
output,
324-
/\n<bg:selectedBg>src\/a\.ts\s+\+0 -0<\/bg:selectedBg>/,
325-
);
323+
assert.match(output, /<bg:selectedBg> src\/a\.ts \+0 -0/);
326324

327325
component.handleInput("]");
328326
output = component.render(100).join("\n");

0 commit comments

Comments
 (0)