Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
364f9ac
[Lens] Replace scss to css-in-js for Lens codebase
mbondyra Feb 5, 2025
49ea932
datapanel.css
mbondyra Feb 6, 2025
a3dbcc1
formula
mbondyra Feb 6, 2025
cb37b7f
chart switch styles
mbondyra Feb 6, 2025
73ed232
dimension editor
mbondyra Feb 6, 2025
8c7918c
toolbar button
mbondyra Feb 6, 2025
802d86d
remove unused styles
mbondyra Feb 17, 2025
e6ffee6
remove unused property
mbondyra Feb 17, 2025
e9e8925
wip
mbondyra Feb 17, 2025
7e0472d
wip
mbondyra Feb 18, 2025
9d5764b
suggestion panel
mbondyra Feb 18, 2025
fbdbc66
workspace wip
mbondyra Feb 18, 2025
b396cbf
layer_panel
mbondyra Feb 19, 2025
e73f17b
wip
mbondyra Feb 19, 2025
48d28ab
wip
mbondyra Feb 19, 2025
2e9eae1
wip
mbondyra Feb 19, 2025
e523c89
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Feb 19, 2025
8ed57a0
wip
mbondyra Feb 19, 2025
09eacd5
tests
mbondyra Feb 21, 2025
4776baa
wip
mbondyra Feb 21, 2025
2fcdb81
camelCase for styles objects
mbondyra Feb 21, 2025
beb51b2
revert some
mbondyra Feb 21, 2025
e140913
change name
mbondyra Feb 21, 2025
230f070
remove asynchronousity
mbondyra Feb 21, 2025
5d3bf69
pass the theme explicitly to remove the console errors when testing
mbondyra Feb 21, 2025
4313f1f
remove the line we're repeating
mbondyra Feb 21, 2025
04c3340
fix breaking things
mbondyra Mar 3, 2025
b197bf3
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Mar 3, 2025
c602a03
Merge commit 'e24c1c3ee5f69c1c67d39e072ffd36c84bb230e7' into lens/scs…
mbondyra Mar 4, 2025
b6a88ca
Michael's feedback
mbondyra Mar 4, 2025
55f2301
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Mar 4, 2025
a1b1bbf
fullscreen formula fix
mbondyra Mar 4, 2025
8350564
Merge branch 'lens/scss-to-css-in-js' of github.com:mbondyra/kibana i…
mbondyra Mar 4, 2025
da08fac
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Mar 4, 2025
c6d567b
Merge branch 'main' into lens/scss-to-css-in-js
mbondyra Mar 4, 2025
2d96b13
Merge branch 'main' into lens/scss-to-css-in-js
mbondyra Mar 5, 2025
689b11e
Merge branch 'main' into lens/scss-to-css-in-js
mbondyra Mar 10, 2025
b35d647
Merge branch 'main' into lens/scss-to-css-in-js
dej611 Mar 10, 2025
6e52e1c
Merge commit 'e0bf98e45a6c2b4e138cac601c6082ca68fb8301' into lens/scs…
mbondyra Mar 11, 2025
ba7d2eb
code review
mbondyra Mar 11, 2025
9c33a99
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Mar 11, 2025
a70e7c2
Merge commit '2c883c10181d271ce51ba0fdd10837d35d06b6a4' into lens/scs…
mbondyra Mar 12, 2025
5f07f8b
Merge commit '1666df767aba9c05ef61402964beb5ab7bf78e34' into lens/scs…
mbondyra Mar 12, 2025
b32a300
add type
mbondyra Mar 12, 2025
b5a23e8
types
mbondyra Mar 12, 2025
dfeefcd
cr
mbondyra Mar 12, 2025
f72d403
Merge commit 'a2d2054148b8cd7a062cfabd477338a3fd55428b' into lens/scs…
mbondyra Mar 14, 2025
7f32ce8
Merge branch 'main' into lens/scss-to-css-in-js
markov00 Mar 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
"jest",
"node",
"react",
"@emotion/css/types"
],
},
"include": [
"**/*.ts",
"**/*.tsx",
"../../../../../typings/**/*"
],
"kbn_references": [
"@kbn/ui-theme"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@ function DimensionButtonImpl({
<EuiFlexItem>
<EuiToolTip content={message?.content} position="left">
<EuiLink
className="lnsLayerPanel__dimensionLink"
css={css`
width: 100%;
&:focus {
background-color: transparent;
text-decoration-thickness: ${euiTheme.border.thin} !important;
Comment thread
markov00 marked this conversation as resolved.
}
&:hover {
text-decoration: none;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ export const DimensionTrigger = ({
<span
className="dimensionTrigger__textLabel"
css={css`
.domDroppable--replacing & {
text-decoration: line-through;
}
transition: background-color ${euiThemeVars.euiAnimSpeedFast} ease-in-out;

&:hover {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
'10'
);

await testSubjects.click('unifiedHistogramEditFlyoutVisualization');
expect(await getCurrentVisTitle()).to.be('Line');
expect(await discover.getVisContextSuggestionType()).to.be('histogramForESQL');
});
Expand Down
69 changes: 0 additions & 69 deletions x-pack/platform/plugins/shared/lens/public/_mixins.scss

This file was deleted.

10 changes: 0 additions & 10 deletions x-pack/platform/plugins/shared/lens/public/_variables.scss

This file was deleted.

40 changes: 0 additions & 40 deletions x-pack/platform/plugins/shared/lens/public/app_plugin/app.scss

This file was deleted.

15 changes: 13 additions & 2 deletions x-pack/platform/plugins/shared/lens/public/app_plugin/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* 2.0.
*/

import './app.scss';
import React, { useState, useEffect, useCallback, useMemo, useRef } from 'react';
import { i18n } from '@kbn/i18n';
import type { TimeRange } from '@kbn/es-query';
import { EuiConfirmModal } from '@elastic/eui';
import { useExecutionContext, useKibana } from '@kbn/kibana-react-plugin/public';
import { OnSaveProps } from '@kbn/saved-objects-plugin/public';
import type { VisualizeFieldContext } from '@kbn/ui-actions-plugin/public';
import { css } from '@emotion/react';
import { LensAppProps, LensAppServices } from './types';
import { LensTopNavMenu } from './lens_top_nav';
import { AddUserMessages, EditorFrameInstance, Simplify, UserMessagesGetter } from '../types';
Expand Down Expand Up @@ -437,7 +437,18 @@ export function App({

return (
<>
<div className="lnsApp" data-test-subj="lnsApp" role="main">
<div
data-test-subj="lnsApp"
className="lnsApp"
role="main"
css={css`
flex: 1 1 auto;
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
`}
>
<LensTopNavMenu
initialInput={initialInput}
redirectToOrigin={redirectToOrigin}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ import { useKibana } from '@kbn/kibana-react-plugin/public';
import { DataViewPickerProps } from '@kbn/unified-search-plugin/public';
import { getManagedContentBadge } from '@kbn/managed-content-badge';
import moment from 'moment';
import { EuiCallOut } from '@elastic/eui';
import { EuiCallOut, UseEuiTheme, euiBreakpoint } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { SerializedStyles, css } from '@emotion/react';
import { LENS_APP_LOCATOR } from '../../common/locator/locator';
import { LENS_APP_NAME } from '../../common/constants';
import { LensAppServices, LensTopNavActions, LensTopNavMenuProps } from './types';
Expand Down Expand Up @@ -102,6 +103,23 @@ function getSaveButtonMeta({
}
}

const navItemWithDividerStyles = (euiThemeContext: UseEuiTheme) => css`
${euiBreakpoint(euiThemeContext, ['m', 'l', 'xl'])} {
margin-right: ${euiThemeContext.euiTheme.size.m};
position: relative;
&:after {
border-right: ${euiThemeContext.euiTheme.border.thin};
bottom: 0;
content: '';
display: block;
pointer-events: none;
position: absolute;
right: -${euiThemeContext.euiTheme.size.s};
top: 0;
}
}
`;

function getLensTopNavConfig(options: {
isByValueMode: boolean;
actions: LensTopNavActions;
Expand All @@ -123,7 +141,10 @@ function getLensTopNavConfig(options: {
contextFromEmbeddable,
isByValueMode,
} = options;
const topNavMenu: TopNavMenuData[] = [];

const topNavMenu: Array<
TopNavMenuData | ({ css: ({ euiTheme }: UseEuiTheme) => SerializedStyles } & TopNavMenuData)
> = [];

const showSaveAndReturn = actions.saveAndReturn.visible;

Expand All @@ -150,13 +171,13 @@ function getLensTopNavConfig(options: {
values: { contextOriginatingApp },
}),
run: actions.goBack.execute,
className: 'lnsNavItem__withDivider',
testId: 'lnsApp_goBackToAppButton',
description: i18n.translate('xpack.lens.app.goBackLabel', {
defaultMessage: `Go back to {contextOriginatingApp}`,
values: { contextOriginatingApp },
}),
disableButton: !actions.goBack.enabled,
css: navItemWithDividerStyles,
});
}

Expand All @@ -169,12 +190,12 @@ function getLensTopNavConfig(options: {
label: exploreDataInDiscoverLabel,
run: actions.getUnderlyingDataUrl.execute,
testId: 'lnsApp_openInDiscover',
className: 'lnsNavItem__withDivider',
description: exploreDataInDiscoverLabel,
disableButton: !actions.getUnderlyingDataUrl.enabled,
tooltip: actions.getUnderlyingDataUrl.tooltip,
target: '_blank',
href: actions.getUnderlyingDataUrl.getLink?.(),
css: navItemWithDividerStyles,
});
}

Expand Down Expand Up @@ -210,11 +231,11 @@ function getLensTopNavConfig(options: {
defaultMessage: 'Settings',
}),
run: actions.openSettings.execute,
className: 'lnsNavItem__withDivider',
testId: 'lnsApp_settingsButton',
description: i18n.translate('xpack.lens.app.settingsAriaLabel', {
defaultMessage: 'Open the Lens settings menu',
}),
css: navItemWithDividerStyles,
});

if (actions.cancel.visible) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,6 @@ export async function mountApp(
window.dispatchEvent(new HashChangeEvent('hashchange'));
});

params.element.classList.add('lnsAppWrapper');

render(
<KibanaRenderContextProvider {...coreStart}>
<KibanaContextProvider services={lensServices}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export const FlyoutWrapper = ({
margin-left: -${euiThemeVars.euiFormMaxWidth};
pointer-events: none;
.euiFlyoutBody__overflow {
transform: initial;
Comment thread
mbondyra marked this conversation as resolved.
-webkit-mask-image: none;
padding-left: inherit;
margin-left: inherit;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { UseEuiTheme } from '@elastic/eui';
import { css } from '@emotion/react';

export const dataPanelStyles = ({ euiTheme }: UseEuiTheme) => {
return css`
padding: ${euiTheme.size.base} ${euiTheme.size.base} 0;
.unifiedFieldListItemButton.kbnFieldButton {
background: none;
box-shadow: none;
margin-bottom: calc(${euiTheme.size.xs} / 2);
}
.unifiedFieldListItemButton__dragging {
background: ${euiTheme.colors.backgroundBasePlain};
}
`;
};

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* 2.0.
*/

import './field_item.scss';

import React, { useCallback, useState, useMemo } from 'react';
import { EuiText, EuiButton, EuiPopoverFooter } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
Expand Down Expand Up @@ -251,6 +249,10 @@ export function InnerFieldItem(props: FieldItemProps) {
isOpen={infoIsOpen}
closePopover={closePopover}
panelClassName="lnsFieldItem__fieldPanel"
panelStyle={{
minWidth: '260px',
maxWidth: '300px',
}}
initialFocus=".lnsFieldItem__fieldPanel"
data-test-subj="lnsFieldListPanelField"
panelProps={{
Expand Down

This file was deleted.

Loading
Loading