Skip to content

Commit 0f81abb

Browse files
committed
Wording and visual changes suggested by James Cobb
1 parent 5b7ceb6 commit 0f81abb

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/components/extensions-list.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ const RightColumn = styled.div`
2828
width: 100%;
2929
`
3030

31-
const ExtensionCount = styled.div`
31+
const ExtensionCount = styled.h2`
3232
margin-top: 1.25rem;
3333
margin-left: 3.25rem;
34+
margin-bottom: 0.5rem;
3435
width: 100%;
36+
font-size: 1.25rem;
37+
font-weight: 400;
3538
`
3639

3740
const ExtensionsList = ({ extensions, categories }) => {
@@ -54,8 +57,8 @@ const ExtensionsList = ({ extensions, categories }) => {
5457

5558
const countMessage =
5659
extensionCount === filteredExtensions.length
57-
? `Showing ${extensionCount} extensions.`
58-
: `Showing ${filteredExtensions.length} of ${extensionCount} extensions.`
60+
? `Showing ${extensionCount} extensions`
61+
: `Showing ${filteredExtensions.length} matching of ${extensionCount} extensions`
5962

6063
return (
6164
<FilterableList className="extensions-list">

src/components/extensions-list.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ describe("extension list", () => {
8888
it("displays a brief message about how many extensions there are", async () => {
8989
// The superceded extension should not be counted
9090
const num = extensions.length - 1
91-
expect(screen.getByText(`Showing ${num} extensions.`)).toBeTruthy()
91+
expect(screen.getByText(`Showing ${num} extensions`)).toBeTruthy()
9292
})
9393

9494
describe("searching and filtering", () => {
@@ -138,7 +138,7 @@ describe("extension list", () => {
138138

139139
const total = extensions.length - 1
140140
expect(
141-
screen.getByText(`Showing 2 of ${total} extensions.`)
141+
screen.getByText(`Showing 2 matching of ${total} extensions`)
142142
).toBeTruthy()
143143
})
144144
})

0 commit comments

Comments
 (0)