Skip to content

Conversation

@Alenar
Copy link
Collaborator

@Alenar Alenar commented Jul 16, 2025

Content

This PR:

  • Update the doc website Readme, that was referencing long removed command like yarn start, to latest development state
  • Remove swizzled components that have no custom changes, using fallback to base docusaurus components and reducing maintenance
  • Add a make swizzled-components-upgrade to facilitate upgrade of components swizzled since merge of the new website design (filip(feat): docs site redesign #2597)
  • Upgrade website dependencies

Details

make swizzled-components-upgrade goal is to automate as much as possible of the steps necessary to align swizzled components with their base docusaurus part.

It run the following steps automatically:

  1. removal of all swizzled components
  2. run npm run swizzle @docusaurus/theme-classic {COMPONENT/PATH} -- --eject --typescript for all components, this retrieve them as they are currently in the current docusaurus version
  3. run prettier on the swizzled components
  4. To each swizzled components try to apply a patch that contains our custom changes, if it fails conflict have to be handled manually by the developer

Note

Those steps can be run separately have they each have a dedicated makefile recipe: swizzled-components-clean, reswizzle-components, swizzled-components-apply-patches (the later run for each patch a make upgrade/PATCH_NAME.patch recipe)

Pre-submit checklist

  • Branch
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • All check jobs of the CI have succeeded
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • No new TODOs introduced

Issue(s)

Relates to #2622

@Alenar Alenar self-assigned this Jul 16, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modernizes the Mithril documentation website by updating dependencies, streamlining swizzled components, and introducing automated component upgrade tooling. The changes prepare the website for future maintenance by removing unnecessary customizations and providing better upgrade workflows.

Key changes include:

  • Removal of redundant swizzled components that had no customizations
  • Addition of automated upgrade tooling for maintaining customized components
  • Dependency upgrades and documentation updates

Reviewed Changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/website/upgrade/*.patch Patch files containing custom modifications to be applied during component upgrades
docs/website/src/theme/*/index.tsx Removal of swizzled components that revert to base Docusaurus functionality
docs/website/package.json Dependency version upgrades and reorganization
docs/website/README.md Updated documentation with current development commands and versioning workflow
docs/website/Makefile New automation targets for component upgrades and maintenance tasks
Comments suppressed due to low confidence (2)

docs/website/upgrade/theme-navbar-content.patch:23

  • The function parameter should be typed. Consider using props: ComponentProps<'div'> or define a specific interface for better type safety.
 import NavbarMobileSidebarToggle from "@theme/Navbar/MobileSidebar/Toggle";

docs/website/upgrade/theme-navbar-content.patch:32

  • The function parameter should be typed. The original code used { children }: Props which provides proper TypeScript typing.
   // TODO temporary casting until ThemeConfig type is improved

@github-actions
Copy link

github-actions bot commented Jul 16, 2025

Test Results

    4 files  ±0    154 suites  ±0   23m 21s ⏱️ +9s
2 118 tests ±0  2 118 ✅ ±0  0 💤 ±0  0 ❌ ±0 
6 466 runs  ±0  6 466 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 2998a1d. ± Comparison against base commit b56cdc8.

♻️ This comment has been updated with latest results.

@Alenar Alenar temporarily deployed to testing-preview July 16, 2025 11:55 — with GitHub Actions Inactive
@Alenar Alenar changed the title future proof website make website more future-proof Jul 16, 2025
Copy link
Collaborator

@dlachaume dlachaume left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Alenar Alenar force-pushed the djo/2622/future-proof-website branch from a783f78 to 87171fa Compare July 16, 2025 13:48
Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Alenar added 4 commits July 16, 2025 16:01
It used the invite link for Hydra instead of the one for Mithril.
as docusaurus will automatically use the components from the base theme
instead, reducing maintenance cost.
to facilate upgrading of swizzled components if their base code from
docusaurus change.
@Alenar Alenar force-pushed the djo/2622/future-proof-website branch 3 times, most recently from c3118dd to 05dd934 Compare July 16, 2025 14:09
@Alenar Alenar force-pushed the djo/2622/future-proof-website branch from 05dd934 to 2998a1d Compare July 16, 2025 14:12
@Alenar Alenar temporarily deployed to testing-preview July 16, 2025 14:22 — with GitHub Actions Inactive
@Alenar Alenar merged commit f19a476 into main Jul 16, 2025
41 checks passed
@Alenar Alenar deleted the djo/2622/future-proof-website branch July 16, 2025 14:40
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.

4 participants