Skip to content

[User Profile Settings] Implement toggle for high contrast mode#216242

Merged
tsullivan merged 7 commits intoelastic:mainfrom
tsullivan:contrast-mode/delivery
Apr 2, 2025
Merged

[User Profile Settings] Implement toggle for high contrast mode#216242
tsullivan merged 7 commits intoelastic:mainfrom
tsullivan:contrast-mode/delivery

Conversation

@tsullivan
Copy link
Member

@tsullivan tsullivan commented Mar 27, 2025

Summary

Closes #176219
Depends on #215698

EUI provides documentation about high contrast mode. This includes info about when it is enabled automatically, and some developer utilities. See: https://eui.elastic.co/#/theming/high-contrast-mode

high-contrast-demo

Release note

Added an option to User Settings that allows the Kibana interface to display in a high contrast mode.

@tsullivan tsullivan force-pushed the contrast-mode/delivery branch from 36272b6 to 9d32cb3 Compare March 28, 2025 20:48
@tsullivan tsullivan force-pushed the contrast-mode/delivery branch from 9d32cb3 to e3b18c3 Compare March 28, 2025 22:07
@tsullivan tsullivan marked this pull request as ready for review March 28, 2025 22:07
@tsullivan tsullivan requested review from a team as code owners March 28, 2025 22:07
@tsullivan tsullivan added Team:Security Platform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t// backport:skip This PR does not require backporting Team:SharedUX Platform AppEx-SharedUX (formerly Global Experience) t// labels Mar 28, 2025
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

// colorMode provided by the `theme`.
const colorMode = colorModeProp || themeColorMode;

const getUserProfile$ = userProfile?.getUserProfile$ ?? Rx.of;
Copy link
Contributor

Choose a reason for hiding this comment

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

tiny suggestion to memo the observable, because now useObservable would unsubscribe and subscribe with every render

Copy link
Member Author

Choose a reason for hiding this comment

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

@Dosant I take it you mean we should call a memoized version of getUserProfile$. Is this what you mean?

-  const getUserProfile$ = userProfile?.getUserProfile$ ?? Rx.of;
+  const getUserProfile$ = useMemo(
+    () => userProfile?.getUserProfile$ ?? Rx.of,
+    [userProfile?.getUserProfile$]
+  );
@tsullivan tsullivan requested a review from a team as a code owner March 31, 2025 16:34
@tsullivan tsullivan added the Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// label Apr 1, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

Copy link
Contributor

@gsoldevila gsoldevila left a comment

Choose a reason for hiding this comment

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

The src/core/packages/overlays/browser-internal/src/modal/__snapshots__/modal_service.test.tsx.snap snapshot is crazy long and thus useless.

I'll improve the related test on a follow-up PR.

@tsullivan tsullivan enabled auto-merge (squash) April 2, 2025 18:33
@tsullivan tsullivan merged commit d17b301 into elastic:main Apr 2, 2025
10 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/user-profile-components 21 23 +2

Async chunks

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

id before after diff
security 514.1KB 515.6KB +1.5KB

Page load bundle

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

id before after diff
kbnUiSharedDeps-srcJs 3.6MB 3.6MB +320.0B
Unknown metric groups

API count

id before after diff
@kbn/user-profile-components 81 83 +2

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:enhancement Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// Team:Security Platform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t// Team:SharedUX Platform AppEx-SharedUX (formerly Global Experience) t// v9.1.0

6 participants