Skip to content

Commit

Permalink
[Lens] Value based ESQL followup (elastic#175691)
Browse files Browse the repository at this point in the history
## Summary

Follow up of elastic#171081

- Address Julia's last comment on the PR
- Fix the veil bug correctly as Drew proposed here
elastic#175550 instead of adding a
variable in the embeddable level as I did in the aforementioned PR. We
dont want the veil in the embeddable level

---------

Co-authored-by: Julia Rechkunova <[email protected]>
  • Loading branch information
2 people authored and CoenWarmer committed Feb 15, 2024
1 parent c4a45b4 commit 17c5202
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { Datatable } from '@kbn/expressions-plugin/common';
import { useDiscoverHistogram } from './use_discover_histogram';
import { type DiscoverMainContentProps, DiscoverMainContent } from './discover_main_content';
import { useAppStateSelector } from '../../services/discover_app_state_container';
import { FetchStatus } from '../../../types';

export interface DiscoverHistogramLayoutProps extends DiscoverMainContentProps {
container: HTMLElement | null;
Expand Down Expand Up @@ -54,8 +55,7 @@ export const DiscoverHistogramLayout = ({
if (
isPlainRecord &&
datatable &&
datatable &&
['partial', 'complete'].includes(datatable.fetchStatus)
[FetchStatus.PARTIAL, FetchStatus.COMPLETE].includes(datatable.fetchStatus)
) {
return {
type: 'datatable' as 'datatable',
Expand Down
1 change: 0 additions & 1 deletion src/plugins/unified_histogram/public/chart/histogram.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ export function Histogram({
{...lensProps}
disableTriggers={disableTriggers}
disabledActions={disabledActions}
shouldUseSizeTransitionVeil={false}
onFilter={onFilter}
onBrushEnd={onBrushEnd}
withDefaultActions={withDefaultActions}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ export const VisualizationWrapper = ({
onRender$={onRenderHandler}
inspectorAdapters={lensInspector.adapters}
executionContext={executionContext}
shouldUseSizeTransitionVeil={true}
renderMode="edit"
renderError={(errorMessage?: string | null, error?: ExpressionRenderError | null) => {
const errorsFromRequest = getOriginalRequestErrorMessages(error || null);
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/lens/public/embeddable/embeddable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ interface LensBaseEmbeddableInput extends EmbeddableInput {
style?: React.CSSProperties;
className?: string;
noPadding?: boolean;
shouldUseSizeTransitionVeil?: boolean;
onBrushEnd?: (data: Simplify<BrushTriggerEvent['data'] & PreventableEvent>) => void;
onLoad?: (
isLoading: boolean,
Expand Down Expand Up @@ -1153,7 +1152,6 @@ export class Embeddable
this.logError('runtime');
}}
noPadding={this.visDisplayOptions.noPadding}
shouldUseSizeTransitionVeil={this.input.shouldUseSizeTransitionVeil}
/>
</KibanaThemeProvider>
<MessagesBadge
Expand Down

0 comments on commit 17c5202

Please sign in to comment.