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

Update sidebar navigation for version 3.9 of English and Japanese docs #597

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

josh-wong
Copy link
Member

@josh-wong josh-wong commented Dec 4, 2024

Caution

This PR should not be merged until after we're ready to add the displayed_sidebar: docsEnglish configuration to the front-matter properties of English docs and displayed_sidebar: docsJapanese configuration to the front-matter properties of Japanese docs. By adding this configuration, we can specify the appropriate sidebar language that should be displayed for the respective language when the visitor is on a page.

This method follows Docusaurus's method for sidebars, as described in Understanding sidebar association.

Description

This PR updates the sidebar navigation for ScalarDL 3.9 (and will apply to later versions as well). Since we'll be hard-coding titles (labels) in the sidebar navigation in the near future, we should address this now before it becomes an issue.

If we don't specify which sidebar navigation to show for each language, the sidebar navigation for Japanese docs would show in English.

Note

We hard-code the titles (labels) in the sidebar navigation so that we can make the titles shorted in the sidebar navigation while keeping longer titles at the top of each doc. Keeping titles within the actual doc provides readers with better context and is better for SEO.

See an example of the sidebar navigation at:

Related issues and/or PRs

Note

Similar changes are being done in the ScalarDB docs:

Changes made

  • Changed the default sidebar name from docs to docsEnglish.
  • Added a sidebar structure for Japanese docs (docsJapanese) that matches the English docs.
  • Translated the titles (labels) in the docsJapanese sidebar into Japanese.

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

  • I have updated the side navigation as necessary.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes. N/A
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

N/A

This navigation is necessary since we will be hard-coding titles (`labels`) in the sidebar navigation in the near future. Without this, the sidebar navigation for Japanese docs would show in English.
@josh-wong josh-wong added the sidebar navigation Updates to the sidebar navigation label Dec 4, 2024
@josh-wong josh-wong self-assigned this Dec 4, 2024
@josh-wong josh-wong marked this pull request as ready for review December 19, 2024 03:24
Copy link

@jnmt jnmt left a comment

Choose a reason for hiding this comment

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

Thank you! Almost LGTM. I left a few comments. PTAL!

sidebars.js Outdated Show resolved Hide resolved
versioned_sidebars/version-3.9-sidebars.json Outdated Show resolved Hide resolved
sidebars.js Show resolved Hide resolved
Copy link

netlify bot commented Dec 19, 2024

Deploy Preview for staging-scalardl-docs-site ready!

Name Link
🔨 Latest commit f1ff29a
🔍 Latest deploy log https://app.netlify.com/sites/staging-scalardl-docs-site/deploys/6763e7f2c703bc0008f882e1
😎 Deploy Preview https://deploy-preview-597--staging-scalardl-docs-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 55
Accessibility: 98
Best Practices: 92
SEO: 96
PWA: 90
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member Author

@josh-wong josh-wong left a comment

Choose a reason for hiding this comment

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

@jnmt Thank you for the review! I've applied your suggestions in 0b2c8fe and f1ff29a. PTAL again when you have time.

sidebars.js Outdated Show resolved Hide resolved
sidebars.js Show resolved Hide resolved
Copy link

@jnmt jnmt left a comment

Choose a reason for hiding this comment

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

Thank you for revising it! I left a very minor improvement, but basically LGTM.

