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

Lazy expandable feature for documentation #21095

Closed
hikalkan opened this issue Oct 15, 2024 · 3 comments · Fixed by #21689
Closed

Lazy expandable feature for documentation #21095

hikalkan opened this issue Oct 15, 2024 · 3 comments · Fixed by #21689

Comments

@hikalkan
Copy link
Member

hikalkan commented Oct 15, 2024

I didn't add sub-documents of the microservice startup template document to the navigation menu.

If you go to the microservice startup template document document, you can see it is highlighted, but there is no item under it on the menu:

image

However, if you open a sub-document (example: API Gateways), it is not found and highlighted on the menu as expected:

image

The problem is solved if I add all sub-documents to the menu. However, I don't want to it for three reasons;

  1. It will make filtering the items hard on the "Filter by title" area. Many unrelated items will be found.
  2. It will make the nav tree unnecessarily big, which may cause performance
  3. It has no meaning when I look at the menu manually, because for that kind of documents, details are only important after I open the main document, and it has sub-documents only because it is long.

So, I offer to introduce a new feature to the documentation system: Lazy expandable.

I will give the usage example with the book store tutorial since it has already sub-items on the menu.

I want to change the related part of docs-nav.json file as shown below:

{
  "text": "Web Application Development",
  "isLazyExpandable": true, // ADDED THIS
  "path": "tutorials/book-store",  // ADDED THIS
  "items": [
    {
      "text": "Overview",
      "path": "tutorials/book-store"
    },
    {
      "text": "1: Creating the Server Side",
      "path": "tutorials/book-store/part-01.md"
    },
    {
      "text": "2: The Book List Page",
      "path": "tutorials/book-store/part-02.md"
    },
    {
      "text": "3: Creating, Updating and Deleting Books",
      "path": "tutorials/book-store/part-03.md"
    },
    {
      "text": "4: Integration Tests",
      "path": "tutorials/book-store/part-04.md"
    },
    {
      "text": "5: Authorization",
      "path": "tutorials/book-store/part-05.md"
    },
    {
      "text": "6: Authors: Domain Layer",
      "path": "tutorials/book-store/part-06.md"
    },
    {
      "text": "7: Authors: Database Integration",
      "path": "tutorials/book-store/part-07.md"
    },
    {
      "text": "8: Authors: Application Layer",
      "path": "tutorials/book-store/part-08.md"
    },
    {
      "text": "9: Authors: User Interface",
      "path": "tutorials/book-store/part-09.md"
    },
    {
      "text": "10: Book to Author Relation",
      "path": "tutorials/book-store/part-10.md"
    }
  ]
},

I just added isLazyExpandable to the root document of the tutorial. As a result on the UI, I am expecting the followings:

@ebicoglu
Copy link
Member

ebicoglu commented Dec 15, 2024

I don't think this issue will fix the below situation or not, but when somebody finds a doc on google he can not go to the parent of this doc, and cannot see it on the navigation menu.

https://abp.io/docs/latest/framework/ui/mvc-razor-pages/tag-helpers/buttons
image

and actually this document is not at the correct place which shows on google search
image

@hikalkan
Copy link
Member Author

hikalkan commented Dec 18, 2024

It is not related to this issue. But we can add tag helpers to the menu, no problem on that. Create a new issue and assign it to someone.

We can add a "Components" item under the "Overview" menu item (see below screenshot), and add all the components under that new item.

image

https://abp.io/docs/latest/framework/ui/mvc-razor-pages/tag-helpers

URLs can be like:

@ebicoglu
Copy link
Member

It is not related to this issue. But we can add tag helpers to the menu, no problem on that. Create a new issue and assign it to someone.

We can add a "Components" item under the "Overview" menu item (see below screenshot), and add all the components under that new item.

image

https://abp.io/docs/latest/framework/ui/mvc-razor-pages/tag-helpers

URLs can be like:

I create a new issue for this one #21673

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

Successfully merging a pull request may close this issue.

3 participants