Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: simplify courses #4549

Merged
merged 8 commits into from
Apr 2, 2025
Merged

refactor: simplify courses #4549

merged 8 commits into from
Apr 2, 2025

Conversation

elbotho
Copy link
Member

@elbotho elbotho commented Mar 31, 2025

It's a bit annoying because courses had so much refactoring already…
But I gave this more thought and did more SEO research I think I'm pretty happy with this approach.

The idea is to put all course page below each other on one page with some space in between the pages.
Navigation between the pages then works by hash-links (or if users prefer by scrolling).

Demo

This can be reviewed and discussed, but not merged yet (needs cf-worker redirects).

Thoughts:

  • UX: We want to keep the "step by step" feeling to not overwhelm the learners with content (done with vertical space)
  • UX: We want quick navigation between the steps (is immediate now)
  • SEO: Many course pages are pretty short an that's not great for SEO. So all on one page is probably better overall
  • SEO: While Google says they value invisible, but accessible content (like in accordions) the same as visible content test show they really clearly prefer visible content (no content is hidden)
  • DX: Having one url per entity is definitely cleaner and technically easier with less special treatment for courses
  • DX: one less custom serlo variable in the editor: always nice

Copy link

vercel bot commented Mar 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
frontend ✅ Ready (Inspect) Visit Preview Apr 1, 2025 1:04pm

Copy link
Contributor

github-actions bot commented Mar 31, 2025

📦 Next.js Bundle Analysis for @serlo/frontend

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 105.56 KB (🟡 +3 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Twenty Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/[...slug] 107.17 KB (🟢 -17 B) 212.73 KB
/___bot_or_not 114.85 KB (🟢 -17 B) 220.41 KB
/___editor_preview 202.13 KB (-16 B) 307.69 KB
/___old_comments 97.26 KB (-1 B) 202.82 KB
/biologie 175.56 KB (-17 B) 281.12 KB
/chemie 175.56 KB (-17 B) 281.12 KB
/content-only/[...slug] 96.07 KB (🟢 -17 B) 201.63 KB
/discussions 93.8 KB (-1 B) 199.36 KB
/entity/create/[type]/[taxonomyId] 223.64 KB (🟢 -73 B) 329.2 KB
/entity/repository/add-revision/[...id] 223.31 KB (🟢 -73 B) 328.87 KB
/entity/repository/compare/[entity_id]/[revision_id] 111.41 KB (🟢 -17 B) 216.97 KB
/informatik 175.56 KB (-17 B) 281.12 KB
/lerntipps 175.56 KB (-17 B) 281.12 KB
/license/detail/[id] 82.83 KB (🟢 -17 B) 188.39 KB
/mathe 175.56 KB (-17 B) 281.12 KB
/nachhaltigkeit 175.56 KB (-17 B) 281.12 KB
/page/create 223.31 KB (🟢 -73 B) 328.87 KB
/taxonomy/term/create/[parent_id]/[id] 223.02 KB (🟢 -73 B) 328.58 KB
/user/profile/[username] 194.25 KB (-17 B) 299.81 KB
/user/settings 225.04 KB (🟢 -73 B) 330.59 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

Copy link
Contributor

@hejtful hejtful left a comment

Choose a reason for hiding this comment

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

Appreciate the SEO tests!

@elbotho elbotho merged commit 00b165c into staging Apr 2, 2025
8 checks passed
@elbotho elbotho deleted the refactor/simplify-courses branch April 2, 2025 15:24
@github-actions github-actions bot mentioned this pull request Apr 2, 2025
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