Work around for project dropdown overflows (#11030)
* Work around for project dropdown overflows The new hierarchical project dropdowns caused an issue because long project names are cut off by default. This makes it impossible to distinguish when the naming conventions puts the difference between project at the end of their name, for example: "Project with long name 1" and "Project with long name 2" will both show up as "Project with...". This commit adds a `title` attribute with the name, so hovering the option will give users the possibility of reading the full name. It also widens the result list in a rather hacky way. It works, but could cause the result list to be cut off by the screen edge if the project select is e.g. all the way on the right in the wp table. Closes https://community.openproject.org/projects/openproject/work_packages/43083/activity * Avoid that the input of the project edit field overflows the table cell (see #42939). Further, the current project is shown instead of a placeholder. * Add explanation for hacky work around Co-authored-by: Henriette Darge <h.darge@openproject.com>pull/11069/head
parent
b9cab7acab
commit
fef10d4d6b
@ -0,0 +1,26 @@ |
||||
/* This block is currently only used as an `appendTo` option |
||||
* for ng-select instances that need an option dropdown list that |
||||
* is wider than the input field it is attached to. |
||||
* |
||||
* You can use this by adding `appendTo=".op-wide-autocomplete-wrapper"` |
||||
* to any ng-select instance that needs it. |
||||
* |
||||
* Normally, ng-select propagates classes to the dropdowns when `appendTo` is used (see: |
||||
* https://github.com/ng-select/ng-select/issues/1361#issuecomment-537837586 ). |
||||
* Unfortunately for us, this does not work when using `ngClass` (see: |
||||
* https://github.com/ng-select/ng-select/issues/1627 ) |
||||
* |
||||
* So instead of simply adding a class to the dropdown, |
||||
* we have to add a specific class to the DOM-element it is attached to |
||||
* |
||||
* Note: This makes the panel wider to the right hand side, |
||||
* so it if the input is already at the very right end, the dropdown will propabyl be cut off. |
||||
*/ |
||||
|
||||
.op-wide-autocomplete-wrapper |
||||
position: absolute |
||||
|
||||
.ng-dropdown-panel |
||||
// This has to be important because ng-select sets |
||||
// the positioning styles directly on the element. |
||||
min-width: 200px !important |
Loading…
Reference in new issue