#๐Ÿ‘พ-core-development

1 messages ยท Page 238 of 1

charred monolithBOT
austere talon
#

now it also handles headers

limber skiff
#

beautiful lmao

#

changing the var is way smarter

charred monolithBOT
limber skiff
#

I only realized that was possible too when dealing with platform indicators yesterday

austere talon
#

yeahhh

limber skiff
#

discord changes the vars depending if the profile theme is light or dark too

austere talon
#

it shouldnt be that hard

limber skiff
#

how should we do it

charred monolithBOT
austere talon
#

i found a bug

#

messagelogger adds deleted classname to random shit

limber skiff
#

which

austere talon
#

not actually deleted

limber skiff
#

also vencord adds styles all over the places lmao

#

some in head

#

some in root

#

some in body

austere talon
#

trolley

limber skiff
#

@austere talon which one is it let me fix

#

you handle blurnsfw

austere talon
#

there is messagelogger-deleted-attachment on some random video

#

item: deleted

#

who cooked this up

limber skiff
#

lmao

#

it's this

austere talon
#

๐Ÿ˜ญ

#

need to check item.originalItem.deleted

limber skiff
#

alright fixed already

charred monolithBOT
limber skiff
#

๐Ÿ˜ญ

austere talon
#

oh

#

you're too slow

#

actually

#

push ur fix instead

limber skiff
#

๐Ÿ˜›

austere talon
#

it removes first patch right?

limber skiff
#

ya

austere talon
#

yeah thats better

#

guh BlurNSFW is fine i think

#

i have it on and doesnt seem laggy

#

just keep it for now im lazy

#

unless you wanna rewrite it

charred monolithBOT
limber skiff
#

just to keep one in the end?

austere talon
#

guhhhh

#

the thing is

#

discord is insane

#

they put image classes on videos

#

๐Ÿ˜ญ

#

discoooooord

#

it's easy to fix if you're okay with playing video being blurred

limber skiff
#

lmaooooo

#

what if lazyImg

austere talon
#

VIDOE IS LAZYIMG

limber skiff
#

god damn

austere talon
#

and not all images have lazyimg

#

lol

#

sometimes they put img with 0 classes

#

imageWrapper.lazyImg > img

#

the child has no class

#

videos have both of those classes on parent too

#

well

#

we can make BlurNSFW add better class ig

#

but then we need to add more patches

limber skiff
#

which things do we need to target exactly?

#

I'm kinda confused

#

just normal images?

austere talon
#

images, embed images, videos

#

it should blur all media in nsfw channels

limber skiff
#

videos thumbnails?

austere talon
#

yes

austere talon
#

have to patch so many places probably

limber skiff
#

why is that so small

austere talon
#

hmm

#

ig it shouldn't be too hard

#

yeah it's easy okay

#

916616

#

nvm because no way to detect if it's an image or video

#

also wtf why is devtools so laggy

#

chrome devtools are laggy and it also makes discord laggy

limber skiff
#

hmm

#

what about srcIsAnimated

#

actually this should only target the thumbnail of videos so whats the issue?

austere talon
#

that place also renders video itself

#

that place renders everything

scenic brook
austere talon
#

image vs video

limber skiff
#

use the alt

austere talon
#

no

limber skiff
#

๐Ÿ˜›

austere talon
#

it probably is language dependant

austere talon
#

unless you wanna check if src contains mp4 webm etc but that's horrrible

#

well we can match this

#

that's where messagelogger adds deleted classname

limber skiff
#

341176 has the type

#

you can pass it down to the component

austere talon
limber skiff
#

like image zoom does it

austere talon
limber skiff
#

alright

austere talon
#

i will copy paste ur patch

limber skiff
#

we are gonna fix discord lag by memoizing everything @austere talon

