I think that the UI for expanding and collapsing text below headings is clumsy!
Expanding is clean, just click on the ‘three dots’ button, or use the keyboard toggle shortcut.
But collapsing means moving to a completely different location at the foot of the heading dropdown menu, or using the same keyboard shortcut.
If the user is about to use the keyboard for an edit, the keyboard shortcut works well enough.
However, a common use case might be where the user is browsing through a long body of text, using the mouse or trackpad, reviewing its content, by opening and closing successive collapsed sections to take a peek inside.
The present UI offers two awkward choices…
alternating mouse/trackpad movements between different locations: for scrolling, the expand button, and the click-drag movement for the separate collapse dropdown,
alternating between mouse/trackpad movements for scrolling, and switching your hand to the keyboard to toggle the shortcut for collapse/expand.
I think that a true ‘toggle button’ would be much better UI. Cleaner, less awkward, and immediately recognisable to all users.
My suggestion would be to change the existing ‘three dots’ button to a true toggle button:
If the text below is hidden then the button to the right of the heading would be a ‘+’ in a circle, always visible
When the button is clicked to expand, the text below is revealed, and the button changes to a ‘-’, but the button disappears as soon as the cursor is moved to another location.
Whenever the cursor is clicked into anywhere in any other heading, its ‘-’ button re-appears.
This means it would be possible to expand and immediately collapse the text below a heading, using a single toggle button, without having to move the cursor.
Hope this all makes sense!