#stage-discussion

1 messages · Page 7 of 1

finite monolith
shell schooner
#

how are you gonna display 100+ paints there

daring gale
#

if it doesnt fit

#

KKonaW just make it larger

eternal iron
#

I wonder if the identity menu is its own class

daring gale
#

dropdown probably

shell schooner
#

1km long scroll

finite monolith
#

height: 1km;

half glade
#

make it like small colored circles maybe

shell schooner
#

This but for 7tv emotes

#

I mean badges

finite monolith
#

it's not a good idea

shell schooner
#

yabbeYaas aesthetics

finite monolith
#

text is very complex and some paints may look extremely differently on something

polar magnet
#

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.||

daring gale
eternal iron
#

Could also just have a button there that opens the 7tv settings window or something

finite monolith
#

oh

#

now that's a good idea

half glade
#

or a preview at the top or bottom with ur name that shows ur name with it before u click select

polar magnet
#

literally just said that

#

I'm probably not the first person to say it either

half glade
#

forsen emote where he cannot see

finite monolith
#

@eternal iron is the pr ok to merge

eternal iron
#

The header items move a tiny bit when changing between them now since they change font weight Donki

#

But i mean, thats just nitpicking

finite monolith
#

ok

#

fuck it

eternal iron
finite monolith
#

i don't see enough of a difference to have it change the font weight

#

i'll also do a small unrelated change tf

#

i made the secondary text a bit more transparent

eternal iron
#

@shell schooner did you have new icons?

shell schooner
#

yes

finite monolith
#

so i can later add it to the descriptions of the settings

shell schooner
finite monolith
#

so it can look very nice

#

like this

shell schooner
#

i think it a bit too transparent

finite monolith
#

the actual settings?

shell schooner
#

the whole container

eternal iron
#

I just used the same one as the emote menu, but can easily be swapped

shell schooner
#

i mean it works for emote menu

eternal iron
#

Pretty trivial to let almost every color be managed by the user in the settings

finite monolith
#

yeah

#

i'll create a pr to prettify the settings a bit i guess

eternal iron
#

Dont bother tbh

#

Settings is so far from done ui wise that i dosnt really matter yet

finite monolith
#

ok sorry i'm just a bit autistic

eternal iron
#

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 PauseChamp

finite monolith
shell schooner
eternal iron
#

Yea, noticed. ty ❤️

#

Is the boundary box made so they are alligned?

shell schooner
#

yes

#

so they look equally big

eternal iron
#

Does that mean that the 7tv one is smaller or that the bttv/twitch overflows?

shell schooner
finite monolith
#

the bttv logo looks so donk

shell schooner
#

its the best they have

finite monolith
#

yeah

shell schooner
#

unless you want the dank ass smiley logo

finite monolith
#

i meant the actual logo

#

not what you did with it

#

omegal

shell schooner
finite monolith
#

bttvNice

shell schooner
#

i copied their badge

finite monolith
#

oh right

#

well ok

#

let's see how it'll look

shell schooner
eternal iron
#

this would make the 7tv and ffz one a bit annoying to work with elsewere Donki

shell schooner
eternal iron
#

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

finite monolith
shell schooner
#

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

finite monolith
#

i think that might look nice

shell schooner
#

you can see the issue in the figma

eternal iron
#

Il try to show what i mean by selecting in figma

shell schooner
#

yes

eternal iron
#

Basically set that selection to be the box

#

Whatever is outside will overflow, but that can be solved by a margin

shell schooner
#

Hmm i see

eternal iron
#

Can hop in voice if you want

shell schooner
#

yeah i get what you mean

finite monolith
#

Okayeg mereg? @eternal iron

inner sorrel
eternal iron
#

fill="white" Madge

shell schooner
#

figma balls

inner sorrel
shell schooner
#

okay found a plugin that makes the svgs not scuffed

finite monolith
#

oh shit

polar magnet
#

it's so ugly though

#

would be awful at a small size

shell schooner
#

true

finite monolith
#

!false

eternal iron
#

!0

finite monolith
#

!!!0

shell schooner
polar magnet
#

look at this

finite monolith
#

lukatis

polar magnet
#

only like half the lines are straight

shell schooner
#

💀

polar magnet
#

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

finite monolith
polar magnet
#

Because I definitely fixed a lot of stuff when I did the original trace

daring gale
#

kinda getting it to work

finite monolith
eternal iron
#

