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

[TSVB] Fixes cursor type for topN charts with drilldowns #115333

Merged
merged 3 commits into from
Oct 21, 2021

Conversation

stratoula
Copy link
Contributor

@stratoula stratoula commented Oct 18, 2021

Summary

Fixes #109593

in TopN charts, when we are adding a drilldown, we want the cursor to change into a pointer. Although the logic seemed to exist, it was broken. This PR fixes the problem.

Elastic-1

@stratoula stratoula added Feature:TSVB TSVB (Time Series Visual Builder) Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.16.0 v8.0.0 release_note:fix labels Oct 18, 2021
@stratoula stratoula marked this pull request as ready for review October 18, 2021 13:26
@stratoula stratoula requested a review from a team as a code owner October 18, 2021 13:26
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors (Team:VisEditors)

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
visTypeTimeseries 488.4KB 488.5KB +34.0B

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@elastic elastic deleted a comment from kibanamachine Oct 20, 2021
row: {
cursor: 'pointer',
},
},
},
this.props
{
onClickStyle: typeof this.props.onClick === 'function',
Copy link
Contributor

@mbondyra mbondyra Oct 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know TSVB very well so I am not sure what sits in this.props (or what reactcss does 😅 ), but wouldn't it be safer to do

{
          ...this.props,
          onClickStyle: typeof this.props.onClick === 'function',

to not leave out anything? Honestly it's more of a question than review :D

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it too but then I read the reactcss documentation and styling works like that:

const styles = reactCSS({
  'default': {
    card: {
      background: '#fff',
      boxShadow: '0 2px 4px rgba(0,0,0,.15)',
    },
  },
  'zIndex-2': {
    card: {
      boxShadow: '0 4px 8px rgba(0,0,0,.15)',
    },
  },
}, {
  'zIndex-2': props.zIndex === 2,
})

You define the stylename and the condition. I don't think that by adding the props will make any change because this is not how reactcss works. Do you think I am missing something here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aaaaah... Makes sense. So it actually didn't make sense before because there's just this one custom style. Thanks for explaining!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly :)

Copy link
Contributor

@mbondyra mbondyra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on FF and it works correct now!

@stratoula stratoula added the auto-backport Deprecated - use backport:version if exact versions are needed label Oct 21, 2021
@stratoula stratoula merged commit 86345e2 into elastic:master Oct 21, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Oct 21, 2021
)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.16

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Oct 21, 2021
…115889)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed buildkite-ci Feature:TSVB TSVB (Time Series Visual Builder) release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TSVB visualization Top N incorrect cursor type when link url is applied to item
4 participants