-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Lens] Remove scss from annotations plugin, visualization-ui-components and gauge expression #208891
base: main
Are you sure you want to change the base?
[Lens] Remove scss from annotations plugin, visualization-ui-components and gauge expression #208891
Changes from all commits
fa77ee1
64ce159
22ca894
61d4f29
ae1d1ae
770a7be
552883d
2112f74
56d998a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,14 +7,13 @@ | |
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
import './field_picker.scss'; | ||
import React from 'react'; | ||
import { i18n } from '@kbn/i18n'; | ||
import classNames from 'classnames'; | ||
import { comboBoxFieldOptionMatcher } from '@kbn/field-utils'; | ||
import { EuiComboBox, EuiComboBoxOptionOption, EuiComboBoxProps } from '@elastic/eui'; | ||
import { FieldIcon } from '@kbn/field-utils/src/components/field_icon'; | ||
import { calculateWidthFromCharCount } from '@kbn/calculate-width-from-char-count'; | ||
import { euiThemeVars } from '@kbn/ui-theme'; | ||
import type { FieldOptionValue, FieldOption } from './types'; | ||
|
||
export interface FieldPickerProps<T extends FieldOptionValue> | ||
|
@@ -63,10 +62,10 @@ export function FieldPicker<T extends FieldOptionValue = FieldOptionValue>( | |
className="eui-alignMiddle" | ||
/> | ||
) : null, | ||
className: classNames({ | ||
'lnFieldPicker__option--incompatible': !fieldOption.compatible, | ||
'lnFieldPicker__option--nonExistant': !fieldOptionExists, | ||
}), | ||
css: { | ||
color: !fieldOption.compatible ? euiThemeVars.euiColorLightShade : undefined, | ||
backgroundColor: !fieldOptionExists ? euiThemeVars.euiColorLightestShade : undefined, | ||
}, | ||
Comment on lines
+65
to
+68
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment here as previous. Is there anything that can be done here to avoid repeating the same styles? |
||
}; | ||
}), | ||
}; | ||
|
@@ -77,10 +76,10 @@ export function FieldPicker<T extends FieldOptionValue = FieldOptionValue>( | |
prepend: otherAttr.value.dataType ? ( | ||
<FieldIcon type={otherAttr.value.dataType} fill="none" className="eui-alignMiddle" /> | ||
) : null, | ||
className: classNames({ | ||
'lnFieldPicker__option--incompatible': !compatible, | ||
'lnFieldPicker__option--nonExistant': !exists, | ||
}), | ||
css: { | ||
color: !compatible ? euiThemeVars.euiColorLightShade : undefined, | ||
backgroundColor: !exists ? euiThemeVars.euiColorLightestShade : undefined, | ||
}, | ||
}; | ||
}); | ||
|
||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,11 +18,14 @@ import { | |
EuiFlexGroup, | ||
EuiIconTip, | ||
EuiPopoverProps, | ||
euiTextBreakWord, | ||
useEuiFontSize, | ||
} from '@elastic/eui'; | ||
import type { DataViewBase, Query } from '@kbn/es-query'; | ||
import { css } from '@emotion/react'; | ||
import { euiThemeVars } from '@kbn/ui-theme'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like the EUI team is asking people to move away from using Before: import { EuiIcon, EuiCode, EuiText, useEuiTheme } from '@elastic/eui';
height: ${euiThemeVars.euiSizeXS} / 2; After: import { useEuiTheme } from '@elastic/eui'
const { euiTheme } = useEuiTheme();
height: ${euiTheme.size.xs} / 2; |
||
import { QueryInput, validateQuery } from '.'; | ||
import type { QueryInputServices } from '.'; | ||
import './filter_query_input.scss'; | ||
|
||
const filterByLabel = i18n.translate('visualizationUiComponents.filterQueryInput.label', { | ||
defaultMessage: 'Filter by', | ||
|
@@ -100,6 +103,11 @@ export function FilterQueryInput({ | |
isOpen={filterPopoverOpen} | ||
closePopover={onClosePopup} | ||
display="block" | ||
panelProps={{ | ||
css: css` | ||
width: 960px; | ||
`, | ||
}} | ||
panelClassName="filterQueryInput__popover" | ||
initialFocus={dataTestSubj ? `textarea[data-test-subj='${dataTestSubj}']` : undefined} | ||
button={ | ||
|
@@ -113,6 +121,12 @@ export function FilterQueryInput({ | |
onClick={() => { | ||
setFilterPopoverOpen(!filterPopoverOpen); | ||
}} | ||
css={css` | ||
${euiTextBreakWord()}; | ||
${useEuiFontSize('s')}; | ||
min-height: ${euiThemeVars.euiSizeXL}; | ||
width: 100%; | ||
`} | ||
color={isInputFilterValid ? 'text' : 'danger'} | ||
title={i18n.translate( | ||
'visualizationUiComponents.filterQueryInput.clickToEdit', | ||
|
This file was deleted.
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.
This same style is used multiple times throughout this PR. To keep things DRY, would it be better to store this style in a separate
.style.ts
file and reference that one style in all locations, rather than repeating the style?