Closed ptgott closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 5, 2023 7:32pm |
Reviewer notes:
This change looks good to me for a short-term fix. Long term, as we've discussed internally, I'd rather revamp the information architecture.
Closes gravitational/teleport#19471 Closes gravitational/teleport#30381 Closes #343 Closes #162 Closes #155 Closes #118 Closes #116 Closes #88
Users tend not to notice the scope switcher. When they do, the component's behavior is not intuitive. This change removes the scope switcher from the docs, replacing it with a non-interactive list of supported Teleport editions.
The change preserves the existing styling of the scope switcher as much as possible. Aside from an "Available for" label next to the edition list, the change should go unnoticed for users who do not interact with the scope switcher.
This change also adjust some docs behavior that relied on the scope switcher:
The
DocsContext
no longer includes the current scope: Components no longer refer to theDocsContext
to determine the currently selected scope and adjust their visibility."Box" components like the
Details
,Notice
, andAdmonition
component can currently hide themselves if the selected scope does not match the value of thescope
prop. This change shows these boxes at all times, but keeps thescope
andscopeOnly
props for backwards compatability (the props are no-op).The
Tabs
component currently uses the selected scope to select aTabItem
with thescope
property. Since we merged #380, though,Tabs
components can preserve most of this behavior without the scope switcher, as long as these components include identical labels for edition-related tab items. This change also retains thescope
prop in no-op form.Locking the version picker if the scope is
cloud
orteam
: This change no longer locks the version picker, since there is no way to select a scope. Locking the version picker becomes an issue when Teleport Cloud is a major version behind the latest release. Removing the scope switcher doesn't completely rectify this, since the version of the docs for the previous version includes a warning banner. We can address this in a future change.