NotLikeThis He's getting distracted from cosmetics again

daring gale
#

then twitch rerenders it 10,000 times @unkempt hill

finite monolith
polar magnet
inner sorrel
#

LOOK

#

IM ADMIN

#

GYZE

#

LOOK AT ME

finite monolith
#

i'm a super admin

eternal iron
#

Did you inject a custom badge or override rendering? @daring gale

daring gale
#

least dank predicate

polar magnet
finite monolith
#

?.?.?.?.?.?.?.?.

wet talon
#

wtf is sketch

daring gale
finite monolith
#

hardcoding badges

daring gale
#

well im just trying to hook shit

finite monolith
#

ye

polar magnet
#

Surely the hardcoding will be fixed later Copege

daring gale
#

badgefarmer

eternal iron
#

It ads one every time you rerender? omegaLUL

finite monolith
daring gale
#

yeah cause im just doi,ng a push OMEGALUL you know how react works

#

it rerenders if i merely just put my mouse over the menu

finite monolith
#

we love react here right

#

FeelsOkayMan ( Kapp )

polar magnet
#

MegaLUL react!

finite monolith
#

👁️

shell schooner
eternal iron
#

Why is twitch's center part of the logo not square ReallyMad

#

Blaming twitch, not you

shell schooner
#

kek squish it to make it square

eternal iron
#

I can show you what mean if you hop in voice ☎️

shell schooner
#

dont have a mic but oke

eternal iron
odd bone
#

is there a party in that vc

eternal iron
#

Just me talking to myself peepoTalk

odd bone
#

oh

shell schooner
#

yeah i have no idea whats going on LULE i dont understand svgs either

#

nymnHmm yeee

#

i can try to fix the decimal shit

#

so its even

#

lule

daring gale
#

works in the carousel too

finite monolith
#

that's nice

iron lake
#

3.0.0_DEV3 kinda works in Firefox. FeelsGoodMan
It loads the .webp in chat but it loads the .avif while autocompleting in the send a message textbox.

finite monolith
#

deadass

#

git is gonna make me want to fucking die

eternal iron
#

Got it working in the end @shell schooner

shell schooner
#

ApuApproved nice

unkempt hill
#

but also why is it offset by 8

#

why is 0, 0 - 8, 8

eternal iron
#

because the twitch logo has that as the margin

#

so the grid is offset by 8

#

I couldnt be bothered to change it

finite monolith
#

FeelsDankMan @eternal iron may i get a pr review

eternal iron
#

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

finite monolith
#

okay that looks good to me

#

do i remove the css vars though

#

yeah

#

i do

unkempt hill
#

Madge stop using that

#

Madge no

eternal iron
#

ok

#

since #7f7f7f29 conveys so much more information

#

50% between black and white

#

16% opacity

#

i think its nice for shades of grey

finite monolith
polar magnet
#

I'm in the camp that say 80 is 50% between black and white

#

and 7F is not

finite monolith
#

vscode color autotranslation translated 50% to 80

#

and not 7F

#

so i trust it i guess

polar magnet
#

neither are correct

#

but 80 makes more sense to me for one main reason

eternal iron
#

yea, its actually 7F.8 Nerdge

polar magnet
#

if you had more precision, 80.00 would be closer to 50% than 7F.00

eternal iron
#

isnt it right in the middle?

#

since 0-100% provides 101 values

unkempt hill
#

anson insane

#

7F is 1/2 FF

eternal iron
#

the middle point is 50.5

finite monolith
#

i hate how anal the formatter is about whitespaces

polar magnet
#

I also prefer tabs instead of spaces for indentation

unkempt hill
#

tabs are what we use tho right

finite monolith
#

nope

#

oh yeah

#

4 tabs

#

in the editor config

unkempt hill
#

no not 4 tabs

#

pepega

#

4 spaces is equal to 1 tab

finite monolith
#

wtf do you mean

unkempt hill
#

1 tab

finite monolith
unkempt hill
#

is what we use for indentation

finite monolith
unkempt hill
#

yes thats what that means

finite monolith
#

oh

#

ok nvm then

unkempt hill
#

if you were to convert spaces to tabs

finite monolith
#

i'm retarded

unkempt hill
#

then its 4 spaces

#

is what thats saying

polar magnet
#

I was just making a general statement. Unrelated to any actual code, living or dead.

finite monolith
#

i honestly see like

unkempt hill
#

that file controls how the editor displays things

