Comments (7)
Yes, the end goal is to use absolute URLs inside every JSDoc block so devs see the correct URLs in their IDE. But we need to do it in a way that doesn't break URLs that end up in the docs. In the following screenshot, the blue blocks are used to generate part of the docs:
![](https://private-user-images.githubusercontent.com/7225802/333631386-388e9fb5-6c03-4295-b707-c0101e4915a2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTc3ODg1OTIsIm5iZiI6MTcxNzc4ODI5MiwicGF0aCI6Ii83MjI1ODAyLzMzMzYzMTM4Ni0zODhlOWZiNS02YzAzLTQyOTUtYjcwNy1jMDEwMWU0OTE1YTIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MDdUMTkyNDUyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MWMxZGI4ZDA5MDRjNmE4ZjdhM2Q3NzNhNzFkOTYzMGU0NmI0YzIyMTMxOTZlY2UzMDBhYzM2Y2U3OTNkM2YzYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.mMMopaTLEaoquyMF3XBtEGJT5zZVmni_V8OgaQkBlII)
- The first blue block ends up on the API page.
- The second blue block ends up in the props table in the API page.
- The yellow block is inserted here automatically and AFAIK it's not used to generate any documentation, so it's safe to use absolute URLs there.
If we use absolute URLs in the blue blocks, anytime the docs are built under other base URLs (e.g. PR previews or https://next.mui.com/), they'll point to another domain, which is not what we want.
So the idea is to use absolute URLs in every JSDoc block and adapt the docs generation to replace the https://mui.com base URL with the correct base URL depending on the environment the docs are being built. This requires changes in at least:
Probably more things need to be adapted, so I'd love someone from @mui/docs-infra to confirm if this approach makes sense before we continue this effort.
from material-ui.
@tonygravell sorry, the sandbox was private, you should be able to access it now. I've attached a screenshot to the description.
from material-ui.
@aarongarciah I'd like to take a look at this issue, but it looks like the codesandbox link is broken for me. Can you give more context on how to reproduce this issue?
from material-ui.
Would it make sense to make them all use absolute URL's? It looks like some of the links in the file already have them.
from material-ui.
Related Issues (20)
- Cannot change displayedRows child component from <p> to <div> HOT 1
- [system] `sx` field border{Block,Inline}{,Start,End}Color doesn't take the theme into account
- Bad link for Rating component to react docs.
- [TextField] Textfield as a Select shows an empty menu when items get removed dynamically
- [lab][TabPanel] Widen type of `value` to match `@mui/base` TabPanel and related components HOT 2
- [material-ui][Divider] Add "wavy" variant HOT 1
- [Migration] theme.spacing is not a function HOT 1
- [material-ui][Stepper] Not generating a utility class for `nonLinear` HOT 4
- [material-ui][TextField] Handling long placeholder text HOT 3
- [material-ui][docs] Table demo EnhancedTable crashes HOT 1
- [material-ui] `color="inherit"` is inconsistent between ThemeProvider and experimental_CssVarsProvider
- [core] Remove `any` from `React.ReactElement` types HOT 2
- [core] Support React 19 HOT 7
- [RFC][material-ui] Deprecate `paragraph` prop on <Typography> HOT 1
- [material-ui][Autocomplete] With limit in `createFilterOptions` doesn't highlight/retain selected value
- [docs-infra] Remove all ES6 transpilation features
- [docs] Confusion around package managers HOT 6
- [docs-infra] Implement debounce to reduce number of requests sent to Algolia during search HOT 7
- Upgrading from `6.0.0-alpha.7` to `6.0.0-alpha.8` breaks styles of TextField HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from material-ui.