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

[Discover] Fix dark theme issues by removing deprecated components #163387

Merged
merged 14 commits into from
Aug 11, 2023

Conversation

jughosta
Copy link
Contributor

@jughosta jughosta commented Aug 8, 2023

Summary

This PR fixes dark mode issues which surfaced after #161914 and #163103

@jughosta jughosta added Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Aug 8, 2023
@jughosta jughosta self-assigned this Aug 8, 2023
@jughosta
Copy link
Contributor Author

jughosta commented Aug 8, 2023

Hi @clintandrewhall and @cee-chen,

Could you please check if this PR correctly addresses the bug with theme/styles #163332 ?

text: toMountPoint(<MarkdownSimple>{error.message}</MarkdownSimple>, {
theme: core.theme,
i18n: core.i18n,
}),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@clintandrewhall Do we still need to wrap toast's text with toMountPoint?

@jughosta jughosta marked this pull request as ready for review August 8, 2023 13:48
@jughosta jughosta requested review from a team as code owners August 8, 2023 13:48
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@cee-chen
Copy link
Contributor

cee-chen commented Aug 8, 2023

Hi @clintandrewhall and @cee-chen,
Could you please check if this PR correctly addresses the bug with theme/styles #163332 ?

Sorry to duck out of this, but I'm not actually super familiar with the dark mode effort in Kibana or the issues causing apps not to fully respect dark mode. I'll let @clintandrewhall or possibly @kc13greiner review this one, as I believe they're both way more familiar with the project than I am 🙏

Copy link
Member

@jbudz jbudz left a comment

Choose a reason for hiding this comment

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

limits.yml

Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

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

Pulled and tested locally and Discover is now dark while in dark mode! I left a couple comments related to the toMountPoint question, but everything worked well in testing. LGTM, thanks 👍

theme$
)
),
text: i18n.translate('discover.context.invalidTieBreakerFiledSetting', {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like we dropped the toMountPoint here. I'm fine with dropping any/all of them if they're not needed, just wanted to make a note to follow up based on the response to this comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@davismcphee toMountPoint is not necessary for a string value.

@@ -22,7 +21,7 @@ export const displayPossibleDocsDiffInfoAlert = (toastNotifications: ToastsStart

toastNotifications.addInfo({
title: infoTitle,
text: toMountPoint(<MarkdownSimple>{infoDescription}</MarkdownSimple>),
text: infoDescription,
Copy link
Contributor

Choose a reason for hiding this comment

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

toMountPoint removed.

{new Error(`Data view failure of the alert rule with id ${alertId}.`).message}
</MarkdownSimple>
),
text: errorText,
Copy link
Contributor

Choose a reason for hiding this comment

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

toMountPoint removed.

…k-theme

# Conflicts:
#	src/plugins/discover/public/application/context/hooks/use_context_app_fetch.tsx
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
data 462 472 +10
dataViewEditor 65 79 +14
dataViewFieldEditor 146 160 +14
dataViewManagement 132 142 +10
discover 613 627 +14
total +62

Async chunks

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

id before after diff
data 53.9KB 54.8KB +946.0B
dataViewEditor 40.3KB 39.9KB -490.0B
dataViewFieldEditor 174.0KB 173.6KB -480.0B
dataViewManagement 119.4KB 120.3KB +957.0B
discover 556.3KB 557.4KB +1.1KB
total +2.0KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
data 404.3KB 404.4KB +56.0B
dataViewEditor 10.7KB 12.7KB +2.0KB
dataViewFieldEditor 23.2KB 25.2KB +2.0KB
total +4.1KB
Unknown metric groups

References to deprecated APIs

id before after diff
data 76 73 -3
dataViewEditor 3 1 -2
dataViewFieldEditor 5 3 -2
dataViewManagement 72 69 -3
discover 45 20 -25
total -35

History

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

cc @jughosta

Copy link
Contributor

@dej611 dej611 left a comment

Choose a reason for hiding this comment

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

Tested locally with Safari 👍

@jughosta jughosta merged commit 74911b6 into elastic:main Aug 11, 2023
@jughosta jughosta deleted the 163332-discover-dark-theme branch August 11, 2023 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discover is not in dark mode when user profile is in dark mode
8 participants