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] Annotation Preview Chart Type & Theme Enhancements #162408

Closed
Tracked by #184459
MichaelMarcialis opened this issue Jul 24, 2023 · 3 comments
Closed
Tracked by #184459

[Lens] Annotation Preview Chart Type & Theme Enhancements #162408

MichaelMarcialis opened this issue Jul 24, 2023 · 3 comments
Labels
enhancement New value added to drive a business result Feature:Lens 🧊 iceboxed impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@MichaelMarcialis
Copy link
Contributor

MichaelMarcialis commented Jul 24, 2023

In order to maintain consistency and offer the same amenities being planned for the upcoming color mapping preview feature, the annotation preview interface (outside of Lens, in the visualization library experience) should add:

  1. Visualization type selection
  2. Theme mode selection

Updated wireframes have been created to account for both of these enhancements via additions to the toolbar in the preview panel.

image

Related to: #158774

@MichaelMarcialis MichaelMarcialis added enhancement New value added to drive a business result Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Jul 24, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations)

@stratoula stratoula added the impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. label Jul 26, 2023
@nickofthyme
Copy link
Contributor

I was curious how the nested theme switcher would work from this design. AFAIK this is not currently implemented anywhere in kibana.

I did a small investigation to determine the practicality of this using EUI sandbox.

It appears this is possible by nesting an EuiThemeProvider in an EuiProvider. I have not tested the full extent of this so there could be cases or components that use the wrong theme tokens. Additionally, this is possible main because of our use of emotion (aka css-in-js) with the use of the useEuiTheme hook, thus if we are reusing components in this nested themed component, these components must exclusively use emotion any sass usage would likely refer to the wrong tokens.

So something like this...

const root = createRoot(document.getElementById("root"));
root.render(
  <EuiProvider cache={cache} colorMode="dark">
    <div
      style={{
        padding: 20
      }}
    >
      <ThemedComponent colorMode="Dark" />
      <div>
        <EuiThemeProvider colorMode="light">
          <ThemedComponent colorMode="Light" />
        </EuiThemeProvider>
      </div>
    </div>
  </EuiProvider>
);

function ThemedComponent({ colorMode, size }) {
  const { euiTheme } = useEuiTheme();

  return (
    <div
      style={{
        background: euiTheme.colors.lightestShade,
        height: "100px",
        width: "200px"
      }}
    >
      <h1>{colorMode} theme here</h1>
      <Demo />
    </div>
  );
}

Would result in something like this...

image

👍🏼

Based on work from #161914 I think we would use the KibanaThemeContextProvider in place of the EuiThemeProvider when implemented in kibana.

See full demo here

@drewdaemon drewdaemon added impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. and removed impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. labels Aug 10, 2023
@timductive timductive added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. and removed impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. labels Aug 23, 2023
@markov00
Copy link
Member

markov00 commented Jun 3, 2024

In order to provide better transparency of priorities, issues that will not be prioritized within the next 24 months are being closed.

Tracking request in Lens general improvements ice box #184459

@markov00 markov00 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Lens 🧊 iceboxed impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

7 participants