helm-docs
helm-docs copied to clipboard
improve formatting of values table
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
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.
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.