Skip to content

Commit af75fa9

Browse files
authored
Update wording in the "sorting dropdown" of the variant analysis results view (#2373)
1 parent 8c9c38e commit af75fa9

File tree

6 files changed

+22
-18
lines changed

6 files changed

+22
-18
lines changed

docs/test-plan.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,10 @@ This requires running a MRVA query and seeing the results view.
258258
2. When the file does not exist
259259
7. Can open query text
260260
8. Can sort repos
261-
1. By name
262-
2. By results
263-
3. By stars
264-
4. By last updated
261+
1. Alphabetically
262+
2. By number of results
263+
3. By popularity
264+
4. By most recent commit
265265
9. Can filter repos
266266
10. Shows correct statistics
267267
1. Total number of results

extensions/ql-vscode/src/view/common/LastUpdated.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const LastUpdated = ({ lastUpdated }: Props) => {
3434
return (
3535
<div>
3636
<IconContainer>
37-
<Codicon name="repo-push" label="Last updated" />
37+
<Codicon name="repo-push" label="Most recent commit" />
3838
</IconContainer>
3939
<Duration>{humanizeRelativeTime(date.getTime() - Date.now())}</Duration>
4040
</div>

extensions/ql-vscode/src/view/variant-analysis/RepositoriesSort.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ export const RepositoriesSort = ({ value, onChange, className }: Props) => {
2929
return (
3030
<Dropdown value={value} onInput={handleInput} className={className}>
3131
<Codicon name="sort-precedence" label="Sort..." slot="indicator" />
32-
<VSCodeOption value={SortKey.Name}>Name</VSCodeOption>
33-
<VSCodeOption value={SortKey.ResultsCount}>Results</VSCodeOption>
34-
<VSCodeOption value={SortKey.Stars}>Stars</VSCodeOption>
35-
<VSCodeOption value={SortKey.LastUpdated}>Last updated</VSCodeOption>
32+
<VSCodeOption value={SortKey.Name}>Alphabetically</VSCodeOption>
33+
<VSCodeOption value={SortKey.ResultsCount}>
34+
Number of results
35+
</VSCodeOption>
36+
<VSCodeOption value={SortKey.Stars}>Popularity</VSCodeOption>
37+
<VSCodeOption value={SortKey.LastUpdated}>
38+
Most recent commit
39+
</VSCodeOption>
3640
</Dropdown>
3741
);
3842
};

extensions/ql-vscode/src/view/variant-analysis/__tests__/RepoRow.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe(RepoRow.name, () => {
3939
screen.queryByRole("img", {
4040
// There should not be any icons, except for the icons which are always shown
4141
name: (name) =>
42-
!["expand", "stars count", "last updated"].includes(
42+
!["expand", "stars count", "most recent commit"].includes(
4343
name.toLowerCase(),
4444
),
4545
}),
@@ -293,7 +293,7 @@ describe(RepoRow.name, () => {
293293
expect(screen.getByText("last month")).toBeInTheDocument();
294294
expect(
295295
screen.getByRole("img", {
296-
name: "Last updated",
296+
name: "Most recent commit",
297297
}),
298298
).toBeInTheDocument();
299299
});
@@ -314,7 +314,7 @@ describe(RepoRow.name, () => {
314314
).not.toBeInTheDocument();
315315
expect(
316316
screen.queryByRole("img", {
317-
name: "Last updated",
317+
name: "Most recent commit",
318318
}),
319319
).not.toBeInTheDocument();
320320
});

extensions/ql-vscode/src/view/variant-analysis/__tests__/VariantAnalysisAnalyzedRepos.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ describe(VariantAnalysisAnalyzedRepos.name, () => {
206206
expect(rows[5]).toHaveTextContent("octodemo/hello-world-6");
207207
});
208208

209-
it("uses the results count sort key", async () => {
209+
it("uses the 'Number of results' sort key", async () => {
210210
render({
211211
filterSortState: {
212212
...defaultFilterSortState,

extensions/ql-vscode/test/unit-tests/variant-analysis-filter-sort.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ describe(compareRepository.name, () => {
127127
});
128128
});
129129

130-
describe("when sort key is name", () => {
130+
describe("when sort key is 'Alphabetically'", () => {
131131
const sorter = compareRepository({
132132
...defaultFilterSortState,
133133
sortKey: SortKey.Name,
@@ -153,7 +153,7 @@ describe(compareRepository.name, () => {
153153
});
154154
});
155155

156-
describe("when sort key is stars", () => {
156+
describe("when sort key is 'Popularity'", () => {
157157
const sorter = compareRepository({
158158
...defaultFilterSortState,
159159
sortKey: SortKey.Stars,
@@ -199,7 +199,7 @@ describe(compareRepository.name, () => {
199199
});
200200
});
201201

202-
describe("when sort key is last updated", () => {
202+
describe("when sort key is 'Most recent commit'", () => {
203203
const sorter = compareRepository({
204204
...defaultFilterSortState,
205205
sortKey: SortKey.LastUpdated,
@@ -271,7 +271,7 @@ describe(compareWithResults.name, () => {
271271
});
272272
});
273273

274-
describe("when sort key is stars", () => {
274+
describe("when sort key is 'Popularity'", () => {
275275
const sorter = compareWithResults({
276276
...defaultFilterSortState,
277277
sortKey: SortKey.Stars,
@@ -297,7 +297,7 @@ describe(compareWithResults.name, () => {
297297
});
298298
});
299299

300-
describe("when sort key is last updated", () => {
300+
describe("when sort key is 'Most recent commit'", () => {
301301
const sorter = compareWithResults({
302302
...defaultFilterSortState,
303303
sortKey: SortKey.LastUpdated,

0 commit comments

Comments
 (0)