Skip to content

Commit 7183b3d

Browse files
authored
Fix some changelog issues, and broader mobile padding issues (#3246)
1 parent 0ac49d8 commit 7183b3d

File tree

7 files changed

+92
-80
lines changed

7 files changed

+92
-80
lines changed

apps/frontend/src/layouts/default.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,10 +1444,6 @@ function hideStagingBanner() {
14441444
.mobile-navigation {
14451445
display: flex;
14461446
}
1447-
1448-
main {
1449-
padding-top: 1.5rem;
1450-
}
14511447
}
14521448
</style>
14531449
<style src="vue-multiselect/dist/vue-multiselect.css"></style>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<template>
2+
<div class="page experimental-styles-within">
3+
<h1 class="m-0 text-3xl font-extrabold">Changelog</h1>
4+
<p class="my-3">Keep up-to-date on what's new with Modrinth.</p>
5+
<NuxtPage />
6+
</div>
7+
</template>
8+
9+
<style lang="scss" scoped>
10+
.page {
11+
padding: 1rem;
12+
margin-left: auto;
13+
margin-right: auto;
14+
max-width: 56rem;
15+
}
16+
</style>

apps/frontend/src/pages/news/changelog/[product]/[date].vue

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,23 @@ if (!changelogEntry.value) {
3232
</script>
3333

3434
<template>
35-
<div v-if="changelogEntry" class="page experimental-styles-within">
35+
<div v-if="changelogEntry">
3636
<nuxt-link
3737
:to="`/news/changelog?filter=${changelogEntry.product}`"
38-
class="mb-4 flex w-fit items-center gap-2 text-link"
38+
class="mb-4 mt-4 flex w-fit items-center gap-2 text-link"
3939
>
4040
<ChevronLeftIcon /> View full changelog
4141
</nuxt-link>
4242
<div class="relative flex flex-col gap-4 pb-6">
4343
<div class="absolute flex h-full w-4 justify-center">
4444
<div class="timeline-indicator" :class="{ first: isFirst }" />
4545
</div>
46-
<ChangelogEntry :entry="changelogEntry" :first="isFirst" show-type class="relative z-10" />
46+
<ChangelogEntry :entry="changelogEntry" :first="isFirst" show-type class="relative z-[1]" />
4747
</div>
4848
</div>
4949
</template>
5050

5151
<style lang="scss" scoped>
52-
.page {
53-
padding: 0.5rem;
54-
margin-left: auto;
55-
margin-right: auto;
56-
max-width: 56rem;
57-
}
58-
5952
.timeline-indicator {
6053
background-image: linear-gradient(
6154
to bottom,

apps/frontend/src/pages/news/changelog/index.vue

Lines changed: 34 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -29,56 +29,45 @@ const changelogEntries = computed(() =>
2929
</script>
3030

3131
<template>
32-
<div class="page experimental-styles-within">
33-
<h1 class="m-0 text-3xl font-extrabold">Changelog</h1>
34-
<p class="my-3">Keep up-to-date on what's new with Modrinth.</p>
35-
<NavTabs
36-
:links="[
37-
{
38-
label: 'All',
39-
href: '',
40-
},
41-
{
42-
label: 'Website',
43-
href: 'web',
44-
},
45-
{
46-
label: 'Servers',
47-
href: 'servers',
48-
},
49-
{
50-
label: 'App',
51-
href: 'app',
52-
},
53-
]"
54-
query="filter"
55-
class="mb-4"
56-
/>
57-
<div class="relative flex flex-col gap-4 pb-6">
58-
<div class="absolute flex h-full w-4 justify-center">
59-
<div class="timeline-indicator" />
60-
</div>
61-
<ChangelogEntry
62-
v-for="(entry, index) in changelogEntries"
63-
:key="entry.date"
64-
:entry="entry"
65-
:first="index === 0"
66-
:show-type="filter === undefined"
67-
has-link
68-
class="relative z-10"
69-
/>
32+
<NavTabs
33+
:links="[
34+
{
35+
label: 'All',
36+
href: '',
37+
},
38+
{
39+
label: 'Website',
40+
href: 'web',
41+
},
42+
{
43+
label: 'Servers',
44+
href: 'servers',
45+
},
46+
{
47+
label: 'App',
48+
href: 'app',
49+
},
50+
]"
51+
query="filter"
52+
class="mb-4"
53+
/>
54+
<div class="relative flex flex-col gap-4 pb-6">
55+
<div class="absolute flex h-full w-4 justify-center">
56+
<div class="timeline-indicator" />
7057
</div>
58+
<ChangelogEntry
59+
v-for="(entry, index) in changelogEntries"
60+
:key="entry.date"
61+
:entry="entry"
62+
:first="index === 0"
63+
:show-type="filter === undefined"
64+
has-link
65+
class="relative z-[1]"
66+
/>
7167
</div>
7268
</template>
7369

7470
<style lang="scss" scoped>
75-
.page {
76-
padding: 0.5rem;
77-
margin-left: auto;
78-
margin-right: auto;
79-
max-width: 56rem;
80-
}
81-
8271
.timeline-indicator {
8372
background-image: linear-gradient(
8473
to bottom,

apps/frontend/src/pages/report.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ const messages = defineMessages({
607607

608608
<style scoped lang="scss">
609609
.page {
610-
padding: 0.5rem;
610+
padding: 1rem;
611611
margin-left: auto;
612612
margin-right: auto;
613613
max-width: 56rem;

packages/ui/src/components/changelog/ChangelogEntry.vue

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,30 @@
55
class="h-4 w-4 rounded-full border-2 border-solid border-button-border"
66
:class="recent || first ? 'bg-brand' : 'bg-button-bg'"
77
/>
8-
<AutoLink
9-
:to="
10-
hasLink ? `/news/changelog/${entry.product}/${entry.version ?? entry.date.unix()}` : ''
11-
"
12-
class="flex items-center gap-2"
13-
:class="{ 'hover:underline': hasLink }"
14-
>
15-
<h2 class="flex items-center gap-2 m-0 text-xl font-extrabold text-contrast">
16-
<template v-if="showType">
17-
{{ formatMessage(messages[entry.product]) }}
18-
<div class="w-2 h-2 rounded-full bg-secondary" />
19-
</template>
20-
<span :class="{ 'text-primary font-bold': showType }">
21-
{{ entry.version ?? formattedDate }}
22-
</span>
23-
</h2>
24-
<div v-if="entry.version" v-tooltip="dateTooltip" :class="{ 'cursor-help': dateTooltip }">
25-
{{ formattedDate }}
8+
<div class="flex flex-wrap items-center gap-2">
9+
<AutoLink
10+
:to="
11+
hasLink ? `/news/changelog/${entry.product}/${entry.version ?? entry.date.unix()}` : ''
12+
"
13+
:class="{ 'hover:underline': hasLink }"
14+
>
15+
<h2 class="flex items-center gap-2 m-0 text-xl font-extrabold text-contrast">
16+
<template v-if="showType">
17+
{{ formatMessage(messages[entry.product]) }}
18+
<div class="w-2 h-2 rounded-full bg-secondary" />
19+
</template>
20+
<span :class="{ 'text-primary font-bold': showType }">
21+
{{ entry.version ?? formattedDate }}
22+
</span>
23+
</h2>
24+
</AutoLink>
25+
<div v-if="recent" v-tooltip="dateTooltip" class="hidden sm:flex" :class="{ 'cursor-help': dateTooltip }">
26+
{{ relativeDate }}
2627
</div>
27-
</AutoLink>
28+
<div v-else-if="entry.version" :class="{ 'cursor-help': dateTooltip }">
29+
{{ longDate }}
30+
</div>
31+
</div>
2832
</div>
2933
<div class="ml-8 mt-3 rounded-2xl bg-bg-raised px-4 py-3">
3034
<div class="changelog-body" v-html="renderHighlightedString(entry.body)" />
@@ -63,6 +67,10 @@ const formattedDate = computed(() =>
6367
props.entry.version ? props.entry.date.fromNow() : props.entry.date.format('MMMM D, YYYY'),
6468
)
6569
70+
const relativeDate = computed(() => props.entry.date.fromNow())
71+
const longDate = computed(() => props.entry.date.format('MMMM D, YYYY'))
72+
const versionName = computed(() => props.entry.version ?? longDate.value)
73+
6674
const messages = defineMessages({
6775
web: {
6876
id: 'changelog.product.web',
@@ -85,6 +93,7 @@ const messages = defineMessages({
8593
<style lang="scss" scoped>
8694
:deep(.changelog-body) {
8795
line-height: 1.4;
96+
word-break: break-word;
8897
8998
h1,
9099
h2,

packages/utils/changelog.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ export type VersionEntry = {
1010
}
1111

1212
const VERSIONS: VersionEntry[] = [
13+
{
14+
date: `2025-02-11T13:00:00-09:00`,
15+
product: 'web',
16+
body: `### Improvements
17+
- Added project issues link to report page if present.
18+
- Added relative times for all recent versions to changelog page.
19+
- Added header to changelog sub-pages.
20+
- Fixed various padding issues and changelog overlapping navbar on mobile.`,
21+
},
1322
{
1423
date: `2025-02-11T09:00:00-09:00`,
1524
product: 'web',
@@ -84,7 +93,7 @@ Contributed by [IMB11](https://github.com/modrinth/code/pull/1301).`,
8493
product: 'web',
8594
body: `### Improvements
8695
- Tags on project pages are now clickable to view other projects with that tag (Contributed by [Neddo](https://github.com/modrinth/code/pull/3126))
87-
- You can now send someone a link to the download interface with a specific version and loader selected, like so: https://modrinth.com/mod/sodium?version=1.21.2&loader=quilt#download (Contributed by [AwakenedRedstone](https://github.com/modrinth/code/pull/3138)`,
96+
- You can now send someone a link to the download interface with a specific version and loader selected, like so: https://modrinth.com/mod/sodium?version=1.21.2&loader=quilt#download (Contributed by [AwakenedRedstone](https://github.com/modrinth/code/pull/3138))`,
8897
},
8998
{
9099
date: `2024-12-25T14:00:00-09:00`,

0 commit comments

Comments
 (0)