zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.92k stars 6.65k forks source link

Docs: Enums should be shown with one value per line #81716

Open Thalley opened 1 day ago

Thalley commented 1 day ago

Is your enhancement proposal related to a problem? Please describe. Today enums are just a long string it seems, which isn't very readable.

For example at https://docs.zephyrproject.org/latest/doxygen/html/group__bt__audio.html we have image

If you go to a specific enum it's show as image

which is much more readable.

Describe the solution you'd like If we want to keep the enum declarations like above, then instead of

bt_audio_codec_cap_type {
  BT_AUDIO_CODEC_CAP_TYPE_FREQ = 0x01 , BT_AUDIO_CODEC_CAP_TYPE_DURATION = 0x02 , BT_AUDIO_CODEC_CAP_TYPE_CHAN_COUNT = 0x03 , BT_AUDIO_CODEC_CAP_TYPE_FRAME_LEN = 0x04 ,
  BT_AUDIO_CODEC_CAP_TYPE_FRAME_COUNT = 0x05
}

it should be

bt_audio_codec_cap_type {
  BT_AUDIO_CODEC_CAP_TYPE_FREQ = 0x01 , 
  BT_AUDIO_CODEC_CAP_TYPE_DURATION = 0x02 , 
  BT_AUDIO_CODEC_CAP_TYPE_CHAN_COUNT = 0x03 , 
  BT_AUDIO_CODEC_CAP_TYPE_FRAME_LEN = 0x04 ,
  BT_AUDIO_CODEC_CAP_TYPE_FRAME_COUNT = 0x05
}

Describe alternatives you've considered N/A

Additional context N/A

kartben commented 23 hours ago

@Thalley what you're suggesting is definitely possible, but in the interest of keeping things more concise in the "summary" section, how about just dropping the enum values, since can always click to get the nicely formatted (and more detailed) table?

image

Your proposition/ask (note how this takes A LOT more vertical space, with limited added value IMO)

image

Thalley commented 23 hours ago

Yeah, that works too, since we have a nice overview when clicking on a specific enum.

Not sure whether not having the literal values visible is a downside for some users though