elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.72k stars 8.13k forks source link

Dark/light mode switch notification spacing #165979

Open vadimkibana opened 1 year ago

vadimkibana commented 1 year ago

There is extra space on the left in the notification toast, which appears after switching light/dark modes.

image
elasticmachine commented 1 year ago

Pinging @elastic/appex-sharedux (Team:SharedUX)

tsullivan commented 1 year ago

@vadimkibana where are you accessing the color theme setting when you see this bug?

I went to Edit Profile to change this setting, and didn't see the bug.

vadimkibana commented 1 year ago

@tsullivan in the top menu:

Image

vadimkibana commented 1 year ago

This issue might be related: https://github.com/elastic/kibana/issues/163330

tsullivan commented 1 year ago

@vadimkibana, I've tried in traditional and serverless modes. I don't see the same options in the top menu

Untitled

What am I missing?

vadimkibana commented 1 year ago

It is there in production https://cloud.elastic.co/

sebelga commented 11 months ago

To see the correct dropdown menu items you need to mark the user as a cloud user. Modify the maybe_add_cloud_links.ts file

diff --git a/x-pack/plugins/cloud_integrations/cloud_links/public/maybe_add_cloud_links/maybe_add_cloud_links.ts b/x-pack/plugins/cloud_integrations/cloud_links/public/maybe_add_cloud_links/maybe_add_cloud_links.ts
index 2772c87d124..010bfedfedf 100644
--- a/x-pack/plugins/cloud_integrations/cloud_links/public/maybe_add_cloud_links/maybe_add_cloud_links.ts
+++ b/x-pack/plugins/cloud_integrations/cloud_links/public/maybe_add_cloud_links/maybe_add_cloud_links.ts
@@ -26,6 +26,7 @@ export function maybeAddCloudLinks({ core, security, cloud, share }: MaybeAddClo
   const userObservable = defer(() => security.authc.getCurrentUser()).pipe(
     // Check if user is a cloud user.
     map((user) => user.elastic_cloud_user),
+    map(() => true),
     // If user is not defined due to an unexpected error, then fail *open*.
     catchError(() => of(true)),
     filter((isElasticCloudUser) => isElasticCloudUser === true),

The fix for this issue is probably to change the justifyContent="flexEnd" to justifyContent="flexStart" here

https://github.com/elastic/kibana/blob/main/packages/kbn-user-profile-components/src/hooks/use_update_user_profile.tsx#L73