Skip to content

Conversation

nytai
Copy link
Member

@nytai nytai commented Oct 2, 2020

SUMMARY

replace the ace editor gutter error icon with the SIP-34 error icon.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before:
Screen Shot 2020-10-01 at 9 15 10 PM

after:
Screen Shot 2020-10-01 at 9 15 49 PM

TEST PLAN

  • 👀

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@nytai nytai marked this pull request as ready for review October 2, 2020 04:25
@rusackas
Copy link
Member

rusackas commented Oct 2, 2020

'error-solid-small' and 'error-solid' are already available in the Icon component, and respect currentColor - would that be sufficient for this use case?

@nytai
Copy link
Member Author

nytai commented Oct 2, 2020

@rusackas I don't think it's possible to override a background-image css property any other way. Fill color cannot be applied to an svg when it's a background image (not in the dom).

@rusackas
Copy link
Member

rusackas commented Oct 2, 2020

@nytai correct... but I'd be half tempted to try the CSS mask trick outlined here:
https://codepen.io/noahblon/post/coloring-svgs-in-css-background-images

It won't work in IE, so those users simply won't see red. But if this does work well enough, then it can even be done in Emotion to use the Theme color. Fancy!

Probably getting a bit into the weeds, but if that kind of hack doesn't work, we should at least find a way to namespace these around existing icons (from the Design System). Maybe then we could even come up with a cool script to generate all the semantic color flavors of each Design System icon.

@nytai
Copy link
Member Author

nytai commented Oct 2, 2020

I spent some time trying to get the mask to work, but instead the line number disappeared and the entire svg assets was rendered as red.

Screen Shot 2020-10-02 at 9 39 23 AM

This change is really only meant to be a quick fix for overriding a 3rd party library. I think this case is the exception rather than the norm. I'd rather not spend too much time optimizing for a problem we don't yet have. We can always revisit this if it does become an issue.

@nytai nytai merged commit 269644d into apache:master Oct 2, 2020
@nytai nytai deleted the tai/ace-editor-error-icon branch October 2, 2020 16:45
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.0 First shipped in 1.0.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/S 🚢 1.0.0 First shipped in 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants