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

[A11y][Theme]Mark color inverted inside Dark Partial theme #4736

Merged
merged 4 commits into from
Jun 18, 2024

Conversation

AmyL219
Copy link
Contributor

@AmyL219 AmyL219 commented Jun 14, 2024

What

The dark theme is not working as expected because we missed setting the isInverted property in the dark theme. This oversight causes the colors to not invert properly, which is necessary for a true dark theme experience.

Solution
To resolve this issue, we need to use the createTheme(..) Currently, our darkTheme API is defined as

export const darkTheme: _PartialTheme_ & CallingTheme

Adding the missing property to invert color would update the darkTheme API to

export const darkTheme: _Theme_ & CallingTheme = {
  ...createTheme({
    ...partialDarkTheme,
    isInverted: true
  }),
  callingPalette: {
.....
  }
};

By adding the missing isInverted property, we can update the darkTheme API to properly invert the colors. However, to avoid breaking changes to the public API, we can create the full theme using createTheme and then define it as a PartialTheme.

export const darkTheme: _PartialTheme_ & CallingTheme = {
  ...createTheme({
    ...partialDarkTheme,
    isInverted: true
  }),
  callingPalette: {
.....
  }
};

This change ensures that the dark theme colors are properly inverted, providing the intended dark theme experience. By using createTheme, we avoid breaking changes to the public API while still achieving the necessary theme adjustments.

Q&A to confirm the Impact of creating the full theme using createTheme and then defining it as a PartialTheme in public API 

Why

Our components has wrong color for those color not manually updated in the dark theme
Screenshot 2024-06-12 at 12 58 37 PM

How Tested

Login with v-id
navigate using keyboard only.
Select 'Dark' theme from 'Home' screen.

Process & policy checklist

  • I have updated the project documentation to reflect my changes if necessary.
  • I have read the CONTRIBUTING documentation.

Is this a breaking change?

  • This change causes current functionality to break.

Copy link
Contributor

Copy link
Contributor

github-actions bot commented Jun 14, 2024

Chat bundle size is increased❗.

  • Current size: 2099413
  • Base size: 2099306
  • Diff size: 107

Copy link
Contributor

github-actions bot commented Jun 14, 2024

Calling bundle size is increased❗.

  • Current size: 5022532
  • Base size: 5022433
  • Diff size: 99

Copy link
Contributor

github-actions bot commented Jun 14, 2024

CallWithChat bundle size is increased❗.

  • Current size: 6382479
  • Base size: 6382372
  • Diff size: 107

Copy link
Contributor

github-actions bot commented Jun 14, 2024

@azure/communication-react jest test coverage for stable.

Lines Statements Functions Branches
Base 26118 / 40982
63.73%
26118 / 40982
63.73%
715 / 1280
55.85%
2095 / 3314
63.21%
Current 26124 / 40988
63.73%
26124 / 40988
63.73%
715 / 1280
55.85%
2071 / 3299
62.77%
Diff 6 / 6
0%
6 / 6
0%
0 / 0
0%
-24 / -15
-0.44%

Copy link
Contributor

github-actions bot commented Jun 14, 2024

@azure/communication-react jest test coverage for beta.

Lines Statements Functions Branches
Base 50903 / 82109
61.99%
50903 / 82109
61.99%
1035 / 2317
44.66%
3025 / 4920
61.48%
Current 50982 / 82116
62.08%
50982 / 82116
62.08%
1035 / 2317
44.66%
3020 / 4920
61.38%
Diff 79 / 7
0.09%
79 / 7
0.09%
0 / 0
0%
-5 / 0
-0.1%

Copy link
Contributor

@AmyL219 AmyL219 enabled auto-merge (squash) June 18, 2024 17:21
Copy link
Contributor

@AmyL219 AmyL219 merged commit d6600b2 into main Jun 18, 2024
41 checks passed
@AmyL219 AmyL219 deleted the amyl/a11y/dark branch June 18, 2024 17:31
@AmyL219 AmyL219 changed the title [A11y][Theme]Mark color inverted inside Dark theme [A11y][Theme]Mark color inverted inside Dark Partial theme Jun 18, 2024
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 this pull request may close these issues.

4 participants