Maniphest T87008

EnumProperty warning hidden behind scrolling area
Closed, Resolved

Assigned To
Aaron Carlisle (Blendify)
Authored By
Sybren A. Stüvel (sybren)
Mar 29 2021, 11:15 AM
Tags
  • Documentation
  • BF Blender (2.93)
Subscribers
Aaron Carlisle (Blendify)
Campbell Barton (campbellbarton)
Sybren A. Stüvel (sybren)

Description

In the documentation of bpy.props.EnumProperty there is an important warning. This is how it is shown by default:

This is what you see when you scroll the parameters area:

Such an important warning should not be hidden.

Revisions and Commits

rB Blender

Related Objects

Mentioned In
rBf60ac5068a6a: PyDoc: remove CSS override for scrolling long enum lists
rB1c6b66c9cf80: PyDoc: replace in-lined enum references with links where possible
Mentioned Here
T76453: Some args/props in the API docs take *so much* space

Event Timeline

Sybren A. Stüvel (sybren) created this task.Mar 29 2021, 11:15 AM
Sybren A. Stüvel (sybren) updated the task description.
Sybren A. Stüvel (sybren) updated the task description.
Campbell Barton (campbellbarton) added a subscriber: Campbell Barton (campbellbarton).EditedMar 31 2021, 8:54 AM

Caused by doc/python_api/static/css/theme_overrides.css, fix for T76453: Some args/props in the API docs take *so much* space.

If reverted we get the very long icon lists back (which is arguably acceptable, as hiding information across all docs risks script authors missing important details, where as the long enum lists only impacts the user-interface methods).

Longer term large enum lists could be extracted into their own page which is linked to instead of including inline.

Campbell Barton (campbellbarton) added a subscriber: Aaron Carlisle (Blendify).Mar 31 2021, 8:56 AM
Aaron Carlisle (Blendify) changed the task status from Needs Triage to Confirmed.EditedMar 31 2021, 7:47 PM
Aaron Carlisle (Blendify) moved this task from Backlog to Blender Python/C API on the Documentation board.

If we are a bit more restrictive on the CSS selector, I have a solution that seems to work. I need to test it out a bit more to make sure it doesn't cause any regressions else where.

In doc/python_api/static/css/theme_overrides.css change .field-list li { to .field-list dd p {.

Test Page: https://docs.blender.org/api/master/bpy.types.EnumPropertyItem.html

Aaron Carlisle (Blendify) claimed this task.Mar 31 2021, 7:47 PM
Sybren A. Stüvel (sybren) added a comment.Apr 1 2021, 12:35 PM

If reverted we get the very long icon lists back (which is arguably acceptable, as hiding information across all docs risks script authors missing important details, where as the long enum lists only impacts the user-interface methods).

Personally I don't care much about the exact solution. If this warning is overlooked it can crash Blender, so it should simply be in a place where people actually see it. If that means taking it out of the parameter list and moving it into the main description of the function, that's fine by me.

Aaron Carlisle (Blendify) added a project: BF Blender (2.93).Apr 27 2021, 8:31 AM

I want to make sure this gets fixed for 2.93.

Aaron Carlisle (Blendify) moved this task from Backlog to Documentation on the BF Blender (2.93) board.Apr 27 2021, 8:32 AM
Aaron Carlisle (Blendify) closed this task as Resolved by committing rBa71d8ecb69ec: Docs: PyAPI: More specific css selector for long enums.Apr 29 2021, 12:26 AM
Aaron Carlisle (Blendify) added a commit: rBa71d8ecb69ec: Docs: PyAPI: More specific css selector for long enums.
Sybren A. Stüvel (sybren) added a comment.May 3 2021, 1:57 PM

Thanks for the fix, looks much better this way!

Campbell Barton (campbellbarton) mentioned this in rB1c6b66c9cf80: PyDoc: replace in-lined enum references with links where possible.May 31 2022, 6:20 AM
Campbell Barton (campbellbarton) mentioned this in rBf60ac5068a6a: PyDoc: remove CSS override for scrolling long enum lists.Jun 2 2022, 2:03 AM