{
    find: ".createElement=",
    replacement: {
        match: /function (?=.+?\.createElement=(\i))\1\((\i),\i,\i\){/,
        replace: "$&$2=$self.getMemoizedComponent($2);"
    }
}

MemoSymbol: Symbol.for("react.memo"),
FragmentSymbol: Symbol.for("react.fragment"),

getMemoizedComponent(original: any) {
    if (!original || typeof original === "string" || original.$$typeof === this.MemoSymbol || original === this.FragmentSymbol) {
        return original;
    }

    let component = componentCache.get(original);
    if (!component) {
        component = React.memo(original);
        componentCache.set(original, component);
    }

    return component;
}
austere talon
#

LOL

limber skiff
#

(it works)

austere talon
#

๐Ÿ˜ญ

#

it will probably cause many bugs lol

limber skiff
#

I used for a bit and had no issues lmao

median rapids
limber skiff
#

but yeah that would def need a lot of testing

austere talon
#

๐Ÿ˜ญ

limber skiff
#

ngl im making that a userplugin

#

lets see how this goes

median rapids
#

does it really improve perf

#

i will beta test

limber skiff
#

not sure lol

#

here you go

austere talon
#

nvm thats only attachments

#

i hate this

#

๐Ÿ˜ญ

limber skiff
#

I broke it nvm

austere talon
#

okay nvm

limber skiff
#

look at how many memos

charred monolithBOT
limber skiff
#

actually is this even working

austere talon
#

i dont think it's working lol

#

if it did it would cause many bugs

#

should we merge @limber skiff

#

WAIT

#

NOT YET

#

COPILOT IS COOKED

limber skiff
charred monolithBOT
austere talon
#

anyway should be good now

frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

austere talon
#

did u run

frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

austere talon
#

vtest fix-lag

nimble pendantBOT
frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

limber skiff
austere talon
#

imagine

#

vmerge fix-lag

nimble pendantBOT
#

Merging into main shipit

austere talon
#

vtag 1.10.4

nimble pendantBOT
#

Creating release shipit

austere talon
#

soon Venbot will be chief automation

tropic valley
#

repo management via discord

rugged spire
#

is this real

austere talon
#

|| no ||

tropic valley
#

very cool honestly

rugged spire
#

๐Ÿ˜ญ

#

gitbot

tropic valley
#

smh i believed u

scenic brook
#

Would be a bit rough since we're on 1.11.3

rugged spire
#

what if i made a discord bot that let people edit a git repo

#

and only let people edit through the bot

#

send git patches over discord

limber skiff
austere talon
#

|| fake ||

rugged spire
charred monolithBOT
#
[Vendicated/Vencord] branch deleted: fix-lag
rugged spire
#

no love for dev branch...

fossil inlet
#

guhhhhhhh not on dev ๐Ÿ˜ญ

charred monolithBOT
austere talon
#

patience my children ๐Ÿ˜ญ

fossil inlet
#

HOW MANY PEOPLE LURK THIS CHANNEL ๐Ÿ˜ญ

rugged spire
#

idk occasionally i say some dumb stuff and get reactions from people who cant type here

scenic brook
rugged spire
rugged spire
rugged spire
surreal fiber
#

I lurk occasionally, saw there's a lag fix that's relevant to my interests but not really clear to me what's suddenly causing it and how to avoid it when doing css

austere talon
#

most lag I've seen caused by :has()

#

which didn't lag before but does now

#

idk just don't use :has ever

surreal fiber
#

I see I see

rugged spire
fossil inlet
rugged spire
dusk blaze
rugged spire
dusk blaze
#

i will start making

glass jasper
jolly egret
#

would be great when its down all the time

rugged spire
#

remember when github was down a few days ago trolley

jolly egret
#

fake

fossil inlet
#

@jolly egret dont worry, ill crash it somehow

rugged spire
dusk blaze
fossil inlet
rugged spire
#

you shouldn't need to

#

it's legacy stuff anyways

scenic brook
austere talon
#

according to some guy in support, some themes that lag on vencord don't lag on betterdiscord

probably ๐Ÿงข but we should still investigate. maybe it's something about how we insert the styles (average chrome moment, wouldn't even be surprised)

scenic brook
#

I dunno if it's massively relevant but if you go to the performance tab and enable this in settings, it crashes when it tries to load the profile after recording, which doesn't happen if you uninstall vencord

#

Which is annoying because it'd probably be pretty useful

#

Disabled all plugins and tried it and still crashed

austere talon
#

maybe cause we put styles in the body which is technically invalid

scenic brook
#

I dragged all the style tags into head and it didn't seem to change anything

austere talon
#

it probably caches tbf

scenic brook
#

desktop

#

so chrome

austere talon
#

oh nice

#

edge has a special css debugger that's why i asked

scenic brook
#

I still had one more :has() in my own fork, oops, even just getting rid of that one makes so much difference

austere talon
#

I didnt know chrome also has one

limber skiff
#

but nah

scenic brook
limber skiff
#

discord must have fucked up somehow and made styles recalculate way more

scenic brook
#

Kinda crazy that :has() is so detrimental

still maple
#

i think discord F up smth
personally now if i am in vc at some point discord get randomly cooked and hang up even in vanilla

scenic brook
limber skiff
#

@median rapids btw are you actually using that plugin

#

context menus need fixing for it so here you go

scenic brook
#

fwiw when it did work I got this

#

but again that's no vencord

#

77k matches attempted, only 1000 succeeded lol

fossil inlet
#

I LOVE OVERRIDING CONSOLE METHODS I LOVE BEING ABLE TO JUMP TO WHERE THEY WERE CALLED crazy_fucker

rugged spire
austere talon
#

see what it does

#

maybe we can patch it out

scenic brook
#

Can you not just expand the stack

austere talon
#

ah okay

rugged spire
austere talon
#

the point isn't the warning its the stacktrace

fossil inlet
nimble pendantBOT
austere talon
#

nop

rugged spire
#

i know

#

it doesnt do it ๐Ÿ˜ญ

fossil inlet
#

i wrote that part ๐Ÿ˜ญ

austere talon
#

no it doesnt

rugged spire
#

then it is broken

fossil inlet
austere talon
#

disabling discord loggers is so bad

rugged spire
austere talon
#

many are useful

rugged spire
fossil inlet
limber skiff
limber skiff
#

cuz they be pushing to ptb at sunday

charred monolithBOT
#

My solution was just not to try and merge the bot and custom tag. I always found separating them with โ€ข to be somewhat weird - and this works just fine IMO:

That might be a nice solution, but wouldn't it look weird with [APP] [WEBHOOK]?

Of course you can't add everything with decorators though
Well, the only thing i haven't seen an API for was for user profiles, messages/member list are quite easy

I'll probably change to decorations again tomorrow, try to implement a pr from OIR...

scenic brook
#

I know the comment on the API clarifies the icons are added to profiles but I feel like the name NicknameIcons kind of sounds like they'd appear next to the nickname in messages too

charred monolithBOT
granite sky
#

