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

[BUG] Exporting via reporting on dark mode broke #111

Closed
kavilla opened this issue May 5, 2023 · 5 comments · Fixed by #165
Closed

[BUG] Exporting via reporting on dark mode broke #111

kavilla opened this issue May 5, 2023 · 5 comments · Fixed by #165

Comments

@kavilla
Copy link
Member

kavilla commented May 5, 2023

@BT-93 commented on Wed May 03 2023

When dark mode is set and you export to either PNG or PDF the background of the exports is white.
This was not an issue prior to version 2.6 (I think).

To Reproduce
Steps to reproduce the behavior:

  1. Go to Advanced Settings
  2. Search for Dark Mode
  3. Set the slider to Dark Mode
  4. Go to a dashboard
  5. Select Reporting
  6. Go either PNG or PDF
  7. Exported doco background is white

Expected behavior
The background to be color #141519

OpenSearch Version
2.6 & 2.7

Dashboards Version
2.6 & 2.7

Plugins
The default ones

Screenshots
image

Host/Environment (please complete the following information):

  • OS: Windows 10
  • Browser and version: Chrome Version 113.0.5672.64 (Official Build) (64-bit)

Additional context
:)


@zhongnansu commented on Thu May 04 2023

@opensearch-project/triage Please transfer this issue to reporting repo https://github.com/opensearch-project/dashboards-reporting

@derek-ho
Copy link
Collaborator

@rupal-bq can you take a look here?

@wbeckler
Copy link

wbeckler commented Aug 9, 2023

I would propose that reporting should always export on a pure white background, because it is used for printing and emailing stuff for other people to print.

@dagneyb
Copy link

dagneyb commented Aug 9, 2023

@wbeckler - can we give the customer the option (default to report mirroring their dashboards settings, with an option to "print mode with white background" or something? I think given that most people don't print things anymore and are probably emailing reports, they likely actually want them to look how they have set their Dashboards to look. @kgcreative @mnkugler - thoughts?

@AMoo-Miki
Copy link
Contributor

AMoo-Miki commented Aug 10, 2023

When the user chooses to export a report, a new window is opened with the actual dashboard, visualization, or ..., the "source", and a screenshot of the page is taken and wrapped in a PDF. As a result, it will always match the color-scheme applied to OSD for the tenant the user is using.

If we wanted to allow users to choose a theme for exporting:

  • Technically, it is possible to inject a different theme's styling but for that the plugin will have to know every styling that OSD, the visualizations, and perhaps even other plugins would have added to render the different theme; that information is not readily available and is probably going to be a challenge to gather and make available to plugins.
  • When the plugin opens the new window to the "source", it can ask OSD to override the color-scheme via a query-string parameter. Such a mechanism doesn't exist but wouldn't be tough to create. However, because this plugin cannot close the window it opened and the new window is completely usable, the user will be left with a bunch of windows using the dark color-scheme and a bunch that use the light color-scheme. The closing of the new window is not technically impossible to solve.

In short, as long as the report is generated by the browser, we are better off leaving the export to match the user's chosen color-scheme, and if selection of theme is an option we want to offer, the choices are either technically prohibitive or detract from the user experience.

@mnkugler
Copy link

Thanks Miki! That makes sense and agree that we are better off leaving the export to match the user's chosen color-scheme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants