Skip to content

Commit

Permalink
Modify the button of selectable component to fix the title overflow i…
Browse files Browse the repository at this point in the history
…ssue

Signed-off-by: Yuanqi(Ella) Zhu <zhyuanqi@amazon.com>
  • Loading branch information
zhyuanqi authored and zhongnansu committed Apr 16, 2024
1 parent 4199162 commit b320316
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [BUG][Multiple Datasource] Refactor read-only component to cover more edge cases ([#6416](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6416))
- [BUG] Fix for checkForFunctionProperty so that order does not matter ([#6248](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6248))
- [Dynamic Configurations] Fix dynamic config API calls to pass correct input ([#6474](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6474))
- [BUG][Multiple Datasource] Modify the button of selectable component to fix the title overflow issue ([#6465](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6465))
- [BUG][Multiple Datasource] Validation succeed as long as status code in response is 200 ([#6399](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6399))
- [BUG][Multiple Datasource] Add validation for title length to be no longer than 32 characters [#6452](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6452))

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.dataSourceComponentButtonTitle {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: auto;
max-width: 16ch;
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ import {
} from '../data_source_menu/types';
import { DataSourceErrorMenu } from '../data_source_error_menu';
import { DataSourceItem } from '../data_source_item';
import './data_source_selectable.scss';
import { DataSourceDropDownHeader } from '../drop_down_header';
import '../button_title.scss';
import './data_source_selectable.scss';

interface DataSourceSelectableProps {
savedObjectsClient: SavedObjectsClientContract;
Expand Down Expand Up @@ -248,7 +249,7 @@ export class DataSourceSelectable extends React.Component<
const button = (
<>
<EuiButtonEmpty
className="euiHeaderLink"
className={`euiHeaderLink dataSourceComponentButtonTitle`}
onClick={this.onClick.bind(this)}
data-test-subj="dataSourceSelectableContextMenuHeaderLink"
aria-label={i18n.translate('dataSourceSelectable.dataSourceOptionsButtonAriaLabel', {
Expand Down

0 comments on commit b320316

Please sign in to comment.