Why does the GitHub webhook still use my old pfp ๐Ÿ˜ญ

long stream
charred monolithBOT
limber skiff
limber skiff
#

@granite sky I will review your changes after I try this API and discord-fixes merged

#

planning to also change how the container of member list decorators is, to allow centering with flex and having margin with gap, which is easier than having to add the margins manually into the components

#

or I might move those patches into the actual API for those decorators

#

(thinking now it makes more sense)

#

the current approach of centering things in the message and member list decorators is horrible

charred monolithBOT
#

I've investigated this. No it is not possible. These variables only accept primitive CSS colors, that is hex and rgb, in semi-rare cases rgba on SOME linux distros, but not all, discord and many themes use cielab, calc and other, which would make this non-functional.

The best I came up with was to maybe introduce a setting, where users can change this to some variable if they use themes, but having themes re-calculate said styling isn't easy either, so I left it as is.

Additionally chro...

odd heath
#

@limber skiff pindms is breaking for me after reloads and also i noticed the values get added to userBasedCategoryList infinite times; think you fucked smth up ๐Ÿ˜ญ
works fine if i put it back into datastore and reload but every reload after that its broken

#

dont have time to look into ti more rn so im just leaving it to you :3

limber skiff
odd heath
#

this is what i mean btw

granite sky
#

So basically it's green light for me to use decorations
Should i do it the way theKodeToad did?

limber skiff
odd heath
#

how

limber skiff
#

the current implementation is an object

#

not an array with userId

odd heath
#

i literally cleared the settings

#

unless theres a chan ge on dev?

limber skiff
#

well I can you show you

#

did you mess up when merging?

odd heath
#

idts

#

unless somehow vscode trolled me with saving the config

#

brb trying again

limber skiff
#

doesn't seem like you messed up

#

run /vencord-debug

limber skiff
odd heath
#

got troleld

#

vesktop wasnt closed properly ๐Ÿ˜ญ

#

works fine now

#

it wasnt in the app icons but the process was running blobcatcozy

#

killed it and cleared settings so now it works

charred monolithBOT
#

no, it returns it correctly, it's simply discord that's changing to cielab, it returns whatever colorspace method is used, so if a theme uses cielab, it will return cielab, if it uses lab, it will return lab, if it uses hls it will return hls, getComputedStyle simply computes and normalizes the values of the color space, it doesnt convert the colorspace into another colorspace

austere talon
#

untrue ๐Ÿ˜ญ

left sequoia
#

wdym untrue

#

its legit how its always been

#

well "always"

austere talon
left sequoia
#

since CSS introduced fancy color spaces that work outside of RGB

#

yeah hsl was misspoke

#

because its within rgb colorspace

austere talon
#

but this doesn't work

left sequoia
#

but cielab and lab isnt

#

yeah oklab isnt either

#

its a wider colorspace

austere talon
#

just find a new solution bleh

#

ig this broke when discord changed to oklab then

left sequoia
#

well

#

it works for u

#

because the launch splash is still a full DOM

#

the controls overlay isnt

#

it passes whatever string u give it to the OS "for the most part"

austere talon
#

nah it doesn't work for us either we need rgb

left sequoia
#

i dont even know where to find the colorspace normals to do that

austere talon
left sequoia
#

i've done it before, but its not enjoyable

#

yeah see that uses some fucking normals that they pulled fucknows from where

#

casual "0.6299787005"

#

yes that makes sense

austere talon
#
function clamp(value, min, max) {
  return Math.max(Math.min(value, max), min);
}

const linearToGamma = (c) =>
  c >= 0.0031308 ? 1.055 * Math.pow(c, 1 / 2.4) - 0.055 : 12.92 * c;

function oklabToSRGB({L, a, b}) {
  var l = L + a * +0.3963377774 + b * +0.2158037573;
  var m = L + a * -0.1055613458 + b * -0.0638541728;
  var s = L + a * -0.0894841775 + b * -1.2914855480;
  // The ** operator here cubes; same as l_*l_*l_ in the C++ example:
  l = l ** 3; m = m ** 3; s = s ** 3;
  var r = l * +4.0767416621 + m * -3.3077115913 + s * +0.2309699292;
  var g = l * -1.2684380046 + m * +2.6097574011 + s * -0.3413193965;
  var b = l * -0.0041960863 + m * -0.7034186147 + s * +1.7076147010;
  // Convert linear RGB values returned from oklab math to sRGB for our use before returning them:
  r = 255 * linearToGamma(r); g = 255 * linearToGamma(g); b = 255 * linearToGamma(b);
  // OPTION: clamp r g and b values to the range 0-255; but if you use the values immediately to draw, JavaScript clamps them on use:
  r = clamp(r, 0, 255); g = clamp(g, 0, 255); b = clamp(b, 0, 255);
  // OPTION: round the values. May not be necessary if you use them immediately for rendering in JavaScript, as JavaScript (also) discards decimals on render:
    r = Math.round(r); g = Math.round(g); b = Math.round(b);
  return {r, g, b};
}
left sequoia
#

its flat out easier

#

to paint oklab to a canvas

#

then read the pixel colors

#

as uint8

#

then convert that to HEX

austere talon
#

much slower tho probably

left sequoia
#

oh nooo

#

4ms vs 1ms

austere talon
#

i mean it shouldn't matter but still

austere talon
#

we need it for Vesktop anyway

#

and you could also use it for your PR

left sequoia
#

except for the part

#

where its inside vesktop only

#

and not a utility

#

and except for the part where noone is actually reviewing the PR

#

ยฏ_(ใƒ„)_/ยฏ

#

also fuck the new refresh is fucking LAGGY

austere talon
#

css is laggy now blobcatcozy

#

css banned

left sequoia
#
const {arr2hex}=await import('https://esm.sh/uint8-util')
const canvas = document.createElement("canvas")
const ctx = canvas.getContext("2d")
canvas.width = 1
canvas.height = 1
ctx.fillStyle = 'oklab(0.323409 0.00288205 -0.0101295)'
ctx.fillRect(0, 0, 1, 1)
const img = ctx.getImageData(0, 0, 1, 1)
const color = console.log("#"+arr2hex(img.data))
#

#323239ff

#

ez

#

its actually #323238ff but its close enough

#

considering the colorspace conversion

austere talon
#

what am i looking at

left sequoia
#

discord having a spasm

#

and constantly re-mounting some padding component

#

which is re-painting the entire window each frame

#

i'm doing nothing btw

austere talon
#

is that why it's lagging with css

#

when I was debugging performance it had so many long recalculate style entries

#

that's why I even thought of CSS being the culprit (and it was), but Discord has to be doing something wrong to cause this

left sequoia
#

css being laggy is another story

#

i fixed it for the most part by simply doing

* {
will-change: scroll-position
}
#

that removed all scrolling perf problems

#

but there are still quite a bit more issues

#

typing for some reason re-paints the userlist sidebar for each character

#

and if you're connected to VC, some icons on the left

left sequoia
#

NO

#

HOLY FUCK

#

NO

#

JESUS CHRSIT

#

DONT DO THAT

austere talon
#

u cant stop me

#

almost as insane as nookies' plugin that memoises every discord component

left sequoia
#

nah

#

what u sent is flat out asking to break any form of overlay

#

and z-index

austere talon
left sequoia
#

fortunately all doesnt exist, but if it did, it would work the same way as transition all, which means it would apply to stuff like transform, which means it would RESET EACH Z INDEX CONTEXT FOR EACH COMPONENT

left sequoia
#

and scroll chat

#

with and without that css

#

will-change scroll-position doesnt change z index contexts, it preserves them, while rendering scrolling via GPU, so its actually a "free performance" css flag

austere talon
#

would probably be better to only apply to the right elements tho, no?

#

and if it actually makes a difference, why don't they do it

left sequoia
#

there are very very rare edge cases where that's not the case, but thats only if you were already using will-change or are using transforms on weird properies

left sequoia
austere talon
left sequoia
#

you're expecting basic competence from discord developers?
you're insane

left sequoia
#

so overriding it, means you no longer reset the z-index context

#

which is in theory breaking

#

fortunately discord developers are too retarded to use semi-modern css, so they never used that property

#

so this is trully a "free perf" case for discord

austere talon
#

nah they have it a few times

left sequoia
#

HOLY THEY DID

#

XD

#

ofc nnot in any remotely correct way

austere talon
left sequoia
#

will-change opacity is rarely useful, because taht only helps when going from not having opacity defined, to having opacity defined

#

which you'd never do

#

aka when switching rendering contexts from CPU to GPU

#

transform3d is useless, because you'd already have it defined too

#

transform can be useful for togglable animations, but rarely does much

austere talon
#

since opacity should already be GPU accelerated

left sequoia
#

^

#

as u linked above

#

its good if u dont want to use the transform hack

#

because it'd override ur other transforms you'd have in animations

#

but if you havea animations that switch between trasnforms you have other issues

#

it can be useful if you're doing perspective shit, but discord doesnt do parallax

austere talon
left sequoia
#

will-change contents is unironically good, but difficult to use

austere talon
#

have properties cascade

left sequoia
#

it does

#

import order

austere talon
#

nono

#

i mean have a way to merge them

#

.foo {
  transform: translateX(10px);
}

.bar .foo {
  transform: translateY(10px) attr(transform);
}
#

something like this

left sequoia
#

ah, propery merging

austere talon
#

idk how the syntax / naming would look

left sequoia
#

yeah that'd break all css known to man

#

imagine that for borders

austere talon
#

no it'd be opt in

#

via some function

#

like attr(transform)

#

by default it doesn't merge but you can merge

left sequoia
#

if you need to opt into it, you might as well just write the transform with multiple properies

austere talon
#

effort

left sequoia
#

1:1 the same effort

#

you'd need to spare effort to opt in anwaysy

#

anyways, review webpwa

austere talon
#

dont whip me motherfucker

left sequoia
#

awww

#

you like that, dont ya

#

man cant do any suggestive wording

#

shit gets blocked

#

i saw ur spendings

#

50% anime waifu figurines, 30% food, 20% renting a dominatrix

austere talon
#

๐Ÿ˜ญ

#

ur insane

left sequoia
#

nah im unhinged

#

there's a difference

#

i'm highly functional, insane people arent

left sequoia
austere talon
#

i mean

#

kinda ig

#

lol

#

userscript

left sequoia
#

does userscript have is_extension defined as true?

austere talon
#

nop

left sequoia
#

and ff extension is dead

#

oke

austere talon
#

yes

left sequoia
#

do you plan on actually reviewing the webpwa shit?

#

or should i kill it

grave mangoBOT
# austere talon it's used for this https://github.com/Vendicated/Vencord/blob/main/src/utils/web...

