Skip to content

Conversation

@rschristian
Copy link
Member

No description provided.

@github-actions
Copy link

github-actions bot commented Oct 10, 2025

Size Change: +61 B (+0.01%)

Total Size: 449 kB

Filename Size Change
build/assets/index-********.js 31.3 kB -1.82 kB (-5.5%)
build/assets/index-********.css 9.69 kB -156 B (-1.58%)
build/assets/blog-overview-********.js 369 B +369 B (new file) 🆕
build/assets/branding-********.js 366 B +366 B (new file) 🆕
build/assets/we-are-using-********.js 1.32 kB +1.32 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
build/assets/blog-page-********.js 257 B +3 B (+1.18%)
build/assets/docsearch-********.js 28.9 kB +1 B (0%)
build/assets/errors-********.js 342 B 0 B
build/assets/repl-********.css 1.51 kB 0 B
build/assets/repl-********.js 148 kB 0 B
build/assets/repl-page-********.js 7.66 kB +1 B (+0.01%)
build/assets/repl.worker-********.js 213 kB 0 B
build/assets/style-********.css 3.07 kB 0 B
build/assets/style.module-********.js 159 B 0 B
build/assets/tutorial-page-********.js 1.97 kB -21 B (-1.06%)
build/assets/tutorial-page-********.css 1.76 kB 0 B

compressed-size-action

Comment on lines +3 to +20
const LOGOS = [
{
name: 'logo-text',
alt: 'Full Logo'
},
{
name: 'logo-text-inverted',
alt: 'Full Logo with Inverted Colors'
},
{
name: 'symbol',
alt: 'Preact Symbol'
},
{
name: 'symbol-inverted',
alt: 'Preact Symbol with Inverted Colors'
}
];
Copy link
Member Author

Choose a reason for hiding this comment

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

Hoisting this out of the component made little sense, this was the only consumer (I wrote this, to be clear -- dunno why I did, but I did)

Comment on lines -59 to +76
"tutorial": {
"begin": {
"en": "Begin Tutorial",
"kr": "튜토리얼 시작",
"ru": "Начать обучение",
"zh": "开始教程"
},
"help": {
"en": "Help",
"ja": "助ける",
"kr": "정답 확인",
"ru": "Помощь",
"zh": "帮助"
},
"solve": {
"en": "Solve",
"ja": "説き明かす",
"ru": "Решить",
"zh": "解决"
}
"beginTutorial": {
"en": "Begin Tutorial",
"kr": "튜토리얼 시작",
"ru": "Начать обучение",
"zh": "开始教程"
},
"help": {
"en": "Help",
"ja": "助ける",
"kr": "정답 확인",
"ru": "Помощь",
"zh": "帮助"
},
"solve": {
"en": "Solve",
"ja": "説き明かす",
"ru": "Решить",
"zh": "解决"
Copy link
Member Author

Choose a reason for hiding this comment

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

Flattening this out makes it a bit easier & more consistent to access (useTranslation) for little loss; the nesting only gives an indication of where the string is used, nothing essential.

Comment on lines -36 to -61
function SiblingNav({ route, lang, start }) {
let title = '';
let url = '';
if (route) {
url = route.path.toLowerCase();
title =
typeof route.name === 'object'
? route.name[lang || 'en']
: route.name || route.title;
}
const label = useTranslation(start ? 'previous' : 'next');

return (
<a class={style.nextLink} data-dir-end={!start} href={url}>
{start && <span class={style.icon}>&larr;&nbsp;</span>}
{!start && <span class={style.icon}>&nbsp;&rarr;</span>}
<span class={style.nextInner}>
<span class={style.nextTitle}>
<span class={style.nextTitleInner}>{title}</span>
</span>
<span class={style.nextUrl}>{label}</span>
</span>
</a>
);
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Whilst looking at our use of useTranslation I came across this which seems to have been long unused. Created in #650 but removed at some point, this is all unused.

"zh": "简体中文"
},
"repo": "preact",
"repo": "preactjs/preact",
Copy link
Member Author

Choose a reason for hiding this comment

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

Not against just inlining the string altogether, but if we do have it hoisted to our app-wide config, feels like org + repo makes more sense.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants