-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
added filter invert to images #2599
Conversation
2d82717
to
e115f67
Compare
src/app/tabs/theme-module.js
Outdated
@@ -26,7 +26,7 @@ const themes = [ | |||
const profile = { | |||
name: 'theme', | |||
events: ['themeChanged'], | |||
methods: ['switchTheme', 'getThemes', 'currentTheme'], | |||
methods: ['switchTheme', 'getThemes', 'currentTheme', 'fixInvert'], |
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.
fixInvert
looks like a method internal to Remix and should not be called by other plugins.
btw switchTheme
neither I think
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.
I made it external in purpose. why not? Sokrates, for example, could use it for their Logo.
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.
yeah but that is more an helper that could be made available through the remix plugin than an API function.
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.
what do you mean by "remix plugin" ?
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.
I meant the remix-plugin library
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.
some images are in color and some shouldn't change the invert.
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.
and if I pass id it will work. but does it make sense at all? do you think it worth to have such a function? Is it obvious that invert
can be used?
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.
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.
I think it doesn't make so much sense to have an "invert" function. It would make more sense to provide a list of classes we are using in the application for developers to create their own theme.
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.
ok then i'll remove it
could you remove the change in package-lock.json? |
I did |
img.style.filter = `invert(${invert})` | ||
} | ||
globalRegistry.get('themeModule').api.events.on('themeChanged', () => { | ||
globalRegistry.get('themeModule').api.fixInvert(document.getElementById('swarmLogo')) |
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.
doesn't need that for the ipfs logo?
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.
I thought about it but it has color.. not sure. do you want me to add?
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.
do you want me to add?
not necessarily, just wanted to make sure you were aware of that
fixing https://github.com/ethereum/remix-ide/issues/2409