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

Draft PR: Working on issue #7824 #7903

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

Arup-Chauhan
Copy link

Working on issue #7824

Signed-off-by: Arup Chauhan <[email protected]>
Copy link

cla-checker-service bot commented Jul 22, 2024

💚 CLA has been signed

Copy link

👋 Since this is a community submitted pull request, a Buildkite build has not been started automatically. Would an Elastic organization member please verify the contents of this pull request and kick off a build manually?

@Arup-Chauhan
Copy link
Author

Arup-Chauhan commented Jul 22, 2024

Hi @cee-chen, I have made this PR

Will be starting with the direction @daniel-rhoades mentioned to use the makeHighContrastColor function in the code.

Would it be a good start?

@cee-chen
Copy link
Member

@Arup-Chauhan My preference would be to skip makeHighContrastColor and custom text color support. To be frank, it's not something I want to support in EuiBadge or EuiAvatar right now.

I think the simplest path forward would be to DRY out the shared color contrast logic between EuiAvatar and EuiBadge to an exported utility (which we can locate in src/services/). This will enable EuiAvatar to also throw a console warning if color contrast is insufficient.

@Arup-Chauhan
Copy link
Author

@Arup-Chauhan My preference would be to skip makeHighContrastColor and custom text color support. To be frank, it's not something I want to support in EuiBadge or EuiAvatar right now.

I think the simplest path forward would be to DRY out the shared color contrast logic between EuiAvatar and EuiBadge to an exported utility (which we can locate in src/services/). This will enable EuiAvatar to also throw a console warning if color contrast is insufficient.

so we are looking at a shared utility for the color contrast logic and place it in src/services/. This will eliminate duplicate implementations in EuiAvatar and EuiBadge. By using this utility, EuiAvatar can also throw a console warning if the color contrast is insufficient.

Is this a correct way?

@cee-chen
Copy link
Member

That's correct!

@Arup-Chauhan
Copy link
Author

That's correct!

Cool, thanks for the feedback, I will start doing it and let you know how it goes, have a good day!

@Arup-Chauhan
Copy link
Author

@cee-chen Hi, just wanted to update you that I am in the middle of some summer break commitments from college, will resume working on this soon asap.

Hope that works!

@Arup-Chauhan Arup-Chauhan reopened this Aug 31, 2024
Copy link

👋 Since this is a community submitted pull request, a Buildkite build has not been started automatically. Would an Elastic organization member please verify the contents of this pull request and kick off a build manually?

@Arup-Chauhan
Copy link
Author

@cee-chen Hi Cee, wanted to share that I have kind of coded a logic using the constrst utility, will push the changes in this draft repo for your review by the end of this week.

Thanks for the patience, the college semester course load is a little tough this time so spending my major amount there!

@cee-chen
Copy link
Member

No worries at all. This isn't a high priority task, so take your time!

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

Successfully merging this pull request may close these issues.

2 participants