web-metadata.ts: Lines 7-19

export let EXTENSION_BASE_URL: string;
export let EXTENSION_VERSION: string;

if (IS_EXTENSION) {
    const listener = (e: MessageEvent) => {
        if (e.data?.type === "vencord:meta") {
            ({ EXTENSION_BASE_URL, EXTENSION_VERSION } = e.data.meta);
            window.removeEventListener("message", listener);
        }
    };

    window.addEventListener("message", listener);
}

content.js: Lines 14-20

window.postMessage({
    type: "vencord:meta",
    meta: {
        EXTENSION_VERSION: browser.runtime.getManifest().version,
        EXTENSION_BASE_URL: browser.runtime.getURL(""),
    }
});
austere talon
#

seems cool enough

left sequoia
#

because you dont have an "extension only" build target

#

because web is both vesktop and extension

austere talon
#

it makes sense

#

vesktop is considered both desktop and web

#

because all web plugins also make sense on vesktop

left sequoia
#

yeah but ur build targets should be singular, like all compilers do it, and instead have targets defined as array

#

so instead of doing .web

austere talon
#

there's a more specific tag for DiscordDesktop only / Vesktop only but for web there was never a use case for this

left sequoia
#

you'd do .vesktop.extension

#

like how webpack does it

austere talon
#

like i said there are more specific tags for desktop :P

#

just not for web

left sequoia
#

yeah

#

i aint doing that in my PR

#

out of scope

#

but smth u should consider

austere talon
#

cant really think of any other use case than pwa

left sequoia
#

im sure people would come out with some extension specific plugins

#

but extension interest overall is low

austere talon
#

why cant the PWA work on userscript? besides shortcuts I don't see anything that wouldn't work there

charred monolithBOT
left sequoia
#

URL.createObjectURL

austere talon
#

oh does CSP lock it

left sequoia
#

yes

austere talon
#

ah okay and this is the only way to get pwa working?

left sequoia
#

yep

#

it needs to be a specific link element mounted to dom

#

only way

#

there actually also used to be a service worker requirement

#

but they removed that

#

as in W3C did

austere talon
#

TamperMonkey has a CSP bypass but idk if it will work for this

left sequoia
#

doesnt rly matter

#

for chrome you'd probably use extension anyways

austere talon
#

i think it's only for GM_* functions

left sequoia
#

and ff doesnt have any of these features

austere talon
#

why is ff so bad

left sequoia
#

uuuuh

#

its bad because it doesnt support a fuckload of W3C standards

#

but i think your question is more of "why do they arrive at those decisions"

austere talon
left sequoia
#

but that's not public knowledge, for the most part i assume they dont like draft specs that chrome suggests

austere talon
#

idk if discord csp also blocks data urls

left sequoia
#

and even less in making only 1/2 a plugin work on userscript only

#

and then making coniditonal userscript checks for ff and chrome

#

its just asking for cancer and confusion

#

especially considering i patch the borwserNotice component

#

i guess that could be conditional too

#

uuugh

#

shivers

#

naah

#

if you introduce a separate userscript and extension build target i could

#

but that means there would be 2 plugins for this

#

or 3 probably for the core functionality, unless you're okay with importing utility functions across plugins

median rapids
charred monolithBOT
#

This plugins automatically detects the 'Join Servers For You' scope in all authorization links you click in your desktop client and strips it out. Effectively not granting that scope to the application.

This plugin can break some apps if they check the scopes you granted them, but that can be easily fixable by just disabling the plugin for little while.

Here is little showcase how it works:
https://github.com/user-attachments/assets/b21965f1-4e9d-4e1a-b1ef-bd413f0c52ef

left sequoia
#

@austere talon sry for ping, but considering, should this be enabled by default? it feels like the notifications and keybinds should be at least... when looking at other force enabled plugins i'm torn on it

#

like web context, keybinds and screenshare are, and they fix... what discord is missing and rly should have anyways

#

this... kinda feels like that? but not all of it?

#

idk

odd heath
#

guhhhhh i need to make gfithub stop sending me mails

#

so horror

left sequoia
#

disable auto-subscribe to threads

#

gh emails are great when u want them

#

XD

odd heath
#

true

charred monolithBOT
#
[Vendicated/Vencord] New branch created: decorators-gap
limber skiff
#

I cooked

#

actually this should be good to push directly

charred monolithBOT
limber skiff
#

vtest dev2

nimble pendantBOT
charred monolithBOT
#
[Vendicated/Vencord] branch deleted: decorators-gap
frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

charred monolithBOT
frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

limber skiff
#

wait ehh that's the wrong commit

charred monolithBOT
left sequoia
#

shit, what inspired every1 to fix their css all at once all of a sudden

left sequoia
#

not1 gave a fuck before tho

rugged spire
limber skiff
dusk blaze
rugged spire
#

so true

left sequoia
dusk blaze
#

@rugged spire i will take all good solutions add into InRole and make it the ultimate role member viewing plugin

fossil inlet
dusk blaze
#

speaking of which i need to merge ryfters pr

rugged spire
dusk blaze
#

ill merge today probably

rugged spire
#

i should make a rolepopouts plugin

dusk blaze
#

i do feel like a plugin like this should not be in upstream

#

soooo many will ask "why doesn't it have all members"

rugged spire
#

maybe make default enabled hidden setting to show a warning

#

doesnt have to be hidden

