Allow rendering related selector options as something other than <li>.

Review Request #14134 — Created Sept. 2, 2024 and submitted — Latest diff uploaded

Information

Djblets
release-5.x

Reviewers

The related object selector had an issue where some selected options
were wrapping is very ugly ways. The implementation of this isn't
particularly pretty or flexible, and we really need to just rebuild it
all on top of a modern system, but for now, this change is going to
allow us to improve the situation.

This adds a couple static items to the selector class, optionTagName
and autoAddClose. This allows subclasses to change the type of tag
which is used for the individual selected items, and to control whether
we append the close/remove action. With these, a subclass can choose
other layouts for the selected items, such as a <table>. Some basic
styles for using tables are included now as well.

Updated the user selector subclass in Review Board to use a table
instead of a list, and saw that lists of selected users that included
very long usernames or real names no longer wrapped in terrible ways.

Commits

Files