hlxsites / prisma-cloud-docs-website

blocks and gdoc authored content for https://docs.prismacloud.io
Apache License 2.0
3 stars 2 forks source link

Left nav - Missing book depending on which page is loaded #101

Closed iansk closed 11 months ago

iansk commented 1 year ago

The number of books in the left nav changes depending on which page of which book is open. (To keep things clear, I've used the following format for links: PRODUCT > BOOK)

If you go to this page in the compute product, there are only four books:

Compute > Operationalize Guide

However, if you go to this page in the compute product, there are five books:

Compute > Admin Guide - version pcee

maxakuru commented 1 year ago

I don't think this is a bug

ops-guide is an unversioned book, so it only shows itself and the other 3 unversioned books compute IS versioned, so it shows itself and the 4 versioned books

iansk commented 1 year ago

@maxakuru For a given product, the number of books in the left ToC should be static, even a specific book is versioned (e.g. the Admin Guide is versioned, but it should always be visible in the ToC)

If you go to this page in the Compute doc set, there are four books in the ToC:

compute-ops

But if you go to this page in the Comptue doc set, there are five books in the ToC:

compute-admin

If the metadata sheet defines five books for a product, there should always be five books in the left nav.

icaraps commented 1 year ago

@iansk Similar to https://github.com/hlxsites/prisma-cloud-docs-website/issues/64#issuecomment-1605536907, it looks like the the formula for all-books in column J of the metadata sheet outputs 4 books for compute/ops-guide and 5 books for compute/pcee/admin-guide.

maxakuru commented 1 year ago

@iansk the problem here is still in the metadata, I think there's some confusion so I'll try to be complete here..

Here's a screenshot of all the rows for the compute product in the all-books sheet:

Screenshot 2023-07-10 at 2 10 27 PM

blue numbers: entries that appear for versioned books whose version matches between the sheet1 and all-books sheets red numbers: appear for all books in the product

If a version cell is empty in the all-books sheet, that row will appear for all books in the product, since the filter in sheet1 checks for a matching version OR an empty string. You may notice that the unversioned pages in the sheet1 metadata use not-applicable; that's on purpose so that you can do things with them, like assign specific books to the sidenavs of these unversioned books.

To summarize the book version cases:

In the example above, the all-books sheet is missing an entry for Administrator’s Guide with version not-applicable. I'll leave that change up to you since I'm not sure what the path should be for unversioned pages (pcee/latest version/etc.)

There's one other issue with the compute product in all-books, and that's a missing pcee book as mentioned in https://github.com/hlxsites/prisma-cloud-docs-website/issues/64#issuecomment-1629733023

maxakuru commented 11 months ago

nothing to fix, closing