ui: Split up `ContextMenu::render` into smaller methods (#26489)

This PR refactors the `ContextMenu::render` method to extract a couple
smaller methods from it.

The existing `render` method was suffering from its size, with some of
the `match` arms not being able to be formatted with `rustfmt`.

Release Notes:

- N/A
55a90f576aMarshall Bowers committed on 3/11/2025, 10:26:22 PM· committed by GitHubparent8d6abf6
1 file changedLine totals unavailable