Skip to content

Commit

Permalink
Change 'publish date' to 'last released' to avoid confusion when sort…
Browse files Browse the repository at this point in the history
…ing by date added
  • Loading branch information
holly-cummins committed Jan 10, 2025
1 parent e0869a4 commit 214143f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/extension-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Card = styled(props => <Link {...props} />)`
background: var(--card-background-color) 0 0 no-repeat padding-box;
color: var(--main-text-color);
border: ${props =>
props.$unlisted || props.$superseded ? "1px solid var(--unlisted-outline-color)" : "1px solid var(--card-outline)"};
props.$unlisted || props.$superseded ? "1px solid var(--unlisted-outline-color)" : "1px solid var(--card-outline)"};
border-radius: 10px;
opacity: 1;
display: flex;
Expand Down Expand Up @@ -141,7 +141,7 @@ const ExtensionCard = ({ extension }) => {
<ExtensionInfo>
{extension.metadata.maven?.timestamp &&
isValid(+extension.metadata.maven?.timestamp)
? `Publish Date: ${format(
? `Last Released: ${format(
new Date(+extension.metadata.maven.timestamp),
"MMM dd, yyyy"
)}`
Expand Down
4 changes: 2 additions & 2 deletions src/components/extension-card.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ describe("extension card", () => {
expect(screen.getByText("Latest Version: " + version)).toBeTruthy()
})

it("renders the publish date", () => {
expect(screen.getByText("Publish Date: Oct 25, 2022")).toBeTruthy()
it("renders the Last Released", () => {
expect(screen.getByText("Last Released: Oct 25, 2022")).toBeTruthy()
})

it("renders a placeholder image with appropriate source", async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/templates/extension-detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ const ExtensionDetailTemplate = ({
/>
<ExtensionMetadata
data={{
name: "Publish Date",
name: "Last Released",
// Count dates of 0 as undefined, so we don't render them
text: metadata.maven?.timestamp > 0 ? metadata.maven?.timestamp : undefined,
transformer: timestamp =>
Expand Down
4 changes: 2 additions & 2 deletions src/templates/extension-detail.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe("extension detail page", () => {
})

it("renders the release date", () => {
const publishDate = "Publish Date"
const publishDate = "Last Released"
expect(screen.getByText(publishDate)).toBeTruthy()
const dateSection = screen.getByText(publishDate).closest("section")

Expand Down Expand Up @@ -666,7 +666,7 @@ describe("extension detail page", () => {
})

it("does not render a release date", () => {
const publishDate = "Publish Date"
const publishDate = "Last Released"
expect(screen.queryByText(publishDate)).toBeFalsy()
})
})
Expand Down
2 changes: 1 addition & 1 deletion test-integration/detail-page.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe("an extension details page", () => {

it("should have a publish date", async () => {
await expect(
page.waitForSelector(`xpath///*[text()="Publish Date"]`)
page.waitForSelector(`xpath///*[text()="Last Released"]`)
).resolves.toBeTruthy()
})

Expand Down

0 comments on commit 214143f

Please sign in to comment.