This repository was archived by the owner on Jan 8, 2025. It is now read-only.
Remove scoped visibility from the docs engine#383
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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 the `DocsContext` to determine the currently selected scope and adjust their visibility. "Box" components like the `Details`, `Notice`, and `Admonition` component can currently hide themselves if the selected scope does not match the value of the `scope` prop. This change shows these boxes at all times, but keeps the `scope` and `scopeOnly` props for backwards compatability (the props are no-op). The `Tabs` component currently uses the selected scope to select a `TabItem` with the `scope` 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 the `scope` prop in no-op form. - **Locking the version picker if the scope is `cloud` or `team`**: 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.
e483eb0 to
315c611
Compare
Contributor
Author
|
Reviewer notes:
|
avatus
previously approved these changes
Aug 24, 2023
Contributor
avatus
left a comment
There was a problem hiding this comment.
Code looks good but lets await some product approvals as well
lsgunn-teleport
previously approved these changes
Aug 25, 2023
|
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. |
xinding33
previously approved these changes
Sep 5, 2023
fb02d0f
avatus
approved these changes
Sep 5, 2023
xinding33
approved these changes
Sep 5, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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
DocsContextno longer includes the current scope: Componentsno longer refer to the
DocsContextto determine the currentlyselected scope and adjust their visibility.
"Box" components like the
Details,Notice, andAdmonitioncomponent can currently hide themselves if the selected scope does not
match the value of the
scopeprop. This change shows these boxes atall times, but keeps the
scopeandscopeOnlyprops for backwardscompatability (the props are no-op).
The
Tabscomponent currently uses the selected scope to select aTabItemwith thescopeproperty. Since we merged SwitchTabItems with identical labels together #380, though,Tabscomponents can preserve most of this behavior without the scopeswitcher, as long as these components include identical labels for
edition-related tab items. This change also retains the
scopepropin no-op form.
Locking the version picker if the scope is
cloudorteam: Thischange 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.