word wrap longer listitems in lookup #1778
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When lookup lists contain long content, they very much overflow the container.
Some of our content is Very long, making them fall of the screen even.
These style tweaks make them as long as needed, but not longer than the container.
The calculated inline styled width of the elements makes it a little bit more exotic, but ok. I kept them separate from the other ui-autocomplete styles because I'm not completely sure we don't need more specific selectors for this added styling/behavior.
I made (part of) the entity "Hubert Wolfeschlegelsteinhausenbergerdorff" on your demo site to show this behavior, as a relatable entity for instance in https://demo.collectiveaccess.org/editor/objects/ObjectEditor/Save/Screen35/object_id/5
(One of the Guinness World Record holders, just as example not our content in reality)
I think ui-autocomplete class is -also because of the not-greedy behavior implementation- ok here as overall selector for this behavior (but as I introduced, not entirely sure).
One future feature that could be nice to have though would be to have the ui parts labeled more verbose (name/code maybe as #id or class).
Sometimes more specific tweaks could come in ux-handy, and the P1790ObjectFormElement_1 ui-id-13's make that a litte more brittle then #ui-the-one-with-the-long-names :)
Could that be a consideration ? This might also be one of those memories from the past where Drupal was perhaps overly verbose at times, but it made modifications possible to the atomic level almost :p