From ded47591418804d4b5a31fb7c77e211cd8c7bd6e Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Thu, 18 Apr 2024 00:20:16 -0700 Subject: [PATCH] Modify the button of selectable component to fix the title overflow issue (#6465) (#6495) * Modify the button of selectable component to fix the title overflow issue Signed-off-by: Yuanqi(Ella) Zhu * update snapshot Signed-off-by: Yuanqi(Ella) Zhu --------- Signed-off-by: Yuanqi(Ella) Zhu (cherry picked from commit b619ccb5fea8b23a748d74ba3dec21aabb1a7765) Signed-off-by: github-actions[bot] # Conflicts: # CHANGELOG.md Co-authored-by: github-actions[bot] Co-authored-by: Lu Yu --- .../public/components/button_title.scss | 7 +++++++ .../create_data_source_menu.test.tsx.snap | 6 +++--- .../__snapshots__/data_source_selectable.test.tsx.snap | 10 +++++----- .../data_source_selectable/data_source_selectable.tsx | 5 +++-- 4 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 src/plugins/data_source_management/public/components/button_title.scss diff --git a/src/plugins/data_source_management/public/components/button_title.scss b/src/plugins/data_source_management/public/components/button_title.scss new file mode 100644 index 000000000000..66b32d4ee8b7 --- /dev/null +++ b/src/plugins/data_source_management/public/components/button_title.scss @@ -0,0 +1,7 @@ +.dataSourceComponentButtonTitle { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + width: auto; + max-width: 16ch; +} diff --git a/src/plugins/data_source_management/public/components/data_source_menu/__snapshots__/create_data_source_menu.test.tsx.snap b/src/plugins/data_source_management/public/components/data_source_menu/__snapshots__/create_data_source_menu.test.tsx.snap index c520768a6890..c705db9194b0 100644 --- a/src/plugins/data_source_management/public/components/data_source_menu/__snapshots__/create_data_source_menu.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/data_source_menu/__snapshots__/create_data_source_menu.test.tsx.snap @@ -104,7 +104,7 @@ Object { >