-
Notifications
You must be signed in to change notification settings - Fork 582
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
High contrast: Icons for block categories now have colors in Minecraft #9657
Conversation
UPDATE I've decided to go the CSS route so it's a bit easier to interpret going forward. There are still a couple things that I want to fiddle with, but I wanted to push up my current changes. The following has changed on this first pass:
What I want to change still:
Things that need clarification:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, nice clean up! Thanks for listening to me ramble on this for a bit & then fixing everything!
left a few comments since you with minor things since you mentioned still wanting to clean up a little more, Also, in case it's helpful, here's a pointer to the place I can remember using a css variable for an image url , I remember it being a little finicky / having to play with it but that was probably just cause I was doing a datauri + css variable instead of just a url https://github.com/microsoft/pxt/pull/9329/files#diff-7047859ba8a434609145f1795eb0ee90ad1991dcdb4e22fc986bc181f2a55862R350
I might be missing something obvious, but I couldn't find where this is happening. Can you point me to it?
Personally, I'd recommend just opening a bug for now. No need to remove the code; it could be helpful for whoever ends up debugging. |
Yeah, no problem, Line 285 in 8aa2687
|
Unless it's causing a crash or something, that is. In that case, I'd say we should remove it and reference the commit that removed it in the bug. If it's just not doing anything then I think it's fine to leave it in. |
Yep, not causing any issues, just not adding anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again nice job :)
All of our other targets still have the colors on the icons for the block categories, so we want Minecraft to match that.
Most of the categories are super straightforward because you can just change the icon color via code. However, the
Agent
category is a bit tricky because the icon that we're using doesn't have an associated icon in Semantic; we're using a static png. Because of this, changing the color of theAgent
icon via code isn't really possible. That's where the newAgent_icon_orange
file comes in. I just alternate between the two files to make the color changes work. I wasn't sure if referencing files across the repos like this would cause problems in production, so we might have to find another solution, but it works locally. One thing to note, though, is that when you first switch to high contrast mode, it takes a second for the agent icon to load in, so there is definitely room for improvements.Will get an upload target on Monday.
Closes: https://github.com/microsoft/pxt-minecraft/issues/2062