-
Notifications
You must be signed in to change notification settings - Fork 918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Multiple Datasource] Fix style of data source option inside popover for data source selector, selectable, multi select components #6438
Conversation
Signed-off-by: Lu Yu <[email protected]>
Signed-off-by: Lu Yu <[email protected]>
Signed-off-by: Lu Yu <[email protected]>
Signed-off-by: Lu Yu <[email protected]>
display: inline-block; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change the name to _data_source_selectable.cscc as a underscore _ shows this is a internal style file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should follow the dev guide Do not use the underscore _ SASS file naming pattern when importing directly into a javascript file.
in https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/DEVELOPER_GUIDE.md#sass-files
@@ -138,7 +139,7 @@ export const DataSourceFilterGroup: React.FC<DataSourceFilterGroupProps> = ({ | |||
data-test-subj="dataSourceMultiSelectFieldSearch" | |||
/> | |||
</EuiPopoverTitle> | |||
<div className="ouiFilterSelect__items" style={{ maxHeight: 400, overflow: 'scroll' }}> | |||
<div className="dataSourceFilterGroupItems" style={{}}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove style={{}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
Signed-off-by: Lu Yu <[email protected]>
Signed-off-by: Lu Yu <[email protected]>
…for data source selector, selectable, multi select components (#6438) * adjust style Signed-off-by: Lu Yu <[email protected]> * fix style for data source components Signed-off-by: Lu Yu <[email protected]> * clean up Signed-off-by: Lu Yu <[email protected]> * add change log Signed-off-by: Lu Yu <[email protected]> * remove unused style prop Signed-off-by: Lu Yu <[email protected]> * fix snapshot Signed-off-by: Lu Yu <[email protected]> --------- Signed-off-by: Lu Yu <[email protected]> (cherry picked from commit eef417c) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
…for data source selector, selectable, multi select components (#6438) (#6467) * adjust style Signed-off-by: Lu Yu <[email protected]> * fix style for data source components Signed-off-by: Lu Yu <[email protected]> * clean up Signed-off-by: Lu Yu <[email protected]> * add change log Signed-off-by: Lu Yu <[email protected]> * remove unused style prop Signed-off-by: Lu Yu <[email protected]> * fix snapshot Signed-off-by: Lu Yu <[email protected]> --------- Signed-off-by: Lu Yu <[email protected]> (cherry picked from commit eef417c) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
This change fixes the style of data source selector/selectable/multi selectable components to hide the test overflow to address the long data source name problem
Issues Resolved
Fixes #6430
Screenshot
Testing the changes
UI should show default icon and truncate the long data source name
Function
data source selector
defaultOption={[{id: ''}]}
data source selectable
activeOption: [{id: ''}],
data source selector
data source selectable
empty array passed to data source selector should show placeholder text
invalid data source id passed in
data source selector
defaultOption={[{id: 'badid'}]}
data source selectable
activeOption: [{id: 'invalid'}],
data source selector
defaultOption={[{id: ''}]}
data source selectable
activeOption: [{id: ''}],
data source selector
data source selectable
data source selector
data source selectable
data source selector
data source selectable
Check List
yarn test:jest
yarn test:jest_integration