limber skiff
left sequoia
#

idk

#

just seen like 3 commits related to css perf

#

then every1 in theme dev is suddenly rallied around perf

scenic brook
#

Because a ton of people's discords have been horribly laggy all of a sudden the last few days and fixing the css fixes it

rugged spire
surreal fiber
rugged spire
#

it looks so bad

#

this is a 2021 experiment

fossil inlet
#

Rank them blobCatCozy

rugged spire
#

i will not

rugged spire
#

it's so rare to see somone mention a role anyway

charred monolithBOT
limber skiff
#

@median rapids I think memoize all breaks mentions lol

charred monolithBOT
median rapids
#

works for me

#

oh clicking them

#

yeah it does lol

limber skiff
#

(the plugin leaks memory rn too)

frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

austere talon
#

use weakmap trolley

limber skiff
#

yeah lmao

#

literally that

charred monolithBOT
limber skiff
#

so bad to align

#

it's good now

charred monolithBOT
median rapids
#

they still work in embeds

#

maybe it's placebo but server switching does seem a little faster

#

it also breaks clicking the xxx new messages bar

limber skiff
#

๐Ÿ˜ญ

charred monolithBOT
charred monolithBOT
median rapids
#

checked it out :3

austere talon
grave mangoBOT
median rapids
#

evil

#

except the size is changed for some reason

shell shuttle
#

i used it as a base for learning how menu components work

shell shuttle
#

the reason i downscaled to 2k is that it's massive in the chat

#

but i'll set it back

limber skiff
#

client theme causes massive lag when starting

#

and I noticed discord is taking longer to load initially too

#

it might be because of it

#

I swear to god why is it not aligned again

austere talon
charred monolithBOT
limber skiff
#

alright it's good now

#

(this has to be the last time I have to change it)

shell shuttle
limber skiff
#

actually I want yall opinions

charred monolithBOT
limber skiff
#

vs

#

1 is actually perfectly centered in the element

austere talon
#

maybe im retarded but they look the same to me

limber skiff
#

2 isn't lol

#

but it looks better

austere talon
#

the timestamp looks misaligned in the first

limber skiff
austere talon
#

yea

limber skiff
#

when it's perfectly centered it looks worse

austere talon
#

welcome to the reality of design lmao

#

actually centered doesn't necessarily mean it looks centered

charred monolithBOT
limber skiff
#

alright

#

๐Ÿ‘ one ๐Ÿ‘ more ๐Ÿ‘ time ๐Ÿ‘

charred monolithBOT
fossil inlet
#

20000 force pushes blobcatcozy

austere talon
#

we love

#

I hate how force push fucks up pr sorting ๐Ÿ˜ญ

#

cause it updates all prs

#

so it resets the last updated

fossil inlet
#

nop

#

i was wrong

glass jasper
median rapids
#

do

limber skiff
#

it's always gonna be me

median rapids
#

make the graph but it actually logs nookies mistakes

fossil inlet
#

?remind 7.5hr bump pr

shut vineBOT
#

Alright @fossil inlet, in 7 hours and 30 minutes: bump pr

charred monolithBOT
rugged spire
#

what have you been force pushing ๐Ÿ˜ญ

shut vineBOT
#

@fossil inlet, <t:1738564087:R>: bump pr

jolly egret
#

Even though its now a weekday, we should probably push a tag, the last couple times they have reviewed quite quickly so chances are we'll get it in before anything super breaking hits

granite sky
#

Is this supposed to be like this?

charred monolithBOT
austere talon
#

you love off by one errors

granite sky
charred monolithBOT
limber skiff
#

that ^

granite sky
limber skiff
#

or SelectedGuildStore if you only need guild id

granite sky
limber skiff
#

but question, why is guild/channel needed?

granite sky
#

Fire

granite sky
limber skiff
#

ahh, right

charred monolithBOT
#

Just use SelectedChannelStore - it shouldn't be possible to open a profile for another channel I don't believe

Fire, I didn't knew that this existed or totally forgot about it. Now i should just wait till new API drops and this plugin going to be gluten patch free

Edit: just remembered the new modal sometimes shows guild profile and sometimes global profile. I suppose that could cause problems.

Eehh, it's still a draft and we have time to see how it behaves, but SelectedStor...

charred monolithBOT
glass jasper
scenic brook
#

Yeah I missed a type

fossil inlet
scenic brook
#

Should be good now

#

Yeah

#

As opposed to js return e[e.MESSAGE = 0] = "MESSAGE", e[e.SUCCESS = 1] = "SUCCESS", e[e.FAILURE = 2] = "FAILURE", before

#

formatting smh

#

Third time lucky

shell shuttle
#

i have no idea how to find the url for it ๐Ÿ˜ญ

#

wait nvm i could go to the docs it probaly has it

odd heath
#

copy discord code
render
crash
wires

shell shuttle
#

is this valid

#

like

#

is that a ts thing

granite sky
shell shuttle
#

im not sure

#

cuz like

#

uhhhhh

granite sky
shell shuttle
#

i want it to check if it isnt a png or lottie

#

and then change it to the other endpoint

sterile oak
granite sky
#

![1,3].includes(data.format_type) - ?

scenic brook
shell shuttle
#

oopsie

sterile oak
#

keep it simple, !(data.format_type === 1 || data.format_type === 3); blobcatcozy

shell shuttle
#

i forgot i could do that

#

bruhhhhhh

