question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[docs] Docs restructure

See original GitHub issue

From the decision in the Notion, the documentation will be restructured into each product.

Goal

Incrementally and smoothly transition to the new structure by preserving the same DX for the community and maintainers (tests should be added along the way).

The new repo structure: image

Improvements are not the focus of this initiative. However, they can be listed in this issue and prioritized later.

Plan

To achieve a smooth transition, the work is split into 3 phases.

1. Preparation

Prepare E2E tests, migration tool, update scripts and add UI (each PR should be able to merge without affecting the production code, either set as feature flag or exclude from production build).

  • E2E tests for the website via playwright (playwright is already existed in the project). #30128
  • Create product pages config and update _app.js to switch between product. #30107
  • Migration script to duplicate pages to the new location (under /material/*). #30107
  • Update these scripts to compat with the new structure (it must still work with the current structure)
    • docs:api:build #30245
    • ~docs:i18n~ turns out this one needs no change because the translations directory remains the same 😊
    • docs:typescript:formatted #30248
  • Update search to redirect to /material/* for material content. #30286
  • Refine scripts to generate pages with the decided structure (components & APIs) #30386
  • Create similar migration workflow for mui-x repo https://github.com/mui-org/material-ui-x/pull/3515
  • UI: Product identifier + versioning. #30283
  • UI: Product drawer. (Product drawer is open when clicking on the app icon) #30283
  • Deploy to a migration.mui.com to let ahrefs crawl to make sure that all of the links are working as expected. (need to turn enable_redirects on)

2.1 Migrate content

At this phase, the new URLs have to be deployed to production so that algolia can crawl and index. However, before algolia finish the indexing I think we should preserve the old URLs (meaning, people still browsing old URLs and won’t realize that we are migrating the content).

What’d happen after running the scripts

  • data (demos, markdowns) will be moved from docs/src/pages/* to docs/data/*. (Both the old & new URLs are using the same demos, markdowns from the new location so we are always using the single source of truth)
  • feature toggle enable_product_scope: true is turned on. This enables several things such as E2E tests for the new URLs, buildApi script, and query markdowns from the new location.
  • product identifier & navigation are rendered on new locations but not on old URLs
  • All of the links for existing pages remain the same, which means users won’t realize that the duplicated contents exist. (But they can accidentally access via direct URL).
  • yarn docs:api will generate API pages for both previous & new URLs

image

3. New product spaces

Est. mid of Mar.

4. Go live

Est. 4th April 2022.

5. Clean up

  • remove material-redirects.spec e2e after redirects period
  • delete old pages inside docs/pages/…`
  • `remove material-old e2e test
  • remove replaceHtmlLinks, replaceUrlLinks
  • remove migration script
  • remove old config in buildApi.ts
  • use new logic in parseMarkdown.js for the API section

cc @mui-org/core @mui-org/x

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
michaldudakcommented, Feb 24, 2022

Hyphens are commonly placed in URLs in place of spaces, so even though the name of the library is Material UI, to me it’s perfectly fine to have material-ui in the URL.

2reactions
mnajdovacommented, Feb 22, 2022

I feel that https://mui.com/material-ui/react-modal/ would resonate better than https://mui.com/material/react-modal/. Am I the only one?

+1 on this one

Read more comments on GitHub >

github_iconTop Results From Across the Web

restructure - Rust - Docs.rs
The restructure crate provides functionalities to match regexp patterns into struct fields. This crate now builds on rust-stable.
Read more >
Restructuring documents
Restructuring documents. Changing type. To change the type of an existing element, select it and choose the new type in the Insert menu,...
Read more >
Please help me with restructuring of data in the desired format.
I am stuck in restructuring with my form responses data in spreadsheet. ... https://docs.google.com/forms/d/e/1FAIpQLScO1vr- ...
Read more >
Restructuring Documents Definition: 584 Samples | Law Insider
Restructuring Documents means the Plan, the Disclosure Statement, the Plan Supplement, and the various agreements and other documents formalizing or ...
Read more >
Documentation Restructuring—Status Update - Typo3.org
We are pleased to announce that the first stage of the documentation restructuring process has been completed. The documentation homepage ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found