#

not how it formats them

finite monolith
#

no difference between tabs and spaces

unkempt hill
#

FeelsDonkMan well you have to pick one or the other

#

and its dumb to use 4 times the codepoints

#

for the same thing

polar magnet
#

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

finite monolith
#

makes sense

#

i guess

eternal iron
#

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

finite monolith
#

that's good

#

i guess

polar magnet
#

which is what I said

#

so thank you

#

:)

polar magnet
finite monolith
#

also

unkempt hill
#

it is tho

#

its closer

finite monolith
#

closing your own issues KKonaSmile

unkempt hill
#

rounding exists for a reason

polar magnet
#

@unkempt hill 7F and 80 are equally close to FF /2

unkempt hill
polar magnet
#

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

unkempt hill
#

ok but now imagine

#

that how have no precision

#

(because you dont)

#

how much precision you have is how much you have

polar magnet
#

doing 2x multiplication on 80 will get you 8000 which is closer to 1/2 of FFFF than 7F00

unkempt hill
#

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

polar magnet
#

7FFF would be equally close as 8000

#

but it wouldn't become 7FFF it would become 7F00 or am I retarded?

eternal iron
#

melon's brain only does discrete mathematics LULE

unkempt hill
#

listen

eternal iron
#

👂

unkempt hill
#

if your using a system of fixed precision

finite monolith
#

your

unkempt hill
#

you'll always get a fixed precision number

eternal iron
#

lmao

unkempt hill
#

you dont magically get to decide its half

eternal iron
unkempt hill
#

so you must round

polar magnet
#

yes but you should round to 80 BASED

unkempt hill
#

but then thats 128

polar magnet
#

yes

#

which is half of 256

unkempt hill
#

127 is the standard for half way Madge

polar magnet
#

actually I have a counter-example

unkempt hill
#

but you dont have 256 you have 256 numbers with a max value of 255

#

0 is a number

finite monolith
#

Danki ** ** ** ** ** ** ** **

polar magnet
#

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?

unkempt hill
#

thats just twos compliment

polar magnet
#

I don't care about yer fancy computer talk

#

I just know what I've seen with my own two eyes

finite monolith
unkempt hill
#

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

polar magnet
#

yeah

polar magnet
unkempt hill
#

FeelsDonkMan 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

polar magnet
eternal iron
#

just think in decimal and its easy LULE

polar magnet
#

I think maybe I'm not the retarded one PAGMANDANCEBUTFAST

finite monolith
unkempt hill
#

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

polar magnet
#

well it also has a remainder

finite monolith
#

@eternal iron @daring gale any reasons why the styling pr hasn't been merged yet?

eternal iron
#

Anatole is merging it now

#

I was debating on more changes

#

but will wait and put them in a later pr

finite monolith
#

yeah

#

makes sense

#

oh

#

jebaited

unkempt hill
#

jebasted

finite monolith
#

Aware

unkempt hill
#

always a co-author

finite monolith
#

oh

unkempt hill
finite monolith
#

it just doesn't show

wet talon
#

that's a nice lil slide

unkempt hill
#

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

eternal iron
#

Rebasing resigns the commits right?

unkempt hill
#

well it has to

eternal iron
#

true

unkempt hill
#

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

finite monolith
#

oh

#

caching

#

nice

empty dawn
#

Messages starting with . (dot+space) aren't displayed in chat for me. They seem to appear in Chatterino

twilit haloBOT
#

cptdrax just woke up: Bedge 💤 (21h, 44m ago)

unkempt hill
#

because those arent supposed to show anyways

#

traditionally those are irc commands

eternal iron
#

yea

#

Im guessing they have a different messagetype

unkempt hill
#

twitch shouldnt even be sending them

eternal iron
#

which might be the reason we dont render them

empty dawn
#

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.

finite monolith
#

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

unkempt hill
#

ApuArt what bug

finite monolith
#

the timeout thing freezes and doesn't go away until you refresh

#

sometimes it even goes into negative numbers

finite monolith
#

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

eternal iron
#

It uses a srcset so the browser should handle it

#

But the size will only be correct if srcset is made correctly

finite monolith
#

oh

#

okay that's good

forest pawn
#

EW

#

LIGHT MODE

sinful forum
#

🤮

novel portal
#

can do .me and /me for example

eternal iron
#

Wait, twitch sends ids for your own messages now @unkempt hill @daring gale

#