sidebars.js Show resolved Hide resolved
sidebars.js Outdated
{
type: 'doc',
id: 'use-generic-contracts',
label: '汎用コントラクトおよびファンクションの使用',
Copy link

Choose a reason for hiding this comment

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

Probably, this is consistent with others, and a short one might be better.

Suggested change
label: '汎用コントラクトおよびファンクションの使用',
label: '汎用コントラクトを使用する',

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, thank you for mentioning this!

In a PR for the ScalarDB sidebar, @/feeblefakie mentioned noun form and verb form. In that PR, I changed them to noun form, so I've done the same in the sidebars in this PR as well in 7e4b2e0.

Make Japanese titles consistently use noun form, as mentioned in the PR for the ScalarDB sidebar navigation (https://github.com/scalar-labs/docs-scalardb/pull/762/files/1c1b5404f5b23485105ae6a17a42977ecdc5aac3#r1869009005).
Copy link
Member Author

@josh-wong josh-wong left a comment

Choose a reason for hiding this comment

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

@jnmt I address your comment and made some related changes in 7e4b2e0. PTAL!

{
type: 'doc',
id: 'use-generic-contracts',
label: 'Use Generic Contracts and Functions',
Copy link
Member Author

Choose a reason for hiding this comment

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

@jnmt As mentioned in your comment for the Japanese phrasing, should we shorten the English wording as well?

Suggested change
label: 'Use Generic Contracts and Functions',
label: 'Use Generic Contracts',

sidebars.js Outdated
{
type: 'doc',
id: 'use-generic-contracts',
label: '汎用コントラクトおよびファンクションの使用',
Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, thank you for mentioning this!

In a PR for the ScalarDB sidebar, @/feeblefakie mentioned noun form and verb form. In that PR, I changed them to noun form, so I've done the same in the sidebars in this PR as well in 7e4b2e0.

@josh-wong josh-wong requested a review from jnmt December 23, 2024 07:59
sidebars.js Outdated Show resolved Hide resolved
sidebars.js Outdated Show resolved Hide resolved
type: 'doc',
id: 'scalar-kubernetes/CreateBastionServer',
label: 'Create a Bastion Server',
},
],
},
{
type: 'category',
label: 'Cluster Guides',
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think Cluster Guides and Container Image Guides are needed in the sidebar because they are part of deployment and covered by the Deployment guides.

Copy link
Member Author

Choose a reason for hiding this comment

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

Although I'm OK with not showing these docs in the sidebar in the future, as long as the content is available in the other docs, I do have one concern.

Many other docs link to these docs listed in this sub-category. If we remove these docs from the sidebar, when a visitor clicks a link to go to these pages, then the sidebar navigation will not be displayed on those pages. I think not showing the sidebar navigation would be confusing for users because they would need to go back to the previous page or go to the home page to see the sidebar navigation again.

With that in mind, how about we address this in a different PR?

Copy link

@kota2and3kan kota2and3kan left a comment

Choose a reason for hiding this comment

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

Thank you for the updates! (And sorry for my late review...)
I left several comments and suggestions.
Please take a look when you have time! 🙇‍♂️

{
type: 'doc',
id: 'getting-started-auditor',
label: 'Run a Contract Through ScalarDL Ledger and ScalarDL Auditor',

Choose a reason for hiding this comment

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

Suggested change
label: 'Run a Contract Through ScalarDL Ledger and ScalarDL Auditor',
label: 'Run a Contract Through ScalarDL Auditor mode',

I think we can make the label length short if we can use the term Auditor mode.

However, I don't know whether we can use the term Auditor mode as an official term.

If we should not use Auditor mode, I think we can keep the current label name as is.

@feeblefakie @jnmt
What do you think?

{
type: 'doc',
id: 'installation-with-docker',
label: 'Install ScalarDL in Your Local Environment',

Choose a reason for hiding this comment

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

Suggested change
label: 'Install ScalarDL in Your Local Environment',
label: 'Install ScalarDL in Your Local Environment with Docker',

Now, we are creating another document Deploy ScalarDL Ledger Locally that uses Minikube to deploy ScalarDL locally in another PR.
https://github.com/scalar-labs/docs-internal-orchestration/pull/83

So, I think it would be better to mention with Docker explicitly here to avoid unnecessary confusion.

What do you think?
(If with Docker is too long, let me consider other ideas.)

{
type: 'doc',
id: 'generic-contracts-reference',
label: '汎用コントラクトおよびファンクション',

Choose a reason for hiding this comment

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

Suggested change
label: '汎用コントラクトおよびファンクション',
label: 'Generic Contracts Reference',

It seems that we should use English here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we don't treat Generic contracts as a proper noun. So, I think it's fine as is.
Maybe, it's better to be just 汎用コントラクト.

Choose a reason for hiding this comment

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

@feeblefakie
Ah, sorry. My comment was a bit ambiguous.

Here is the docsEnglish section. Not the docsJapanese section.

So, simply we should use English here. I think it was translated by accident.

According to your suggestion, it might be better to use Generic Contracts (without Reference) here though.

{
type: 'doc',
id: 'scalardl-java-client-sdk/README',
label: 'ScalarDL Java クライアント SDK',

Choose a reason for hiding this comment

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

Suggested change
label: 'ScalarDL Java クライアント SDK',
label: 'ScalarDL Java Client SDK',

I think ScalarDL Java Client SDK is a component name. So, I think we should not translate Client here.

{
type: 'doc',
id: 'authentication',
label: '認証を使用',

Choose a reason for hiding this comment

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

Suggested change
label: '認証を使用',
label: '認証',

I think 認証 is simple and better because the origin English word is Authentication.

{
"type": "doc",
"id": "scalar-kubernetes/BackupRDB",
"label": "Kubernetes で RDB をバックアップ"

Choose a reason for hiding this comment

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

Suggested change
"label": "Kubernetes RDB をバックアップ"
"label": "Kubernetes 環境で RDB をバックアップ"

Same as sidebars.js.

{
"type": "doc",
"id": "scalar-kubernetes/BackupNoSQL",
"label": "Kubernetes で NoSQL データベースをバックアップ"

Choose a reason for hiding this comment

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

Suggested change
"label": "Kubernetes NoSQL データベースをバックアップ"
"label": "Kubernetes 環境で NoSQL データベースをバックアップ"

Same as sidebars.js.

{
"type": "doc",
"id": "scalar-kubernetes/RestoreDatabase",
"label": "Kubernetes でデータベースを復元"

Choose a reason for hiding this comment

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

Suggested change
"label": "Kubernetes でデータベースを復元"
"label": "Kubernetes 環境でデータベースを復元"

Same as sidebars.js.

{
type: 'doc',
id: 'getting-started-auditor',
label: 'ScalarDL Ledger と ScalarDL Auditor を通じてコントラクトを実行',

Choose a reason for hiding this comment

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

Suggested change
label: 'ScalarDL Ledger と ScalarDL Auditor を通じてコントラクトを実行',
label: 'ScalarDL Auditor モードを通じてコントラクトを実行',

If we can use Auditor mode as an official word, we can make this label shorter.

{
"type": "doc",
"id": "getting-started-auditor",
"label": "ScalarDL Ledger と ScalarDL Auditor を通じてコントラクトを実行"

Choose a reason for hiding this comment

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

Suggested change
"label": "ScalarDL Ledger と ScalarDL Auditor を通じてコントラクトを実行"
"label": "ScalarDL Auditor モードを通じてコントラクトを実行"

Same as sidebars.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sidebar navigation Updates to the sidebar navigation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants