Skip to content

Commit

Permalink
fix(ui): Custom Dashboard name overflows. (#7124)
Browse files Browse the repository at this point in the history
* fix(ui): Custom Dashboard name overflows.

* fix(ui): avoid dashboard button being too long

---------

Co-authored-by: YannC <[email protected]>
  • Loading branch information
Piyush-r-bhaskar and Skraye committed Feb 3, 2025
1 parent 3f2d910 commit fcfee51
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ui/src/components/filter/KestraFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,7 @@ $dashboards: 52px;
}
&.dashboards {
min-width: $dashboards;
max-width: calc(100% - $included - $dashboards);
}
}
Expand Down Expand Up @@ -872,6 +873,7 @@ $dashboards: 52px;
.filters-select {
& .el-select-dropdown {
width: auto !important;
max-width: 300px;
&:has(.el-select-dropdown__empty) {
width: auto !important;
Expand Down
12 changes: 10 additions & 2 deletions ui/src/components/filter/segments/Dashboards.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<el-dropdown trigger="click" placement="bottom-end">
<KestraIcon placement="bottom">
<el-button :icon="Menu">
{{ selectedDashboard ?? $t('default_dashboard') }}
<el-button :icon="Menu" class="main-button d-inline">
<span class="text-truncate">{{ selectedDashboard ?? $t('default_dashboard') }}</span>
</el-button>
</KestraIcon>

Expand Down Expand Up @@ -141,4 +141,12 @@
.items {
max-height: 160px !important; // 5 visible items
}
.main-button {
max-width: 300px;
span {
max-width: 250px;
}
}
</style>

0 comments on commit fcfee51

Please sign in to comment.