helm-docs icon indicating copy to clipboard operation
helm-docs copied to clipboard

improve formatting of values table

Open kd7lxl opened this issue 4 years ago • 2 comments

Deeply nested values can cause the values table to grow really wide. The key field is not wrapped by default. Example: https://github.com/cortexproject/cortex-helm-chart/blob/cc9ef3dc/README.md#values

By adding zero-width spaces after the .s in the keys, the browser will wrap long keys when needed. Here's an example, notice the table is much narrower and much more readable: https://github.com/cortexproject/cortex-helm-chart/blob/f6454e5/README.md#values

kd7lxl avatar Aug 17 '21 22:08 kd7lxl

Hey @kd7lxl I like this change in principle and I'm sorry I hadn't looked at this until now. I have only one concern. I think quoted key components which contain dots should be left alone, e.g. controller.service.annotations."external-dns.alpha.kubernetes.io/hostname". This is a feature of helm-docs, to quote components of keys that contain dots to indicate that each component of the inner key is not nested. I don't think we should allow for splitting lines on these types of keys.

norwoodj avatar Apr 03 '22 15:04 norwoodj

Could you also, maybe in this PR, fix the formatting of the table when long defaults are used? Currently the description is completely hidden from the viewport. Another option would be to add an option to order the table columns to make the description show first.

image

Silthus avatar Apr 11 '24 14:04 Silthus