So mods can delete their own messages hide

empty dawn
novel portal
woeful stirrup
random patrol
#

imagine not knowing supa secret chatterino features czGiggle

eternal iron
#

Chatterino does this by having 2 irc connections

#

Which has always been possible

eternal iron
#

Was about to review pr Sadge

daring gale
#

im very close to getting HMR to work

#

i think

finite monolith
#

i succesfully yakbaited anatole into making hmr

daring gale
#

it's loading from the server, now just need to make hot reload work

#

OK

#

W ACQUIRED

#

HMR ENABLED

#

@finite monolith @eternal iron PagStick

finite monolith
daring gale
#

no more needing to reload page to work on ui PagStick PagStick

finite monolith
eternal iron
finite monolith
#

oh

#

dank

#

PauseChamp cool sliders

eternal iron
#

Feel like the new slider might be a bit too dank LULE

finite monolith
#

im gonna be the judge

shell schooner
#

ayyybuDed when dev4

finite monolith
#

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

daring gale
#

show

#

worker reload doesnt work yet

#

but yarn setup then yarn dev

#

boom

#

(need to reload your chrome extension after setup)

finite monolith
daring gale
#

ApuThink yea that can work

#

yeah so with HMR, you change anything and it insta reflects on twitch

#

in mere milliseconds

#

pretty based

eternal iron
#

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

finite monolith
wet talon
#

make it spin PauseMan

shell schooner
#

why is the button in the middle FeelsDankerMan

finite monolith
#

holy shit

#

that looks cool

eternal iron
#

lol

daring gale
finite monolith
#

it looks better in 60 fps one sec

eternal iron
#

Now design all the other setting nodes

shell schooner
#

FeelsDankerMan anatoles school of ui design

#

i think we had something like this before

finite monolith
daring gale
#

thats just way too dank

#

only animate the diamond pls OMEGALUL

finite monolith
eternal iron
#

Just let the diamond stay still

#

and shift the entire setting window over

daring gale
finite monolith
daring gale
#

truck did u try hmr

finite monolith
#

not yet no

daring gale
#

try it nyow RAGEY

finite monolith
eternal iron
#

Merge so i can use it for the chat-types branch Madge

daring gale
#

excellify git cherry-pick 3229b9fa4722fcf54b935d63812db98fcdf1a7c1

eternal iron
#

I need to rebase to master anyway

daring gale
#

yea i'll do worker later

#

for now

finite monolith
#

re BASED

daring gale
#

just do a --watch on the worker viteconfig

finite monolith
#

ok

#

do you commit the lockfile if it gets updated

daring gale
#

ye

finite monolith
#

ok

daring gale
#

@eternal iron merged

#

this is going to make your life way easier

#

by a factor of 1000

#

actually massive

finite monolith
#

lets see

eternal iron
#

I just rebased RageVV

daring gale
#

PagStick spent 25 minutes figuring this out , about to save days of work hours

#

i had a brain flash when i woke up

eternal iron
daring gale
#

and realized how to do it

eternal iron
#

Did you see the @ earlier about twitch sending the message id for your own messages now?

daring gale
#

i did

#

we can add a msg self-delete button

#

i wanted to do that

eternal iron
#

Ill just let the slider stay on your own messages

daring gale
#

make it maxed out at delete

#

since its not possible to time or ban yourself

eternal iron
#

That requires actual work tho?

daring gale
#

yes so?

eternal iron
finite monolith
#

uhh FeelsDonkMan

eternal iron
#

Im gonna rework the slider anyways

daring gale
#

yeah the styling could use a little modernization

finite monolith
#

so you just start yarn dev like usual?

daring gale
#
  1. yarn setup
  2. reload chrome extension
  3. yarn dev
finite monolith
#

oh

#

i see

#

that explains why it didnt work

eternal iron
#

I want all the zones in the slider to be customizeable

shell schooner
finite monolith
#

holy

#

kreygasm

eternal iron
#

So gonna make a custom setting node that lets you define the areas and actions

daring gale
finite monolith
#

this will save a lot of time

daring gale
#

so yeah now u can fuck around with the entire twitch site and not have to refresh

finite monolith
eternal iron
#

It will save even more time when implementing the setting types

#

Merge conflict in yarn.lock ResidentSleeper

daring gale
#

just ignore the conflict and merge the one from master

#

then run yarn again

#

for your own changes

finite monolith
#

yarrrrrrrrr(n)

