Skip to content

refactor: introduce PageHeader component#6629

Open
IMB11 wants to merge 12 commits into
mainfrom
cal/page-header-component
Open

refactor: introduce PageHeader component#6629
IMB11 wants to merge 12 commits into
mainfrom
cal/page-header-component

Conversation

@IMB11

@IMB11 IMB11 commented Jul 6, 2026

Copy link
Copy Markdown
Member

No description provided.

@modrinth-bot

Copy link
Copy Markdown
Member

Pull request changelog

App

Added

Changed

Deprecated

Removed

Fixed

Security

Website

Added

Changed

Deprecated

Removed

Fixed

Security

Hosting

Added

Changed

Deprecated

Removed

Fixed

Security

@modrinth-bot

modrinth-bot commented Jul 6, 2026

Copy link
Copy Markdown
Member

@IMB11 IMB11 marked this pull request as ready for review July 6, 2026 09:49
@IMB11 IMB11 requested a review from a team July 6, 2026 09:49
@IMB11 IMB11 added the frontend Involves work from the frontend team label Jul 6, 2026
const resolvedTooltip = computed(() => props.tooltip ?? (absoluteDate.value || undefined))
const displayLabel = computed(() => [props.label, formattedDate.value].filter(Boolean).join(' '))

function formatRelativeDate(date: Date, locale?: string) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels like it should be a global function and not specific to this component. we def already have one no?

defineProps<{
project: HeaderProject
projectV3?: HeaderProjectV3 | null
isServerProject?: boolean

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why's this not just calculated from projectV3?

:value="project.downloads"
:label="formatMessage(messages.downloadsStat, { count: project.downloads })"
:tooltip="formatNumber(project.downloads)"
class="cursor-help"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i regret adding the cursor-help thing, we should remove and not use that in places like this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Involves work from the frontend team

Development

Successfully merging this pull request may close these issues.

3 participants