#stage-discussion
1 messages · Page 7 of 1
how are you gonna display 100+ paints there
I wonder if the identity menu is its own class
dropdown probably
1km long scroll
make it like small colored circles maybe
i thought of that already
it's not a good idea
aesthetics
text is very complex and some paints may look extremely differently on something
bad idea warning: ||If the number of paints ever does become an issue (at the rate we're releasing paints, it probably will) then you could have a "favorite" system where you'd toggle a little ⭐ button to put them in a "favorites" list where the person's favorite paints are more easily accessible, and those can be the ones shown in the chat UI.||
could work, hover to reveal a tooltip with a text version
Could also just have a button there that opens the 7tv settings window or something
or a preview at the top or bottom with ur name that shows ur name with it before u click select
literally just said that

I'm probably not the first person to say it either
forsen emote where he cannot see
The header items move a tiny bit when changing between them now since they change font weight 
But i mean, thats just nitpicking

i don't see enough of a difference to have it change the font weight
i'll also do a small unrelated change 
i made the secondary text a bit more transparent
@shell schooner did you have new icons?
yes
so i can later add it to the descriptions of the settings
i think it a bit too transparent
the actual settings?
the whole container
I just used the same one as the emote menu, but can easily be swapped
i mean it works for emote menu
Pretty trivial to let almost every color be managed by the user in the settings
Dont bother tbh
Settings is so far from done ui wise that i dosnt really matter yet
I guess its fine if its just some of the colors
But probably not worth the effort
Unless you want to design all the settings nodes that is 
@eternal iron 
Does that mean that the 7tv one is smaller or that the bttv/twitch overflows?
its the best they have
yeah
unless you want the dank ass smiley logo
bttvNice
i copied their badge
this would make the 7tv and ffz one a bit annoying to work with elsewere 

Would it be better to just let the twitch and bttv overflow their bounds

i mean i could just give you the raw icons but you gonna have to adjust their size manually
cause the wont look equally sized
if you force them to have the same width or height
right now the reference point is this
i think that might look nice
you can see the issue in the figma
Il try to show what i mean by selecting in figma
yes
Basically set that selection to be the box
Whatever is outside will overflow, but that can be solved by a margin
i see
Can hop in voice if you want
yeah i get what you mean
fill="white" 
figma balls

okay found a plugin that makes the svgs not scuffed
I started tracing this the other day
it's so ugly though
would be awful at a small size
true
!false
!0
!!!0
okay i deadass dont know how to do it
lukatis
only like half the lines are straight
💀
I wonder if, by tracing the logo and fixing the stuff I see as "mistakes", it becomes legally distinct
and bttv couldn't sue us for using their logo

Because I definitely fixed a lot of stuff when I did the original trace
kinda getting it to work

He's getting distracted from cosmetics again
then twitch rerenders it 10,000 times @unkempt hill


GUYS
LOOK
IM ADMIN
GYZE
LOOK AT ME
Did you inject a custom badge or override rendering? @daring gale
least dank predicate

?.?.?.?.?.?.?.?.
wtf is sketch
i just hook render func here
well im just trying to hook shit
ye
Surely the hardcoding will be fixed later 
badgefarmer
It ads one every time you rerender? 

yeah cause im just doi,ng a push
you know how react works
it rerenders if i merely just put my mouse over the menu
react!
👁️
squish it to make it square
I can show you what mean if you hop in voice ☎️
dont have a mic but oke

Just me talking to myself 
yeah i have no idea whats going on
i dont understand svgs either
yeee
i can try to fix the decimal shit
so its even
lule
works in the carousel too
3.0.0_DEV3 kinda works in Firefox. 
It loads the .webp in chat but it loads the .avif while autocompleting in the send a message textbox.
Got it working in the end @shell schooner
nice

but also why is it offset by 8
why is 0, 0 - 8, 8
because the twitch logo has that as the margin
so the grid is offset by 8
I couldnt be bothered to change it
@eternal iron may i get a pr review
Yea, looking at it
Since the hover value brings both light and dark mode towards "grey" you can just use a single variable instead of switching between them
hsla(0deg, 0%, 50%, 16%) looks like both the highlights
stop it 
stop using that
no
ok
since #7f7f7f29 conveys so much more information
50% between black and white
16% opacity
i think its nice for shades of grey

vscode color autotranslation translated 50% to 80
and not 7F
so i trust it i guess

yea, its actually 7F.8 
if you had more precision, 80.00 would be closer to 50% than 7F.00
the middle point is 50.5
I also prefer tabs instead of spaces for indentation
tabs are what we use tho right
wtf do you mean
1 tab
is what we use for indentation

yes thats what that means
if you were to convert spaces to tabs
i'm retarded
I was just making a general statement. Unrelated to any actual code, living or dead.
i honestly see like
well you have to pick one or the other
and its dumb to use 4 times the codepoints
for the same thing
yeah
1 character per indentation level makes more sense to me
then you can adjust how it's displayed if you don't like it
whereas with spaces, you're kinda stuck
Best actual argument ive heard is that tabs are better since you can control their width independently of the width of a space.
Relating to someone that had very poor eyesight so he liked to have very wide tabs to better see the indentation
Without changing the width of the spaces
back to this, it's not though
also
closing your own issues 
rounding exists for a reason
@unkempt hill 7F and 80 are equally close to FF /2

but imagine if you had twice the precision
FFFF is now "white"
you're essentially always approaching 10000 with however many zeros you have precision
ok but now imagine
that how have no precision
(because you dont)
how much precision you have is how much you have
doing 2x multiplication on 80 will get you 8000 which is closer to 1/2 of FFFF than 7F00
255 / 2 will always equal 127
even if its really 127.5
you dont magically gain precision
where you dont have any
therefor any computer will always tell you that its 7F and not 80
7FFF would be equally close as 8000
but it wouldn't become 7FFF it would become 7F00 or am I retarded?
melon's brain only does discrete mathematics 
listen
👂
if your using a system of fixed precision
your
you'll always get a fixed precision number
lmao
you dont magically get to decide its half

so you must round
yes but you should round to 80 
but then thats 128
127 is the standard for half way 
actually I have a counter-example
** ** ** ** ** ** ** **
in MIDI, values are 7-bit and the negative numbers go to -64 but only positive 63. So that means that the "0" is really represented as 64, not 63, right?
thats just twos compliment
I don't care about yer fancy computer talk
I just know what I've seen with my own two eyes

in twos compliment you use 1 bit for the sign
so if you dont shift either the negative or the positive side you get two zeros
so you have to have one extra on either side
1000 and 0000 would be equal if you didnt
which is a nightmare to deal with
yeah
but am I retarded or no?
no 7F00 and 8000 would be equally close because you've just doubled the problem
7F80 and 7F7F

because its really half way between that
just think in decimal and its easy 
I think maybe I'm not the retarded one 
that cant be true though
because 65535 / 2 ends in a decimal
it has to
so you have the same problem
where its equally close to two of your numbers
well it also has a remainder
@eternal iron @daring gale any reasons why the styling pr hasn't been merged yet?
Anatole is merging it now
I was debating on more changes
but will wait and put them in a later pr
jebasted
oh

that's a nice lil slide
does github actually count co-authorship
i actually dont really like that system
it breaks commit signing
because you can just sign a commit with your own key
and put someone as the author
and then itll still mark as partially verified
Rebasing resigns the commits right?
well it has to
true
but i just think it should show unverified there
because really theres nothing about it that is verified
other than the commiter whos in the commit field actually signed it
but not authorship
actually its not even a real field anyways isnt it
its just a tag thats globally recognized
but its just part of the comment
commits still only have one author and one committer
Messages starting with . (dot+space) aren't displayed in chat for me. They seem to appear in Chatterino
cptdrax just woke up:
💤 (21h, 44m ago)
twitch shouldnt even be sending them
which might be the reason we dont render them
Raid of a user to a streamer I was watching happened <t:1672855200:t> and was displayed in Chatterino at the same time. It appeared at <t:1672855860:t> in twitch chat with the dev 3 build. I know, those things are scuffed atm, but wanted to report in anyways. Seems weird that it still appeared after 11 minutes instead of not showing up at all.
it would be nice
if we could get rid of this fucking bug
if we're actually going to get rid of the pseudo-optimistic text rendering we might as well fix this right
what bug
the timeout thing freezes and doesn't go away until you refresh
sometimes it even goes into negative numbers
hmm
how does the custom chat decide at what size to render the emotes at
i found out that if you rapidly change the resolution to small and high emotes become fucking huge
It uses a srcset so the browser should handle it
But the size will only be correct if srcset is made correctly
🤮
dot and slash are the same command thingy 
can do .me and /me for example
Wait, twitch sends ids for your own messages now @unkempt hill @daring gale
So mods can delete their own messages 
Today I learned, thx 
finally i can say bad stuff as a mod 

now? 
imagine not knowing supa secret chatterino features 
Was about to review pr 
it's loading from the server, now just need to make hot reload work
OK
W ACQUIRED
HMR ENABLED
@finite monolith @eternal iron 

no more needing to reload page to work on ui



Feel like the new slider might be a bit too dank 
im gonna be the judge
when dev4
nahhhh
that looks donk
i could only accept it if the little diamond spun around so it's a square
oh shit

this makes it look fucking cool
show
worker reload doesnt work yet
but yarn setup then yarn dev
boom
(need to reload your chrome extension after setup)
yea that can work
yeah so with HMR, you change anything and it insta reflects on twitch
in mere milliseconds
pretty based
Start it at -45%
And see how that looks
Hot reloading the worker is not as important i feel
Since ui changes is what benefits from hotreload the most
make it spin 
why is the button in the middle 
lol

it looks better in 60 fps one sec
Now design all the other setting nodes



truck did u try hmr
not yet no
try it nyow 
nah doesn't look good
Merge so i can use it for the chat-types branch 
excellify git cherry-pick 3229b9fa4722fcf54b935d63812db98fcdf1a7c1
I need to rebase to master anyway
re 
just do a --watch on the worker viteconfig
ye
ok
@eternal iron merged
this is going to make your life way easier
by a factor of 1000
actually massive
lets see
I just rebased 
spent 25 minutes figuring this out , about to save days of work hours
i had a brain flash when i woke up

and realized how to do it
Did you see the @ earlier about twitch sending the message id for your own messages now?
Ill just let the slider stay on your own messages
That requires actual work tho?
yes so?

uhh 
Im gonna rework the slider anyways
yeah the styling could use a little modernization
so you just start yarn dev like usual?
yarn setup- reload chrome extension
yarn dev
I want all the zones in the slider to be customizeable
now i remember
its like when you click "more" on the emote page
So gonna make a custom setting node that lets you define the areas and actions

this will save a lot of time
so yeah now u can fuck around with the entire twitch site and not have to refresh

It will save even more time when implementing the setting types
Merge conflict in yarn.lock 
just ignore the conflict and merge the one from master
then run yarn again
for your own changes
yarrrrrrrrr(n)
🧶
How do i do this without messing something up 
Yea seems like it worked
hmr is the best thing since sliced bread
yeah ok this is unironically a game changer
ive been wanting to get this working
and wasnt sure how to until i just suddenly realized
and turned out it was very simple
this makes our stack the single best to work with for a general purpose twitch extension, by a long shot
true
another nice thing
is that you can watch a streamer properly and do shit without breaking
and restarting
Idk why, but the : autocomplete bricks the inputbox sometimes
when modifying some files such as App.vue however it will likely break
at the moment
i'll have to modify how the app loads a bit to properly support hmr there
or so, it wont crash, but it'll unload all the modules
or actually it might crash not sure
i'll figure it out though
one nice trick i stole from the apple website
you can add both blur and saturation to a pretty transparent object to make colors stand out more
this gives it a nice dank vibe
maybe i should add this to the emote menu too
Just make sure it dosnt make the background too distracting
And or add settings that allow toggling it
yeahh no
idk
about distracting
but it looks great for the settings

this is how it looks like with 300% saturation
Adding settings to stuff is easy btw
bitrate 💀
deadass
fuck
what else did i expect
idk if it's distracting or not
but i think it looks cool
We have to generate the twitch prime link that appears on every prime sub message now 💀

or we capture a fake message
grab the component class
and coerce it to render manually
then parse out the link

Yea, but whats the point of rewriting the renderer then
melon did u see hmr work 
yeah
the hooks crash though
well i didnt run it but i saw it
yeah i can imagine they will
some components
specifically input box ones
i'll exclude twichsite and app.vue from hmr
are very tempremental
Might be a better solution tho, since we also have the issue of localization
and just fucking crash
For sub messages
when you unhook them
its very odd and im not sure why
but its the component crashing itself
The inputbox crashes on some : autocomplete things btw
how do we hotreload colors
Just put them in twitchsite for the time being i guess
also doing it the way you did with the hosted thing
makes it so deving on firefox wont be dog ass
put them in an assets file and import it when needed
because on firefox it sets the ttl for css files to basically infinity

oh
honestly
Woah lots of cool stuff happening today
put colors in /assets/style/theme.scss
scss
then import "@/assets/style/theme.scss"
at the top of any component that need it
kkona
or actually
is it kkona though
Yea
yeah wont adding it to each component literally just dupe the styles
every time the component is added
it would eya i forgor its css vars
why deal with that when it can be hotreloaded
does vite even know to hot reload in that case tho
Add this to the bottom of twitchsite
<style lang="scss">
@import "@/assets/style/theme.scss";
</style>```
oh thanks
🥚

uhh 
runtime-core.esm-bundler.js:40 [Vue warn]: onUnmounted is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.
warn2 @ runtime-core.esm-bundler.js:40
i'm not sure if that's the error
but the extension doesn't seem to work
as in, the frontend part
Does refreshing fix it?
Do yarn setup and yarn dev again
And reload the extension in the settings
not an error you can ignore
i'll try again
hm

im surprised it doesn't give me any errors
ooh
classic

oh wtf
oh yeah hmr does that sometimes its very annoying and then it bricks everything
had it happen dozens of times on the trainwrecks site
is something calling one of the use composables
like late
or outside of the callstack of a component
just twitch errors
not a twitch error
@unkempt hill it seems useComponentHook(), when unloading, is what crashes
i mean no shit
yes it will
on some components
huh

chatlist/chatcontroller does too
like we unhook and then let it rerender
and somewhere along it then crashes
usually a little bit after
hm
i suspect its because of the tree changing but not sure
like the <seventv-container/> s getting removed
so everything shifts up
and it doesnt like that or something
i suppose i could ignore app.vue, twitchsite.vue and module files
reloading chatcontroller.vue works
but we should fix this somehow tho

modules work fine for me
LUL
like add a console.log
so yea
the= files that contain hooks will fuck if HMR'd
this is correct yea
like I think allowing unhooking was a good idea
i tested it
but not something we can do
It dosnt break for me
try add anything in ChatModule.vue
unless its just something super dumb somewhere
that causes a lidl recursion
but i cant see how
ik
if its inside twitch 
/ or in react
yea

Insane for the message types

The way ive been doing it till now is create some divs here and there
then edit the style in the browser
then change it to that in the vue file after
oh man
.env.dev points to dev api
Did you run setup after?
Also consider clearing dist/
good idea
ok
that didnt work either
oh
ok i dont actually know what this means

did u reload ur chrome ext
yes i did it i even uninstalled it
and reinstalled it

where did it get 3700 out of
❗
yeah
ok
i'll try this again

okay so
i removed the dist folder with all twitch tabs closed, i uninstalled the extension and ran yarn setup, then i installed the unpacked extension and then i ran yarn dev
then i launched twitch
didn't work
wdym
What is the type of an imported vue component?
This might be the dumbest thing ever 
function getMessageComponent(type: MessageType) {
return (Types as Record<string, object>)[MessageType[type]] ?? ChatMessageUnhandled;
}```
you can also export

out of a component
add a second non setup script tag
and then export from it
you can then import using {}
the default import will still be the component
but useful for types
Does my solution work tho?
no that wont work i dont think
This is the index in types/
export * as MESSAGE from "./MESSAGE.vue";
export * as SUBSCRIBE from "./SUBSCRIBE.vue";
what is MessageType
An enum
ok then it probably will work
avoid typescript enums

yea
for most cases its best to use type Foo = "bar" | "baz"
yeah usually I do something like
interface BaseCum {
type: string;
cum: boolean;
}
interface Semen extends BaseCum {
type: "semen";
data: {
anal: boolean
}
}
interface Borpa extends BaseCum {
type: "borpa";
}
type Cum = Borpa | Semen;
it might make sense to use dynamic imports here
do ts at the top pls
Does that work with vue?
but anyways doing it like this will still allow the ide to do correct type completion
it will infer the type based on the string value
just import, i believe
it might be something danker
but defineAsyncComponent isnt what we want here
Should i still use an index?
its perfectly fine
like you can do this
to import non asnycronously
you can do that
but theres no real need to here I dont think
that will actually
make a blank space
while the component loads in
it will be visible to the user
thats what async component is for
well there not actually a need
to await import
its a build time thing
its handled specially by vite
oh 
TIL
at build
you can do it the other way
but I dont remember exactly how
It might just be that vite does it heuristically im not sure
The reason i was wondering if it would work is that in non setup vue you have to define all the components you want to use
anyways
Which is what i think vite does with the imports
like this
is how I did it
in the trainwrecks site
for (const [, module] of Object.entries(
import.meta.glob<Record<string, Command>>("./commands/*.ts", { eager: true }),
)) {
for (const [, command] of Object.entries(module)) {
COMMANDS.push(command);
}
}```
fills out an array with the default exports of any module in a directory
could be made to be a map as well
real men use notepad
isnt [, module] of Object.entries the same as module of Object.values?
yeah
it is, though i think values() has a bit more overhead
cause it transforms the object into an array
while entries just destructures it
Is it really better to run an import every time we want to render a message tho?
it wont do that
thats what eager: true does in that above snippet
it should prefill
at build
So it just creates the index basically?
vite 
The index allows us to have different names tho
And each of them should only be bound to a message type
just preprocess it
iterate over the glob imports
and have some name or type field
on each of the exported modules
then build a map from that
Isnt that literally what the index is tho
yes but you dont need to manually copy paste and import 50 message types
and then worry about updating two places
when you add or remove one
like this is how i had commands on the trainwrecks site
doing it like this has the potential for some really clean code
it just needs to be tweaked a bit
for components
but not undoable
Is there some option on glob to set the key to the filename or do i have to map it?
Yea, but not the entire path
to wherever you are
It gets the module
but the <component :is /> dosnt work
I think this might be something related to us not registering the component in vue
thats where you need to use defineAsyncComponent() i think
@unkempt hill isnt that the case
or jsut defineComponent
actually yea
if i want it to render non async?
definecomponent because youve already imported it
should work?
wait no thats not it
i dont remember
no it should just work with the import then <component :is /> though
what error does it throw @eternal iron
is that actually the error though
because that comes from our module files
since some dont have templates
so vue throws a warning
Uh what
But the ChatMessageUnhandeled looks like this {__name: 'ChatMessageUnhandled', props: {…}, __hmrId: '3fb98326', setup: ƒ, render: ƒ, …}
Which is what is returned from defineComponent i think
nvm
it really should just work
I know the setup script does something to register imported components
can u commit i ll take a look
just needed import: default
just make it larger









