Switch device in Docs
Lets you switch the device variant used by the public Docs wiki between Mobile, Tablet and Web. The change keeps the article open, reloads the index and the detail with the selected platform, and shows the resolved media for that variant when it exists.
In this article
This guide is for reviewing a public Docs article on the same landing using the Mobile, Tablet and Web variants, without signing in or entering the authenticated app.
The selection changes the public Docs requests and the resolved media of the detail, but it is not saved in the URL; on reload, the platform is computed again from the viewport.
Before you start
- Open the landing on a public Docs route, for example `/docs` or `/docs/reservations/en-reservations-tables-open-selector?lang=en`.
- The backend must have `backend/docs-content/articles.json` available with the `es` and `en` languages and the `mobile`, `tablet` and `web` platforms.
- No session or app permissions are needed: the query uses `/api/public/docs`.
- To notice a visual change, use an article with media published for more than one platform, such as `How to open the table selector`.
Instructions
- 1.
Open a public Docs article
Enter `/docs` or open `/docs/reservations/en-reservations-tables-open-selector?lang=en` directly. If `/docs` is opened without a specific article, the screen selects the first available article and navigates to its canonical URL.
- 2.
Locate the Device selector
In the article header look for `Device`. The wiki shows three options: `Mobile`, `Tablet` and `Web`. The initial option depends on the width and the type of device from which the landing is opened.
- 3.
Choose another platform
Press `Mobile`, `Tablet` or `Web`. The screen keeps the selected article and rebuilds the public query with `locale`, `platform` and `theme`; if a load was in progress, the previous one is cancelled.
- 4.
Review the published media
Check the article's screenshot or video after the change. If a variant exists for the chosen platform, that media is shown; if it does not, the API applies a fallback and may return media from another platform.
- 5.
Check the public contract if needed
Open a detail such as `/api/public/docs/reservations/en-reservations-tables-open-selector?locale=en&platform=tablet&theme=light` to review `platform`, `theme`, `media`, `resolved_platform` and `available_platforms`.
- 6.
Share the result with context
Share the article URL and specify which selector option must be pressed. The platform does not travel in the public landing link, although the API does accept `platform` as a query param.
Validations and limits
- The public screen does not ask for a session.
- The public UI only offers `mobile`, `tablet` and `web`.
- The platform change does not modify the URL or add `platform` to `location.search`.
- Internal Docs links do not keep the selected platform.
- `mobile` resolves to `iphone` content, `tablet` to `ipad` and `web` to `web`.
- The API can return a `resolved_platform` different from `platform` when the exact variant is missing.
- If `platform` is missing or not recognised by the API, the backend responds as `web`.
- The authenticated `DocumentationPage` screen does not implement this manual selector; it shows an informational pill with the detected platform.
Expected result
The public article stays open in the chosen variant and the Docs detail refreshes with the corresponding published media when it exists. If there is no exact variant, the API documents the fallback through `resolved_platform` and `available_platforms`.