daring gale
#

🧶

eternal iron
#

How do i do this without messing something up x0r6ztGiggle

daring gale
#

accept changes (theirs)

#

then run yarn

eternal iron
#

Yea seems like it worked

finite monolith
#

hmr is the best thing since sliced bread

daring gale
#

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

finite monolith
#

true

#

another nice thing

#

is that you can watch a streamer properly and do shit without breaking

#

and restarting

eternal iron
#

Idk why, but the : autocomplete bricks the inputbox sometimes

daring gale
#

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

finite monolith
#

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

eternal iron
#

Just make sure it dosnt make the background too distracting

#

And or add settings that allow toggling it

finite monolith
#

yeahh no

#

idk

#

about distracting

#

but it looks great for the settings

#

this is how it looks like with 300% saturation

eternal iron
#

Adding settings to stuff is easy btw

finite monolith
eternal iron
#

bitrate 💀

finite monolith
#

deadass

#

fuck

#

what else did i expect

#

idk if it's distracting or not

#

but i think it looks cool

eternal iron
#

We have to generate the twitch prime link that appears on every prime sub message now 💀

finite monolith
unkempt hill
#

grab the component class

#

and coerce it to render manually

#

then parse out the link

eternal iron
#

Yea, but whats the point of rewriting the renderer then

daring gale
#

melon did u see hmr work PagStick

unkempt hill
#

PagStick yeah

daring gale
#

the hooks crash though

unkempt hill
#

well i didnt run it but i saw it

#

yeah i can imagine they will

#

some components

#

specifically input box ones

daring gale
#

i'll exclude twichsite and app.vue from hmr

unkempt hill
#

are very tempremental

eternal iron
#

Might be a better solution tho, since we also have the issue of localization

unkempt hill
#

and just fucking crash

eternal iron
#

For sub messages

unkempt hill
#

when you unhook them

#

its very odd and im not sure why

#

but its the component crashing itself

eternal iron
#

The inputbox crashes on some : autocomplete things btw

eternal iron
#

Just put them in twitchsite for the time being i guess

unkempt hill
#

PagStick also doing it the way you did with the hosted thing

#

makes it so deving on firefox wont be dog ass

daring gale
unkempt hill
#

because on firefox it sets the ttl for css files to basically infinity

daring gale
finite monolith
#

oh

unkempt hill
#

so you have to hard reload

#

any time a css changes

finite monolith
#

honestly

polar magnet
#

Woah lots of cool stuff happening today

daring gale
#

put colors in /assets/style/theme.scss

finite monolith
#

PagChomp scss

daring gale
#

then import "@/assets/style/theme.scss"

#

at the top of any component that need it

#

kkona

#

or actually

finite monolith
#

is it kkona though

daring gale
#

just add the import to twitchsite.vue

#

it should work

eternal iron
#

Yea

unkempt hill
#

yeah wont adding it to each component literally just dupe the styles

#

every time the component is added

daring gale
#

it would eya i forgor its css vars

finite monolith
#

ok

#

well idk

#

i can deal with colors not being hotreloaded

daring gale
#

why deal with that when it can be hotreloaded

unkempt hill
#

does vite even know to hot reload in that case tho

finite monolith
#

hm

#

lets try this

#

i guess

eternal iron
#

Add this to the bottom of twitchsite

