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

feat: add glossary #150

Merged
merged 5 commits into from Jun 26, 2022
Merged

feat: add glossary #150

merged 5 commits into from Jun 26, 2022

Conversation

ghost
Copy link

@ghost ghost commented Jun 21, 2022

Signed-off-by: Lalith Vipulananthan lalith.vipulananthan@tier4.jp

Description

In the Autoware documentation, acronyms are used quite often (eg: AWF for Autoware Foundation) but when doing so we always have to consider adding an explanation for an acronym the first time it is used on a particular page. However, this process can lead to duplicate explanations across multiple pages of the documentation. One potential solution to this problem is to create a glossary that can be used as a single source of explanation for acronyms and commonly used terms that may be unknown to new Autoware contributors.

I created a discussion to get feedback on potential solutions, and the initial suggestion was to start with a basic glossary that expands acronyms and look into a more detailed glossary later on.

mkdocs provides an extension that enables tooltips for acronyms or terms that are defined in a separate mkdocs file and then auto-included in every document file. The new abbreviations.md file in this PR contains an initial draft of terms which can be expanded/modified over time as new documentation pages and their associated acronyms are added.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The Reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@ghost ghost added type:documentation Creating or refining documentation. type:new-feature New functionalities or additions, feature requests. labels Jun 21, 2022
@ghost ghost requested review from kenji-miyake and BonoloAWF June 21, 2022 09:06
@kenji-miyake
Copy link
Contributor

Lalith Vipulananthan and others added 2 commits June 21, 2022 19:37
Signed-off-by: Lalith Vipulananthan <lalith.vipulananthan@tier4.jp>
@@ -71,6 +71,9 @@ markdown_extensions:
format: svg
- pymdownx.arithmatex
- pymdownx.highlight
- pymdownx.snippets:
auto_append:
- includes/abbreviations.md
Copy link
Contributor

Choose a reason for hiding this comment

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

It's corrupted and shown on all pages, which I feel a bit noisy.
image

How about simply placing it as docs/glossary.md?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or should I install some additional dependencies to the CI workflow?

Copy link
Author

@ghost ghost Jun 21, 2022

Choose a reason for hiding this comment

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

Reading the mkdocs documentation for this, the idea was to just add tooltips that would appear when hovering over an acronym that is included in the abbreviations.md file. I did not expect the text of the abbreviations file to be added.

That said, if a change is made to add a new extension to mkdocs, does a change also need to be made to the CI/CD workflow in order for that extension to be added to the live documentation site?

If a change to the CI/CD workflow is not required, then I will see what I find by asking the mkdocs community. If all else fails, we can just make it a generic glossary file as you suggest. However, in that case, I would want to provide a slightly more detailed explanation for each point and so I would need to rethink the format of the file.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, I'll investigate the usage and fix the issue!

Copy link
Author

@ghost ghost Jun 22, 2022

Choose a reason for hiding this comment

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

@kenji-miyake I think the autofix commit may be causing the problem here.

In the mkdocs documentation for tooltips, each entry in the abbreviations file should have an asterisk at the start of the line. However the ci(pre-commit): autofix has replaced the asterisks with underscores.

In theory, reverting that change should fix the issue. 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. I'll check it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, if I revert the pre-commit changes, it didn't work in my local machine. 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

@LalithVipulananthan I'm sorry to be late.

You needed the abbr extension.
Also, as you say, _ instead of * didn't work. So I added prettier-ignore.

Now it works!
image

Kenji Miyake added 3 commits June 27, 2022 06:40
Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
@kenji-miyake
Copy link
Contributor

pre-commit-optional is fixed in #157.

@kenji-miyake kenji-miyake merged commit 379c615 into autowarefoundation:main Jun 26, 2022
@ghost ghost deleted the feat-add-glossary branch June 26, 2022 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:documentation Creating or refining documentation. type:new-feature New functionalities or additions, feature requests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant