Skip to content
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 embeddable doesn't set proper attributes when no results found #106085

Closed
Dosant opened this issue Jul 19, 2021 · 1 comment · Fixed by #106163
Closed

Lens embeddable doesn't set proper attributes when no results found #106085

Dosant opened this issue Jul 19, 2021 · 1 comment · Fixed by #106163
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens impact:critical This issue should be addressed immediately due to a critical level of impact on the product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects

Comments

@Dosant
Copy link
Contributor

Dosant commented Jul 19, 2021

Kibana version: master, 7.x, maybe earlier

Describe the bug:

Dashboard uses a set of attributes on embeddable panels to let reporting and functional tests know when panels finished loading or errored out. look for data-render-complete, data-shared-item etc.

Looks like lens embeddable has a bug, that it doesn't set a proper set of attributes in "no results" state:

<div class="euiPanel euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow embPanel" data-test-subj="embeddablePanel" data-test-embeddable-id="aa591c29-1a31-4ee1-a71d-b829c06fd162" role="figure" aria-labelledby="ic04cea60-e886-11eb-833f-f5beaf3a9b2f"><div class="embPanel__header embPanel__header--floater"><div class="euiPopover euiPopover--anchorDownRight embPanel__optionsMenuPopover" data-test-subj="embeddablePanelContextMenuClosed"><div class="euiPopover__anchor"><button class="euiButtonIcon euiButtonIcon--text euiButtonIcon--empty euiButtonIcon--xSmall embPanel__optionsMenuButton" type="button" aria-label="Panel options" data-test-subj="embeddablePanelToggleMenuIcon"><svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" class="euiIcon euiIcon--medium euiIcon--inherit euiIcon-isLoaded euiButtonIcon__icon" focusable="false" role="img" aria-hidden="true"><path d="M0 6h4v4H0V6zm1 1v2h2V7H1zm5-1h4v4H6V6zm1 1v2h2V7H7zm5-1h4v4h-4V6zm1 3h2V7h-2v2z"></path></svg></button></div></div><span id="ic04cea60-e886-11eb-833f-f5beaf3a9b2f" class="euiScreenReaderOnly">Dashboard panel</span></div><div class="embPanel__content"><div class="lnsExpressionRenderer"><div class="expExpressionRenderer lnsExpressionRenderer__component"><div class="expExpressionRenderer__expression" style="padding: 8px;"><div class="euiText euiText--extraSmall lnsChart__empty"><div class="euiTextAlign euiTextAlign--center"><div class="euiTextColor euiTextColor--subdued"><svg viewBox="0 0 30 22" width="30" height="22" fill="none" xmlns="http://www.w3.org/2000/svg" class="euiIcon euiIcon--large euiIcon--subdued" focusable="false" role="img" aria-hidden="true"><path d="M25 0a1 1 0 011 1v14a1 1 0 01-1 1H5a1 1 0 01-1-1V1a1 1 0 011-1h20zm-9.878 3c-1.887 0-3.265 1.107-3.26 2.61-.005 1.054.67 1.938 1.672 2.157v.067l-.155.03a2.453 2.453 0 00-1.879 2.394C11.495 11.84 12.997 13 15.122 13c2.105 0 3.612-1.16 3.617-2.742-.005-1.217-.903-2.234-2.035-2.424v-.067l.162-.042c.896-.275 1.507-1.12 1.511-2.116C18.373 4.112 16.994 3 15.122 3zm0 5.542c1.036 0 1.796.665 1.806 1.592-.01.898-.718 1.507-1.806 1.507-1.103 0-1.816-.609-1.806-1.507-.01-.932.755-1.592 1.806-1.592zm0-4.164c.908 0 1.53.561 1.54 1.398-.01.85-.651 1.43-1.54 1.43-.903 0-1.55-.584-1.54-1.43-.01-.837.618-1.398 1.54-1.398z" class="lensChartIcon__accent"></path><path d="M1 18h28a1 1 0 011 1v2a1 1 0 01-1 1H1a1 1 0 01-1-1v-2a1 1 0 011-1z" class="lensChartIcon__subdued"></path></svg><div class="euiSpacer euiSpacer--s"></div><p>No results found</p></div></div></div></div></div></div></div></div>

When loaded and has data, attributes are set correctly:

<div data-shared-item="true" data-render-complete="true" data-rendering-count="1" data-test-subj="lnsVisualizationContainer" class="lnsMetricExpression__container lnsVisualizationContainer"

Expected behavior:

In "no results state" all data-render data-shared attributes should be present

Screenshots (if relevant):

Problem with this state:

Screen Shot 2021-07-19 at 13 46 57

Any additional context:

@Dosant Dosant added bug Fixes for quality problems that affect the customer experience Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Jul 19, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@kibanamachine kibanamachine added this to Long-term goals in Lens Jul 19, 2021
@Dosant Dosant changed the title Lens embeddable doesn't set [share] attributes when no results found Lens embeddable doesn't set proper attributes when no results found Jul 19, 2021
@stratoula stratoula moved this from Long-term goals to Priority bugs in Lens Jul 19, 2021
@wylieconlon wylieconlon self-assigned this Jul 19, 2021
@timductive timductive added the impact:critical This issue should be addressed immediately due to a critical level of impact on the product. label Jul 20, 2021
Lens automation moved this from Priority bugs to Done Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens impact:critical This issue should be addressed immediately due to a critical level of impact on the product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
No open projects
Lens
  
Done
Development

Successfully merging a pull request may close this issue.

4 participants