-
Notifications
You must be signed in to change notification settings - Fork 267
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
Overlay Emote Modifier #6590
base: master
Are you sure you want to change the base?
Overlay Emote Modifier #6590
Conversation
Thanks for the PR. To prevent abuse of this, you'll need to add a restriction preventing multiple emotes from stacking on top of a single emote. I think a sane limit is only 1 emote can stack on top of the prior emote. Additionally, what happens if there isn't a prior emote to stack on top of? Doesn't that move the emote out of view? |
src/modules/chat/index.js
Outdated
break; | ||
} | ||
modifiers.push(partMetadataItem); | ||
parts[k] = null; | ||
} | ||
|
||
const overlayModifierPredicate = ({modifier}) => modifier === 'o!'; | ||
const negate = (pred) => (x) => !pred(x); |
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.
can we pull these function definitions out of the hot path? they look re-usable
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've moved these out and near the definitions of the modifiers.
isOverlay[j] = true; | ||
} else { | ||
// Strip the overlay modifier from the part. | ||
modifiers = modifiers.filter(negate(overlayModifierPredicate)); |
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.
as an aside, do you have an image asset for this modifier? if not, we can probably have one made
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.
@dclstn any ideas on the icon for this?
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.
That's so much better 👏
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.
When the image is small in emote form, it kind of just looks like 1 square. Maybe make it so that the top square doesn't overlap the bottom one quite so completely?
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.
agreed with Dallas' feedback. you can't tell what this is when smaller. it also resembles a copy button, which is not the intention.
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.
this looks better
The reverted changed caused only a single modifier emote to render. This reverts commit c264be5.
It doesn't look like overlay emotes seem to work when you post them. but they do appear when others post them. might be related to how twitch is rendering messages you post. |
Make sure you disable other browser extensions, as perhaps another extension is affecting things. But essentially, posting the overlay modifier results in It seems when other users post it, or you reload, it renders properly: My guess here is Twitch is rendering what is posted differently when you post. |
That's very odd. I can't reproduce this in Chrome 122.0.6261.113, |
Adds a
o!
modifier that makes the modified emote an "overlay".I'm not very creative, but an example:
Waiting o! Clap
I have no idea whether
o!
is a good choice.Suggestions and review comments welcome.