wasmCloud / wasmCloud/wasmcloud.com

Implement reusable Language Tab Components

Open
#254 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

docusaurus enhancement good first issue help wanted pinned react
Dominant language
MDX
Stars
23
Forks
70
Avg merge
2d 1h
Merged PRs (30d)
17

Description

We use the <Tabs> and <Tab> components to sync the language selected by the user, however, this requires maintaining the same id everywhere the components are used. It would be helpful to be able to use a component that handles the props for us.

For example:

<LangTabs>
  <LangTab lang="rust">...</LangTab>
  <LangTab lang="go">...</LangTab>
  ...etc
</LangTabs>

Alternatively, each language could be a specific component. This would enable specific API for props (i.e. marking a RustTab as a component vs module, or marking a GoTab as the "tiny" or main syntax)

<LangTabs>
  <RustTab>...</RustTab>
  <GoTab>...</GoTab>
  ...etc
</LangTabs>

It would also be useful to not have to import these components every time they are used in an mdx file.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing and components used in the MDX documentation. Compare the proposed LangTabs/LangTab API with the alternative per-language components, including how shared IDs and imports are currently handled. Done should provide reusable language tabs without repeated IDs or imports, with a settled API for language-specific props.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.