sterile oak
#

how do you- nvm

granite sky
long stream
#

most if not all stickers are just images

#

idk if you can still upload lottie stickers

median rapids
median rapids
#

just check if it's a gif and use media proxy, otherwise use cdn

fossil inlet
charred monolithBOT
jolly egret
#

i've been too lazy to do that but i wanted to

fossil inlet
jolly egret
#

you can do a lot that the discord client doesn't let you do

#

its... crazy

brazen bone
jolly egret
#

are you shocked at the code quality or the fact that you can even do that

brazen bone
#

That you can do it

charred monolithBOT
sterile oak
#

is there a reason of why those two are the same but with different names?

#

nvm ig vencord web is outdated

austere talon
#

the plugin was renamed

limber skiff
jolly egret
#

i mean yeah that works but its not a snowflake on discords end so generating a snowflake is kinda redundant

#

it just happens that the current attachment's length is the expected value (its just adding one, not reordering), though anything bigger than the current attachment count works

frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

None

Bad Webpack Finds
waitForComponent(o=>{let r=o;for(;r!=null;){if(t(r))return!0;if(r.$$typeof)if(r.type)r=r.type;else if(r.render)r=r.render;else return!1;else return!1}return!1}...)
Bad Starts

None

Discord Errors

None

limber skiff
#

ugh

jolly egret
#

damn

grave mangoBOT
# odd heath https://github.com/Vendicated/Vencord/blob/a3ee0784e29a78f7a1c124628e6964d0c13c3...

SearchModal.tsx: Lines 604-619

const setSelectedCallback = useCallback((e: DestinationItem) => {
    setSelected((currentSelected: DestinationItem[]) => {
        const index = currentSelected.findIndex(item => {
            const { type, id } = item;
            return type === e.type && id === e.id;
        });

        if (index === -1) {
            return [e, ...currentSelected];
        }

        currentSelected.splice(index, 1);
        return [...currentSelected];
    });
}, []);

odd heath
#

thanks

#

so can someone explain to me how it causes a TypeError: Cannot read properties of undefined (reading 'length')

#

i dont fucking get it

fossil inlet
odd heath
#

nop

#

it doesnt get executed

#

i can put error throws and console logs none of them do anything when that error happens

#

neither does changing the dep array do anything

charred monolithBOT
odd heath
#

and if i remove the usecallback react complains about rendering less components than expected

limber skiff
#

vtest dev2

nimble pendantBOT
frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

None

Bad Webpack Finds
waitForComponent("ref:this.ref,preload:")
Bad Starts

None

Discord Errors

None

limber skiff
#

good

#

that find was bad anyways

odd heath
#

guhhhhh this is making me go insane

charred monolithBOT
limber skiff
#

vtest dev2

nimble pendantBOT
frail skyBOT
#
Bad Patches

None

Bad Webpack Finds
waitForComponent("ref:this.ref,overridePositionRef:", "renderPopout:this.renderPopout")
Bad Starts

None

Discord Errors

None

#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

limber skiff
#

ughhhhhh

charred monolithBOT
jolly egret
#

Multiple people have been complaining about NotificationVolume not working but i don't really wanna test it right now, just thought i'd put it here if it is an actual issue (reporter says nothing so idk if its just user error)

charred monolithBOT
limber skiff
#

vtest

nimble pendantBOT
frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

charred monolithBOT
frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

limber skiff
#

@quasi surge there you go

jolly egret
#

imagine not getting it right now you have to wait another week

limber skiff
#

@fossil inlet why does it throw

#

fourth time is the charm

fossil inlet
#

