Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabs for documentation! #3602

Open
nathan-contino opened this issue Apr 30, 2024 · 3 comments
Open

Tabs for documentation! #3602

nathan-contino opened this issue Apr 30, 2024 · 3 comments
Assignees
Labels
enhancement toolchain This is an infrastructure/toolchain issue

Comments

@nathan-contino
Copy link
Collaborator

nathan-contino commented Apr 30, 2024

It would be nice to have the syntactic sugar of tabs in our documentation. Tabs represent 'parallel steps' in a guide: essentially, anywhere in a guide where you do A OR B OR C. Consider the following section flow in a guide:

  1. download foo
  2. install foo via CLI
  3. install foo via GUI
  4. run foo

Without tabs, this looks like you perform steps 1 -> 2 -> 3 -> 4. In reality, you perform 1 -> 2 OR 3 -> 4.

With tabs, you can model this as:

  1. download foo
  2. install foo (contains tabs CLI and GUI)
  3. run foo

This more accurately conveys that users should choose CLI OR GUI.

For example:

Example use cases:
There are many! Just linking a couple:

- Desktop
  - Raspberry Pi Configuration
  - CLI
- Console

Known issues/gotchas to look out for:

  • The order of tabs and default displayed tab should always be consistent for a given tabset. For instance, for the tabset CLI OR GUI, we should always default to a specific option (in this case, probably GUI). The default option should probably appear first (leftmost) in the list of tabs.
  • When multiple sets of tabs exist on the same page that contain the exact same collection of tab options, choosing a tab in a single tabset should switch ALL of the tabsets. For instance, if a guide page contains a CLI OR GUI tabset in the "install" section towards the top, and a CLI OR GUI tabset in the "register" section towards the bottom, choosing the CLI option in the "install" section at the top should also change the tabset in the "register" section at the bottom. This means users don't have to repeatedly choose the same tab if multiple tabsets occur on the same page!
  • Whenever a user changes tabs, the page should not scroll. The top of their visible page should stay in the same position. If the page sometimes bounces around when the user changes tabs, they'll quickly learn to be afraid of changing tabs since it means losing their place in the guide!
@nathan-contino nathan-contino added enhancement toolchain This is an infrastructure/toolchain issue labels Apr 30, 2024
@JamesH65
Copy link
Contributor

JamesH65 commented May 1, 2024

I think that might make things much easier in code sections, different languages, different Pis etc. Not sure how it would work with Asciidoc source though.

@nelliemckesson
Copy link
Contributor

@JamesH65 I've got a rough plan for how to handle this in the asciidoc / converted HTML, but the more specific use cases & examples y'all can provide, the better (so I can take into account all the possible variables...).

@JamesH65
Copy link
Contributor

JamesH65 commented May 1, 2024

I'll email you off GitHub since this repo is public.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement toolchain This is an infrastructure/toolchain issue
Projects
None yet
Development

No branches or pull requests

3 participants