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

[#3409] improve(docs): Replace multi language tags with <Tabs groupId='language' queryString> #3861

Conversation

LanceHsun
Copy link
Contributor

@LanceHsun LanceHsun commented Jun 14, 2024

What changes were proposed in this pull request?

This pull request updates all <Tabs> components in the documentation to support multi-language switching by adding groupId='language' and queryString attributes. It also ensures that all related links in the documentation include the appropriate queryString parameter for language selection.

Changes include:

  • Updating all <Tabs> components to the following format:
    <Tabs groupId='language' queryString>
      <TabItem value="Json" label="Json">
        ```json
        {
          "direction": "asc",
          "nullOrder": "NULLS_LAST",
          "sortTerm":  {
            "type": "field",
            "fieldName": ["score"]
          }
        }
        ```
      </TabItem>
      <TabItem value="java" label="Java">
        ```java
        SortOrders.of(NamedReference.field("score"), SortDirection.ASCENDING, NullOrdering.NULLS_LAST);
        ```
      </TabItem>
    </Tabs>

Why are the changes needed?

Fix: #3409
These changes are needed to enable multi-language support in the documentation, allowing users to easily switch between different language examples. This improves the usability and accessibility of the documentation for a wider audience.

Does this PR introduce any user-facing change?

Yes, this PR introduces the following user-facing changes:

Users can now switch between different language examples in the documentation using a consistent interface.
Documentation links will now include queryString parameters to ensure the correct language example is displayed.
How was this patch tested?
The changes were tested by:

-Not yet

@LanceHsun LanceHsun requested a review from LauraXia123 June 14, 2024 04:07
@LanceHsun LanceHsun changed the title replace multi language tags with <Tabs groupId='language' queryString> [#3409] Replace multi language tags with <Tabs groupId='language' queryString> Jun 14, 2024
@mchades
Copy link
Contributor

mchades commented Jun 14, 2024

Can you add pictures to show the preview effect of the document before and after the changes?

Copy link
Contributor

@ch3yne ch3yne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jerryshao jerryshao changed the title [#3409] Replace multi language tags with <Tabs groupId='language' queryString> [#3409] improve(docs): Replace multi language tags with <Tabs groupId='language' queryString> Jun 17, 2024
@jerryshao jerryshao merged commit b58b8b7 into apache:main Jun 17, 2024
13 checks passed
shaofengshi pushed a commit to shaofengshi/gravitino that referenced this pull request Jun 24, 2024
…roupId='language' queryString> (apache#3861)

### What changes were proposed in this pull request?

This pull request updates all `<Tabs>` components in the documentation
to support multi-language switching by adding `groupId='language'` and
`queryString` attributes. It also ensures that all related links in the
documentation include the appropriate `queryString` parameter for
language selection.

Changes include:
- Updating all `<Tabs>` components to the following format:
  ```markdown
  <Tabs groupId='language' queryString>
    <TabItem value="Json" label="Json">
      ```json
      {
        "direction": "asc",
        "nullOrder": "NULLS_LAST",
        "sortTerm":  {
          "type": "field",
          "fieldName": ["score"]
        }
      }
      ```
    </TabItem>
    <TabItem value="java" label="Java">
      ```java
SortOrders.of(NamedReference.field("score"), SortDirection.ASCENDING,
NullOrdering.NULLS_LAST);
      ```
    </TabItem>
  </Tabs>
****

### Why are the changes needed?

Fix: apache#3409
These changes are needed to enable multi-language support in the
documentation, allowing users to easily switch between different
language examples. This improves the usability and accessibility of the
documentation for a wider audience.

### Does this PR introduce any user-facing change?
Yes, this PR introduces the following user-facing changes:

Users can now switch between different language examples in the
documentation using a consistent interface.
Documentation links will now include queryString parameters to ensure
the correct language example is displayed.
How was this patch tested?
The changes were tested by:

-Not yet

Co-authored-by: LanceLin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement] Add support for docs link redirects with tabs interconnected
4 participants