patch helper used RegExp(//) as a syntax check

#

and \\i is valid regex

charred monolithBOT
#
charred monolithBOT
fossil inlet
#

@rugged spire soon

fossil inlet
charred monolithBOT
#

It does for me

I forgot that i'm currently replacing the old one

Also please merge dev into this branch! Both APIs you used had changes as I mentioned, and I'm pretty sure your tags are going to be off-center because of the classes you are adding, and the fact the APIs do the centering for you now
Messages were off-center, I've removed both classes and rem-thingy, they are still off-centered, classes that i've used were from discord itself and that's how they used it

By defaul...

fossil inlet
charred monolithBOT
granite sky
# charred monolith

@limber skiff look at my screenshot here, that's where i returned remSizes

#

In the member list discord uses px for sizing

#

In messages - rem

limber skiff
#

the height is still different

#

and that's causing you to have to apply bottom to center

#

unless it's because the API centers it badly...

#

hmm I will have to see

granite sky
limber skiff
#

first looks a bit smaller

#

use inspect elements and check the sizes

granite sky
granite sky
#

I use same props as discord does

limber skiff
#

does the component itself without the classes have that offset?

granite sky
#

But I've removed classes as you've told me

limber skiff
#

oh

#

what if you set top: unset instead

granite sky
shut vineBOT
#

Alright @granite sky, in 12 hours, 44 minutes and 18 seconds: check if this is true

granite sky
#

I might actually try my horror setup to check it

granite sky
#

1 - discord original tag
2 - I've found a more specific thing

#

@limber skiff does it look better for you?

scenic brook
#

I kinda have to do it in vencord because my plugin is written in java and the regex engine is slightly different

scenic brook
#

Ew I just reloaded and they gave me visual refresh

charred monolithBOT
crude hearth
scenic brook
#

It's an intellij plugin

#

Port of companion

odd heath
odd heath
#

this is broken too

#

cannot read properties of undefined

#

dunno if its just a canary bug tho

fossil inlet
odd heath
#

PEAK

scenic brook
fossil inlet
#

Use some regex library

granite sky
fossil inlet
jolly egret
#

the question is why are no patches broken then

#

i assume something like that would use one

fossil inlet
#

ive been getting those for months

odd heath
#

idk i wouldnt be surprised if they related in some way

#

but im not familiar with how that stuff works

odd heath
fossil inlet
odd heath
odd heath
odd heath
jolly egret
#

yeah something is wrong with notificationvolume Thonk

fossil inlet
#

@odd heath is there an easy way to test without getting a notification

odd heath
#

Open alt and spam dms

#

Also it only happens on desktop for me

scenic brook
#

Can you just use the preview button in notification settings?

fossil inlet
#

works fine on vesktop rn

#

ill try discord desktop

odd heath
fossil inlet
#

the only other time ive seen that error was on vesktop

odd heath
#

Guh

#

I had both vesktop and desktop running, vesktop only had the error for the toolbox because of canary and desktop had audio sink errors on stable, I didn't look at canary

fossil inlet
#

@odd heath can't repro on vesktop or canary

#

(Both on Windows)

odd heath
#

Hm

odd heath
#

Look at my PR in the meantime pretty please :3

fossil inlet
#

?remind 5pm

shut vineBOT
#

Alright @fossil inlet, in 5 hours, 41 minutes and 27 seconds: โ€ฆ

odd heath
#

its 5pm rn

#

oh

#

they pushed the toolbox breakage to stable

#

horror

scenic brook
#

It's a pretty easy fix, I'd pr but I gotta work

odd heath
#

idgi

scenic brook
#

They just added overridePositionRef in the middle of the current popout find

odd heath
#

huh

#

the find just worked for me

#

did discord do a silly revert

#

ah no its just fixed on dev

#

omg im so dumb

scenic brook
#

Oh lol

odd heath
#

on linux

fossil inlet
#

Iirc its fixed on dev

fossil inlet
limber skiff
#

it is, yes

still maple
limber skiff
#

there are two occurences ensureAudio now

_ensureAudio() {
    var e;
    return this._audio = null !== (e = this._audio) && void 0 !== e ? e : new Promise( (e, t) => {
        let i = new Audio;
        i.src = n(451343)("./".concat(this.name, ".mp3")),
        i.onloadeddata = () => {
            i.volume = Vencord.Plugins.plugins["NotificationVolume"].settings.store.notificationVolume / 100 * Math.min(l.Z.getOutputVolume() / 100 * this._volume, 1),
            u.isPlatformEmbedded && i.setSinkId(f),
            e(i)
        }
        ,
        i.onerror = () => t(Error("could not play audio")),
        i.onended = () => this._destroyAudio(),
        i.load()
    }
    ),
    this._audio
async _ensureAudio() {
    if (null == this._ensureAudioPromise) {
        let e = Vencord.Plugins.plugins["NotificationVolume"].settings.store.notificationVolume / 100 * Math.min(l.Z.getOutputVolume() / 100 * this._volume, 1);
        this._ensureAudioPromise = h(this.name).then(t => null == t ? Promise.reject(Error("Failed to load audio: ".concat(this.name))) : (this._audioContext = (0,
        a.N)(),
        this._gain = new GainNode(this._audioContext),
        this._gain.gain.value = e,
        u.isPlatformEmbedded && this._audioContext.setSinkId(f),
        this._buffer = t,
        this._source = this._audioContext.createBufferSource(),
        this._source.buffer = t,
        this._source.connect(this._gain).connect(this._audioContext.destination),
        this._source.loop = !1,
        this._source.onended = () => this._destroyAudio(),
        Promise.resolve({
            context: this._audioContext,
            gainNode: this._gain,
            source: this._source
        }))).catch( () => Promise.reject(Error("Failed to load audio: ".concat(this.name))))
    }
    return await this._ensureAudioPromise
}
#

one is the old which the plugin already patched, and which should still be working

#

how nice of Discord to not mangle those

limber skiff
#

so the question is why patching WebAudioAPISound throwing errors too

#

one is the replacement of another

#

it has to be related to this

#

I was wrong it is this 2024-03_web_audio_api_rollout

shut vineBOT
#

@granite sky, <t:1738649742:R>: check if this is true

limber skiff
#

okay, looked into it, the setSinkId error is not caused by us and is simply malfunctioning discord code

#

NotificationsVolume works fine with both audio APIs

jolly egret
#

huh

#

so the plugin isn't broken.. discord is?

#

or are you on about something else

limber skiff
#

it still works fine even when erroring, from my tests

left sequoia
#

honestly, I'd consider blaming electron, I've seen this issue in electron itself when i was fucking around with barebones electron ages ago

limber skiff
#

sounds play normally

#

I tried the mute button, calls that method, plays normally and with lower sound

#

they are just trying to set the sink to "default"

#

which I'm pretty sure does not work like this and every sink has its proper id

#

anyways, nothing on us and everything is working

#

the ones complaining it doesn't work are probably from the extension

#

I hate to say it but ClientThemes need a rewrite too

left sequoia
#

TLDR IIRC there are some cases where deviceId simply isnt returned because chromium

limber skiff
jolly egret
# limber skiff

yeah i looked at it the other day and what the fuck is going on there lmao