#
<style lang="scss">
@import "@/assets/style/theme.scss";
</style>```
finite monolith
#

oh thanks

eternal iron
#

Edited it

#

had the wrong file

finite monolith
#

ok

#

that should work

eternal iron
#

And place that in src/assets/style

finite monolith
#

yes i already did that

eternal iron
#

🥚

finite monolith
#

uhh FeelsDonkMan

#

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

eternal iron
#

Does refreshing fix it?

#

Do yarn setup and yarn dev again

#

And reload the extension in the settings

finite monolith
#

i did it 2 times

#

as in it didnt work at first and i did it again

daring gale
#

not an error you can ignore

finite monolith
#

i'll try again

#

hm

#

im surprised it doesn't give me any errors

#

ooh

#

classic

#

oh wtf

unkempt hill
#

oh yeah hmr does that sometimes its very annoying and then it bricks everything

#

had it happen dozens of times on the trainwrecks site

finite monolith
#

fdm

#

that didn't work either

unkempt hill
#

is something calling one of the use composables

#

like late

#

or outside of the callstack of a component

finite monolith
#

just twitch errors

unkempt hill
#

not a twitch error

daring gale
#

@unkempt hill it seems useComponentHook(), when unloading, is what crashes

finite monolith
#

i mean no shit

unkempt hill
#

on some components

finite monolith
#

huh

unkempt hill
#

i dont think we can avoid it

#

specifically the input box

#

will crash

daring gale
unkempt hill
#

when being gracefully

#

reinserted

daring gale
#

chatlist/chatcontroller does too

unkempt hill
#

like we unhook and then let it rerender

#

and somewhere along it then crashes

#

usually a little bit after

finite monolith
#

hm

unkempt hill
#

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

daring gale
#

i suppose i could ignore app.vue, twitchsite.vue and module files

#

reloading chatcontroller.vue works

#

but we should fix this somehow tho

finite monolith
unkempt hill
#

yeah idk I think just unhooking things is not possible

#

or certain things

eternal iron
#

modules work fine for me

daring gale
#

try changing anytihng in the logic

#

the page will freeze

finite monolith
#

LUL

daring gale
#

like add a console.log

finite monolith
#

oh

#

good idea

daring gale
#

so yea

unkempt hill
#

console.count users

#

GIGACHAD

daring gale
#

the= files that contain hooks will fuck if HMR'd

unkempt hill
#

pretty sure

#

they will fuck if unloaded at all

daring gale
#

this is correct yea

unkempt hill
#

like I think allowing unhooking was a good idea

daring gale
#

i tested it

unkempt hill
#

but not something we can do

eternal iron
#

It dosnt break for me

daring gale
#

try add anything in ChatModule.vue

unkempt hill
#

unless its just something super dumb somewhere

#

that causes a lidl recursion

#

but i cant see how

daring gale
#

well

#

it is a recursion

#

but

#

is the recusion on our side

#

or inside twitch

unkempt hill
#

ik

daring gale
#

if its inside twitch FEELSWAYTOODANKMAN

unkempt hill
#

/ or in react

daring gale
#

yea

eternal iron
#

Just leave it as is for the time being tbh

#

If it freezes

#

just reload

daring gale
finite monolith
#

just alt f4

daring gale
#

yeah i mean its already a big upgrade

#

we'll work out the quirks over time

eternal iron
#

Insane for the message types

daring gale
eternal iron
#

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

daring gale
#

PEPW oh man

finite monolith
#

ok

#

i think i fucked something up

#

is this normal

eternal iron
#

.env.dev points to dev api

finite monolith
#

no

#

it doesn't

#

that's the weird part

eternal iron
#

Did you run setup after?

finite monolith
#

yes

#

i did it like 5 times already

eternal iron
#

Also consider clearing dist/

finite monolith
#

good idea

#

ok

#

that didnt work either

#

oh

#

ok i dont actually know what this means

daring gale
#

did u reload ur chrome ext

finite monolith
#

yes i did it i even uninstalled it

#

and reinstalled it

#

where did it get 3700 out of

daring gale
#

did you close all twitch tabs

#

before reloading

finite monolith
#

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

daring gale
#

not sure

#

but doesnt matter too much

#

thats the event api

finite monolith
#

yeah idk

#

the entire thing is not mounted in general

daring gale
#

wdym

finite monolith
daring gale
#

chrome://inspect/#workers

#

kill any workers there

finite monolith
#

that's so good out of context

#

ok

#

that actually just worked

eternal iron
#

What is the type of an imported vue component?

unkempt hill
#

depends

#

InstanceType<typeof ComponentName>

#

will usually do the trick

eternal iron
#

This might be the dumbest thing ever PepeLa

function getMessageComponent(type: MessageType) {
    return (Types as Record<string, object>)[MessageType[type]] ?? ChatMessageUnhandled;
}```
unkempt hill
#

you can also export

finite monolith
unkempt hill
#

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

eternal iron
#

Does my solution work tho?

unkempt hill
#

no that wont work i dont think

eternal iron
#

This is the index in types/

export * as MESSAGE from "./MESSAGE.vue";
export * as SUBSCRIBE from "./SUBSCRIBE.vue";
unkempt hill
#

what is MessageType

eternal iron
#

An enum

unkempt hill
#

ok then it probably will work

daring gale
#

avoid typescript enums

unkempt hill
#

typescript enums are fine to use

#

just know what they are

vapid veldt
unkempt hill
#

they will compile

#

to regular objects

#

at runtime

daring gale
#

yea

unkempt hill
#

and be fake enums

#

during build

daring gale
#

for most cases its best to use type Foo = "bar" | "baz"

eternal iron
#

I had to use a non const enum here tho

#

since i reverse index it

unkempt hill
#

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;
daring gale
#

it might make sense to use dynamic imports here

unkempt hill
#

yes it will do probably

#

like i did for commands

#

in the trainwrecks site

daring gale
#

yea

#

use async imports excel

eternal iron
#

Does that work with vue?

daring gale
#

did you use defineAsyncComponent() or just import() @unkempt hill

#

yes ofc

unkempt hill
#

it will infer the type based on the string value

unkempt hill
#

it might be something danker

#

but defineAsyncComponent isnt what we want here

eternal iron
#

Should i still use an index?

unkempt hill
#

its perfectly fine

daring gale
#

like you can do this

unkempt hill
#

to import non asnycronously

#

you can do that

#

but theres no real need to here I dont think

daring gale
#

however just an import() is actually better

#

in this case

unkempt hill
#

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

daring gale
#

just add import() in your type map

#

and then async await

#

should work

unkempt hill
#

well there not actually a need

#

to await import

#

its a build time thing

#

its handled specially by vite

daring gale
#

oh ApuThink

unkempt hill
#

it will become

#

the actual value

daring gale
#

TIL

unkempt hill
#

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

eternal iron
#

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

unkempt hill
#

anyways

eternal iron
#

Which is what i think vite does with the imports

unkempt hill
#

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

eternal iron
#

Why no syntax highlights Sadge

unkempt hill
#

real men dont need pretty colors

#

GIGACHAD

daring gale
#

it's christmas all year round for a developer

#

always looking at colorful text

finite monolith
#

real men use notepad

eternal iron
#

isnt [, module] of Object.entries the same as module of Object.values?

unkempt hill
#

yeah

daring gale
#

it is, though i think values() has a bit more overhead

#

cause it transforms the object into an array

unkempt hill
#

for some reason

#

I think so too

daring gale
#

while entries just destructures it

unkempt hill
#

but not positive

#

so dont quote

#

they both make an array

#

so yeah no different

eternal iron
#

Is it really better to run an import every time we want to render a message tho?

unkempt hill
#

it wont do that

#

thats what eager: true does in that above snippet

#

it should prefill

#

at build

eternal iron
#

So it just creates the index basically?

unkempt hill
#

yeah at build

#

so you can just have each file

daring gale
#

vite GIGACHAD

unkempt hill
#

without importing

#

them all

#

manually, that is

eternal iron
#

The index allows us to have different names tho

#

And each of them should only be bound to a message type

unkempt hill
#

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

eternal iron
#

Isnt that literally what the index is tho

unkempt hill
#

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

eternal iron
#

Is there some option on glob to set the key to the filename or do i have to map it?

unkempt hill
#

the key should already be the file name

#

relative

eternal iron
#

Yea, but not the entire path

unkempt hill
#

to wherever you are

eternal iron
#

Just the name

#

i mean, i can just index with the added path

unkempt hill
#

I think

#

you have too

#

not sure

eternal iron
#

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

daring gale
#

thats where you need to use defineAsyncComponent() i think

#

@unkempt hill isnt that the case

eternal iron
#

or jsut defineComponent

daring gale
#

actually yea

eternal iron
#

if i want it to render non async?

daring gale
#

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

eternal iron
#

Component is missing template or render function.

#

It only throws a warn

daring gale
#

is that actually the error though

#

because that comes from our module files

#

since some dont have templates

#

so vue throws a warning

eternal iron
#

The :is is given a Module type

#

Module {Symbol(Symbol.toStringTag): 'Module'}

daring gale
#

Uh what

eternal iron
#

But the ChatMessageUnhandeled looks like this {__name: 'ChatMessageUnhandled', props: {…}, __hmrId: '3fb98326', setup: ƒ, render: ƒ, …}

#

Which is what is returned from defineComponent i think

#

nvm

daring gale
#

it really should just work

eternal iron
#

I know the setup script does something to register imported components

daring gale
#

can u commit i ll take a look

eternal iron
#

stuff is all over the place rn

#

but sure

daring gale
#

ah

#

i got it i thgink

#

and twitch is down

eternal iron
#

What did you do?

#

I still have a half working window, so might work

daring gale
#

just needed import: default