#👾-core-development

1 messages · Page 126 of 1

charred monolithBOT
crude hearth
#

REMOVE

#

REMOVE THAT STAR

charred monolithBOT
livid heath
#

Time to fork vencord and name it 🅱️encord

crude hearth
livid heath
#

Jk there's no point in forking and maintaining an already working piece of software

charred monolithBOT
charred monolithBOT
#

Discord Account

theonewhobuilds1

What happens when the bug or crash occurs?

Cannot react to reactions, because they disappeared, but can show reactions by usin the "Reactions" button.

What is the expected behaviour?

I expect to see reactions and to react to them

How do you recreate this bug or crash?

Can't really reproduce it...

Errors

No response

Request Agreement

  • [X] I am using Discord Stable or tried on Stable and this bug happens there as well
  • [X] ...
charred monolithBOT
#

image

After updating to vesktop 0.4.2 the windows goes blank with whitespace never to recovr , not after closing and quitting the ap and re launching and not even after system reboot, on windows. Tries to manually unionstall and download latest exe from releases page then reinstalling that setup exe but still same issue.

Tray icon works fine and minimise maximise controls work . just no content ...

steep burrow
lime stone
#

i never get that screen huh

crude raptor
#

got a.. dev? build? idk words- working- reimplemented the allow empty replace thing and thats functioning we are so winning

charred monolithBOT
cunning canyon
crude raptor
#

you son of a gun thats what i was trying to do

#

do you think it'd be possible to change the test rules thing from 2 boxes at the bottom, to a box either side of the rules, and a demo of each rule applied in order alongside?

lime stone
cunning canyon
crude raptor
#

oh thats handy

crude raptor
#

the biggest worry i have for meowrging string rules and regex rules is that you'll need to meowrge the old rules lol

#

oh yeah i broke my only ifs LOL

#

merge*

cunning canyon
#

i covered that too

crude raptor
#

good good

charred monolithBOT
#

When I right click selected text, nothing happens on the first right click

On the second right click, the text gets unselected and the context menu opens as if no text was selected

Stable 241602 (86f279e)
Vencord 522fdcd (Vesktop V0.4.2)
Electron 27.0.2
Chromium 118.0.5993.89

I'm on Arch Linux running KDE Plasma Wayland. The issue occured both on XWayland and running Discord in Electron's native Wayland.
Selecting text and copying via Ctrl+C works

crude raptor
austere talon
#

those are the ugliest checkboxes I've ever seen

#

try using discord's checkbox

cunning canyon
#

if i know how to

austere talon
crude raptor
#

git question: is there a way to make a pull request thats just a further pull request off of a pre-existing one?

austere talon
#

cause the super slim text boxes are not it

#

maybe instead of using inputs, use textareas and make them full width on focus

#

if you get me

austere talon
crude raptor
#

makes sense

#

oh also since you mentioned it and autumn doesnt seem to know how either- how would one use the discord checkboxes?

#

bruh i forked autumn's thing and its ust the normal main istg

#

i love git (lies)

cunning canyon
#

switch to textreplace branch

crude raptor
#

bruhhh

lime stone
#

🤨

#

i don't trust ryan's prs

crude raptor
lime stone
crude raptor
#

oh wait that one also exists lol

#

wait no im confused

crude raptor
# lime stone

wait genuinely where is this tickbox i KNOW i have seen it before but i cannot find it anywhere LMFAO

cunning canyon
#

accessibility

crude raptor
#

thanks lol

verbal pumice
crude raptor
#

im new here shhh

verbal pumice
#

fair fair

crude raptor
#

also i have no idea how to use that

verbal pumice
#

2094

verbal pumice
#

is the extension of your plugin's file ts or tsx

crude raptor
#

its textreplace, tsx

#

NVM IM SO SMART

verbal pumice
#

but does it actually work

crude raptor
#

yes!

#

mannn what da hell

#

the Switch thing- is a div (just plain div) with a div, with an svg and an input

#

but there's no like- centering?? on the outside div??

#

like why is there even 2 layers of divs??

crude raptor
uncut carbon
#

how can i run the plugin after pnpm test?

#

nvm got it, just ran pnpm build

charred monolithBOT
crude raptor
#

took a lot of effort to change literally 2 buttons but i am proud LMFAO

crude raptor
#

is there any way to copy the seperator with like- built in stuff for vencord?

charred monolithBOT
limber skiff
#

just make your own

#

that separator is default discord stuff for the settings menus

#

a separator can literally be a div with margin and a border bottom or top

crude raptor
#

yeah ok- just wanted to check if it was like the tickboxes where i could just use a premade thing

limber skiff
#

discord has bunch of separators made for different things

#

here we have one too

crude raptor
#

sounds like hell for themes lmao

charred monolithBOT
nimble plaza
crude raptor
#

is there a way to put a link in the plugin's description

nimble plaza
#

look up markdown link

crude raptor
#

that will work in the description field thingy?

nimble plaza
#

oh wait that description

#

uhh idk if thats markdown

#

look at usrbg

#

ik that has a link

crude raptor
#

alrighty

#

uhhhhh

#

its also under authors- not in the desc

#

hm

woeful sable
#

probably a stupid question, buts whats the difference between scss and css?

charred monolithBOT
crude raptor
# crude raptor hm

looked at pronoun db, also uses "settingsAboutComponent"
but while i was there, discovered Forms.FormDivider which is the divider i wanted basically LMAO

limber skiff
ripe quest
#

how do i add something to this thign when you hover over a message

ripe quest
#

wait

woeful sable
#

scammed

ripe quest
#

is this the wrong channel nooo

verbal pumice
#

balls

#

im slow

nimble plaza
#

dwdw

#

also node is in the default debian repos i thought

verbal pumice
#

the node in main deb repo is like v12

limber skiff
crude raptor
#

it'll be rare that someone uses vencord but isn't in the server, but i think this is handy

charred monolithBOT
uncut carbon
#

how can i save the settings since when i reload, the settings changed dissappear? i update settings by doing the following: ```js
settings.def.snippets.options.push({
label: name,
value: content
});

limber skiff
#

well array settings are that well supported

#

you have to instead options = options.concat(...)

turbid hatch
#

cannot wait for the documentation

#

so we can point people to our

#

website

limber skiff
#

look at how ignore activities does it

turbid hatch
#

docs/settings#quirks here we come

lime stone
crude raptor
#

the wha

lime stone
#

unless it already does that

crude raptor
#

im just using a <Link> but i can swap if there's better practise

lime stone
#

does it open in the browser or discord?

crude raptor
#

uhh

#

rowser

lime stone
#

you can make it open in a dialog

crude raptor
#

ill do that in a sec

lime stone
#

like this

crude raptor
#

how would i do that

limber skiff
#

try searching for InviteModal in vencord

#

ik we use that somewhere

lime stone
#

i can't spell

limber skiff
#

maybe it was in review db

lime stone
#

i know a place it is used

limber skiff
#

(but that's gone)

lime stone
#

oh, that's Vesktop.openInviteModal

crude raptor
#

actually now im thinking about it- wonder how the text chat link works lol

#

wow it also sues desktop i am glad you prompted me to check these things LMAO

grave mangoBOT
lime stone
#

i wonder if there's an equivilent

#

actually that would be used instead obviously

crude raptor
#

(in ThemesTab.tsx)

lime stone
#

maybe put it in utils

crude raptor
#

hm?

lime stone
#

you know

#

that thing every project has for putting a load of functions which nobody can find a better home for

crude raptor
#

ok tbf i know of that- im moreso like... i have no goddamn clue how to do that lmfao

#

not only is this my first time working on vencord- its also my first time working with react, afaik

lime stone
#

lol same for me tbh

#

(when i contributed to vencord i had no idea how react has... and i still only have a minimal idea)

crude raptor
#

hm- i feel like i'd probably want it to be like the <Switch> component

#

so itd probably go in components instead of utils lol

turbid hatch
#

oh ni

#

people playing with the themes tab

#

you all make me sad

#

im gonna have to rewrite your code in my pr again :(

crude raptor
#

no im not touching it i just used it to find a way to open an invite modal

turbid hatch
#

oh oki

#

thank god

crude raptor
#

well- i guess if im taking that out into a component it might be worth putting that in there but- you seem to be agaionst that

turbid hatch
#

nah its fine im playing

#

its just that every time someone changes that component it causes a merge conflict in my pr :p

crude raptor
#

oh lmfao

turbid hatch
#

honestly idk why we're still waiting for betterdiscord to implement usercss

#

they're going to take even longer now

#

or is it waiting review

#

i don't remember aaaaaaaaaa

turbid hatch
limber skiff
#

wtf

oak hull
limber skiff
#

I thought you were sunnie @turbid hatch

lime stone
limber skiff
#

what's usercss?

crude raptor
#

uh- i guess the InviteLink component works?
it didn't open browser and it shoved me into general lol

lime stone
#

depency 🔥

crude raptor
#

ye

#

now im wondering about a channel link...

#

which... which part of that actually sends me to the channel lmfao

limber skiff
#

transitionToChannel

#

look at KeepCurrentChannel plugin

crude raptor
#

oh good point lol

charred monolithBOT
#

The purpose of this plugin is to stop people from repeating themselves. It's quite similar to a feature that Dyno has with their autoresponder but works on your client instead.

There are improvements that could be made that are outside of my reach but doable. The improvements are noted within the comments at the top.

young lintel
#

who's wan't Discord icons?

#

i have png's and ico's

#

?

charred monolithBOT
young lintel
#

in sourse

oak hull
young lintel
#

no perms

young lintel
#

second

#

why i "can" Toggle picture in picture on a ZIP

oak hull
#

virus

oak hull
turbid hatch
#

a full theme rebuild thing might come soon though

#

maybe

#

i don't know

oak hull
#

exactly what does usercss do then

turbid hatch
#

configurable

oak hull
#

isnt it just quickcss

turbid hatch
#

it gives you a ui

oak hull
#

oh

#

so quickcss but ui update

#

is that all

turbid hatch
#

more like themes but ui

#

but yes that's all it does really

oak hull
#

hm

#

to toggle certain parts of themes?

turbid hatch
#

to configure anything

#

colors, numbers, strings

oak hull
#

as in

turbid hatch
#

but yes you can also make toggleswitches

#

you can use if statements in your themes to check for true/false values

#

well i suppose it does more than UI

#

you can write themes in less or stylus

#

and itll hotreload them

oak hull
#

oh, so extensions of default css

turbid hatch
#

yes

crude raptor
#

@cunning canyon made a pull request to your fork
i don't feel like these assortment of changes should be pushed fully yet- the UI could still use further tweaks, but i wanted to PR it now instead of holding onto it lol

oak hull
#

was wondering if it actually loaded a custom stylesheet to fix discord lag

#

:(

#

btw, what about animations

turbid hatch
#

?

oak hull
#

arent anims in discord controlled by js ?

turbid hatch
#

you can use css

oak hull
#

is it possible to remove that code, then implement it into css

turbid hatch
#

oh, in theory with a plugin but eh

oak hull
#

would make controlling anims of certain ui stuff easier tho

lime stone
oak hull
#

reduced motion is nice, actually more smoother

lime stone
#

it's not hardware accelarated, like why discord

oak hull
#

that is why, if said "animation" was moved to the css which would be useful for theming

#

also with the usercss pr

sacred plover
#

I'm good at coming up with ideas if you want something to build
I'd be glad to help honestly
although it sucks that I suck at JS and the like lol ¯_(ツ)_/¯

crude raptor
#

vesktop actually lets me screenshare audio this is so epic

#

(is there a simple way to get the plugin changes i just did for normal vencord into vesktop btw?)

mortal fractal
crude raptor
#

thanks

lime stone
#

@vague gale PRing is a word

fallow fern
#

is vencord in downtime?

#

mine just stopped working

lime stone
#

🗿

#

vns

nimble pendantBOT
crude raptor
#

HAHAHA

fallow fern
#

srry

vague gale
austere talon
#

and choose your vencord clone dist

crude raptor
#

oh thats simple

mortal fractal
crude raptor
#

hell yeah

mortal fractal
#

i guess im stupid

lime stone
crude raptor
#

this is actually pretty dope

dire thicket
#

betterfolders still dead?

verbal pumice
#

nope

feral spruce
#

you smort

hazy kindle
#

cool, ty for your efforts!
React is doing quite the number on us 😭

honestly what i’ve seen of React so far, i don’t like it. Since i don’t properly understand it, my opinion is pretty unqualified but ye. i feel like there should be a better, more intuitive way, where you don’t have to like learn a whole new sub language and whatnot

charred monolithBOT
hazy kindle
#

they set 2.2k stars what
spam acc mayhaps

charred monolithBOT
crude hearth
hazy kindle
#

oh

Vendroid
kek

hazy kindle
#

(i haven’t tried it yet, so unqualified opinion again)

charred monolithBOT
crude hearth
#

I hated every second of my life while using it

hazy kindle
#

ToT

#

i hope you were able to recover from this experience

charred monolithBOT
hazy kindle
charred monolithBOT
#

Made some changes that just generally improves the quality of the code. This might not really increase or decrease performance of the installer or anything, but just makes the code more nicer to look at.

Changes include but are not limited to:

  • Added constants
  • Made a part in "github_downloader.go" less complex
  • Better formatting/linting

There were parts of the code I wanted to change, but since my go knowledge is very minimal, I didn't try them. Hope this is pleasing

(Gonna do...

hazy kindle
#

nah i think it’s really cool it exists; generally that vc is available on so many platforms. Even if it is too janky as a daily driver for a given user, could still be useful for switching to when you need a certain tool from it

verbal pumice
#

wait

verbal pumice
#

NICE FUCKING TRY

hazy kindle
#

ROFL

#

hostile takeover averted

vague gale
#

oops

#

forgor to change that...

livid heath
#

Hacktober fest pr vibes

#

Most changes are just newlines, indentation

crude raptor
#

lol

hazy kindle
livid heath
#

real question, why is the variable called "ass" nyaboom

crude raptor
#

hehehe

hazy kindle
#

(_,_)

livid heath
verbal pumice
#

i doubt they'd care to work on the installer

vague gale
livid heath
#

I see

dapper crest
#

Newlines between markdown headers and their section content is so disgusting

livid heath
#

It is apparently a recommend style for markdown

dapper crest
#

Well it's dumb

tawny cipher
#

another useless pr, fun

livid heath
#

Not like it makes any difference with the rendered content

dapper crest
hazy kindle
#

got an example link? Cause i’d assume it reads better, particularly on a narrow viewport

livid heath
#

I refuse accept that it reads worse

dapper crest
hazy kindle
#

i prefer first

#

even on wide viewport

livid heath
#

^

hazy kindle
#

second just feels like it might be single line wrapped

crude raptor
#

right im bored again- how do y'all reckon the best way to format text replace rules would be

hazy kindle
#

format?

crude raptor
#

so like- instead of a row with checkbox, text input, text input, text input, checkbox, delete button

hazy kindle
#

ah layout

crude raptor
#

another arrangement that makes it more user friendly

hazy kindle
#

why two checkboxes?

crude raptor
#

enabled and isRegex

#

that part was autumn- i just made it the right type of checkbox lolll

hazy kindle
#

is an enabled-checkbox cluttery? you could just add an X or two to the beginning of the match

crude raptor
#

i think its nice to have, idk

livid heath
#

Add support to enabled isRegex when replacement rule starts with / and ends with /[optional flags here]
So you paste /meow/g and it becomes meow with isRegex enabled

crude raptor
#

wha

livid heath
#

I don't think I made sense

crude raptor
#

me neither

hazy kindle
crude raptor
#

the textboxes are really thin- even with the now expanded modal

livid heath
#

Instead of a toggle maybe use checkboxes?

crude raptor
#

is there a component for those already?

hazy kindle
livid heath
#

Actually nvm I don't think discord uses checkboxes anywhere, might add inconsistency

crude raptor
#

rn im just using <Switch>

crude raptor
#

but idk if thats been recreated as a component anywhere in vencord- and its probably not worth the effort to do that

livid heath
#

I forgot but what's the third input for?

crude hearth
crude raptor
#

if contains

crude hearth
#

he forgot to remove prob

livid heath
#

Ah

crude raptor
#

oh right- i did also want to consider if i could change the ifcontains to regex too- if it finds a match or not

crude hearth
crude raptor
#

then you could do something like, replace only if the message STARTS WITH

verbal pumice
crude hearth
#

insane

hazy kindle
#

if for regex rules the third field is not treated as regex, i’d consider that a bug

#

should be v easy fix

turbid hatch
livid heath
#

Hmm maybe something like

[match input] [replacement] [delete button]
> [drop-down or something]
  [if contains] [is regex] [enabled]

If you can visualise that, id make a figma mock up but I'm on mobile rn

turbid hatch
#

although i think people have already said that xd

hazy kindle
turbid hatch
#

switches imply the action is immediate

crude raptor
#

again- is there a checkbox component

turbid hatch
#

im not sure if we have one extracted in vencord but checkboxes do exist

#

eh

#

nevermind, ignore me

#

keep using switches

crude raptor
#

thats my worry- if i swapped to checkboxes i feel like itd be worth making them a component and i don't trust my skill there lol

turbid hatch
#

it does fit with discord ui i guess

#

i dont know why discord use checkboxes and switches if they mean the same thing

turbid hatch
#

switches are usually "immediate action" and checkboxes are usually "form field"

hazy kindle
#

can you just use the whole viewport width instead?

#

the text fields could wrap and expand downwards when you hit the end

turbid hatch
#

i think this is where we could benefit from enlarging the settings pane just for this plugin

crude raptor
#

it already got expanded i think

turbid hatch
#

needs more

#

its too cramped

crude raptor
#

i wanna say autumn changed it from the default to dynamic (tho it seems just like large)

turbid hatch
#

probs 60-70% of the window

crude raptor
#

OH i also have NO idea how i'd do this but i do want to add like- move handles to the rules

#

cause they apply top to bottom, so it'd be nice to rerrange

hazy kindle
#

sounds hard tbh, but possibly you can yoink it from somewhere else

#

it would make sense to have a component for it

hazy kindle
turbid hatch
#

i'm at a payphone

#

trying to call home

livid heath
turbid hatch
hazy kindle
turbid hatch
crude raptor
turbid hatch
#

though a lot of them are being converted to uhhhh

#

defibrilator points

#

so

crude raptor
#

still want to sneak in a rule-test box in the design somewhere

turbid hatch
#

if contains is a vital thing that changes the behaviour of the rule

austere talon
# hazy kindle harsh

your first contribution to a repo should never be just changing existing code without adding or fixing anything

hazy kindle
#

huh

turbid hatch
#

also if we're hiding away the enabled switch (which i think is a good idea, leaves more room) then we should dim disabled rules

#

to make it clear

lime stone
#

(somebody has done this for me because they were using a much more superiour IDE 😭)

hazy kindle
turbid hatch
#

honestly with the amount of PRs ven has to go through personally it's not unreasonable

charred monolithBOT
turbid hatch
#

especially when a lot of the stuff we have to go through

#

is like that.

#

that tells me nothing

turbid hatch
lime stone
#

just straight to the point

livid heath
charred monolithBOT
turbid hatch
#

^source: i have used equalizer apo

hazy kindle
hazy kindle
turbid hatch
#

hm

#

that's a good point

#

and it's a lot of wasted whitespace

#

we should use a menu icon for that

#

like ...

livid heath
#

That too works

hazy kindle
livid heath
hazy kindle
crude raptor
#

uhh

#

OH IM STUPID I FORGOT TO TURN ON PNPM WATCH

livid heath
hazy kindle
turbid hatch
#

because it's a major behaviour modifier, it might be a bit strange if your rule doesnt work and its because of an if contains preventing it

charred monolithBOT
turbid hatch
#

regex is obvious because the match is usually a regex string

#

and enabled state can be represented by dim

hazy kindle
turbid hatch
#

possibly

hazy kindle
austere talon
#

it's just a spam pr essentially

#

adds nothing of value and wastes the time of everyone involved

hazy kindle
hazy kindle
#

no, i meant uneditable ones

#

outside the field

turbid hatch
#

oh like ::before ::after

#

hmm

#

not a bad shout

hazy kindle
#

ah yup

#

uwu ty

oak hull
crude raptor
#

i like regexr

hazy kindle
turbid hatch
hazy kindle
#

^

turbid hatch
livid heath
hazy kindle
#

fun fact, i spent a lot of time with the maker of it in #regex on freenode irc back in the day

#

Lindrian(?)

turbid hatch
#

the WHAT

#

THE REGEX FREENODE

dapper crest
#

How do you pronounce regex

turbid hatch
#

reh jecks

hazy kindle
oak hull
#

correct

turbid hatch
#

reh gecks is a sin

hazy kindle
turbid hatch
olive aurora
#

its pronounced regular expression

turbid hatch
#

actually rini it's pronounced regex

hazy kindle
#

you are pronounced regular expression

turbid hatch
#

regular and irregular expression

hazy kindle
turbid hatch
#

when regular expression finds irregular expression

#

what am i talking about

olive aurora
#

STOP SAKURA POSTING

turbid hatch
#

work is making my brain rot holy shit

#

RINI

#

IT'S IN MY FUCKING USERNAME

hazy kindle
hazy kindle
olive aurora
#

BAD

livid heath
#

No Access

#

:(

turbid hatch
#

OOOOOOOOOOOOOoOOoOoOoOoOOOOoOoOoOooH

#

CAUGHT IN A BAD ROMANCE

turbid hatch
#

want?

hazy kindle
dapper crest
olive aurora
#

this is the kind of yuri made by a completely male team and it's just fetishizatin

hazy kindle
turbid hatch
#

i did it cause i wanted Piracy Pro

#

it made me feel slightly less bad

hazy kindle
#

what’s that?

turbid hatch
#

everything is automated and i just click and it go

hazy kindle
#

a ss tool?

turbid hatch
#

oh

turbid hatch
#

lmfao i thought you meant jellyfin ignore me

olive aurora
#

NO

turbid hatch
#

wanna watch together?

olive aurora
#

you are horrible

hazy kindle
#

don’t enable each other

austere talon
#

sure

#

what is it even about

turbid hatch
#

girls going to a school together that shuts down in 3 years

olive aurora
#

I JUST SAID IT

austere talon
#

i just know it from the kiss gifs lmaoo

turbid hatch
#

and they love each other

#

so they wanna make memories

#

before the school shuts down

hazy kindle
#

ven>i see cute girl i click

austere talon
#

lmaoo

#

yes, problem?

turbid hatch
#

RAH

#

MY PIRACY HAS GONE WHITE

#

WHY

#

IT USED TO BE BLACK

#

oh well not bothering to fix it

dapper crest
#

I used stremio hooked up to a debrid service for that for a while. But I have regressed to using websites that have everything set up for me. It's easier, faster, and only needs and adblocker and a browser

turbid hatch
#

oh with my stuff its just the browser you need

#

then u can request whatever u want

hazy kindle
dapper crest
turbid hatch
#

my isp doesnt care

#

plus everything is done through cloudflare tunnel, so they cant snoop on it anyway

olive aurora
#

i just torrent things and mpv them

turbid hatch
#

same i use mpv as my jellyfin frontend

olive aurora
#

banger

#

i used to do that on my previous install but i got too lazy to setup jellyfin again

hazy kindle
turbid hatch
#

ye

#

ive got a little sort-of NAS that i built with 12tb of storage on it

#

running zfs for the data pool

jagged cloak
#

LOL LIMEWIRE

hazy kindle
#

that’s a respectable number of TBs

turbid hatch
#

yis

hazy kindle
#

is it a feminization step?^^

turbid hatch
#

nop

#

just funny pun

hazy kindle
#

explen

turbid hatch
#

suletta is a character from one of my favourite shows

#

sulewitta is me just replacing the l with lewi

dapper crest
#

Is there a nicely written markdown guide I can follow for jellyfin torrenting at some point?

olive aurora
#

it doesn't

#

fym

hexed ledge
#

i love blatant piracy

hazy kindle
#

sinner

#

i bet you modify your discord client too

austere talon
#

average vencord dev conversation

snow hollow
olive aurora
#

bitches watching sakura trick

#

weirdos

dapper crest
hazy kindle
#

gl recovering from this guilt

dapper crest
#

I will never

long stream
hazy kindle
crude raptor
#

why
in the sweet mother of christ
does making a TextInput editable (specifying YES its editable, instead of leaving it as default, or making it non editable)

MAKE IT INVISIBLE

hazy kindle
#

my guy it is 500 lines Cosmo_sob

#

for some reason lol

livid heath
verbal pumice
#

inb4 patched at api level

verbal pumice
#

they have a lot of boilerplate

crude raptor
hazy kindle
verbal pumice
#

clearly you havent seen the 3000+ line plugins

oak hull
#

clearly you haven't seen average devilbro code

crude raptor
hazy kindle
verbal pumice
crude raptor
#

?

livid heath
verbal pumice
#

no one knows why it does that discord is insane

livid heath
#

How do bd plugin devs survive

hazy kindle
verbal pumice
crude raptor
#

to toggle editable

hazy kindle
#

ah

crude raptor
#

ACTUALLY WHY DOES EDITABLE HAVE ANY CONTROL OVER THE APPEARANCE- NON-EDCITABLE ONES DON'T GRAY OUT OR ANYTHING???

jagged cloak
#

whar

verbal pumice
#

shouldnt there be a disabled prop

#

instead of editable

#

that would make more sense to me

crude raptor
#

idk- unless im missing something

verbal pumice
#

yeah use disabled instead of editable

livid heath
#

TextInput component is editable by default tho

livid heath
verbal pumice
#

disabled grays it out, editable keeps it looking clickable but just cant add text

#

and it sounds like you want the former

hazy kindle
#

confusing edible

crude raptor
#

ok pause

#

i don't want it to gray out

#

i just want to make it so you can't edit it.

livid heath
#

Works fine without editable prop

crude raptor
#

problem.

livid heath
#

Disabled makes it not editable

hazy kindle
#

well you should gray it out if you can’t edit it no?

crude raptor
#

I DID MOVE TO DISABLED AND IT STILL TURNS THE ENABLED ONES TRANSPARENT

livid heath
#

huh

crude raptor
#

im so confused

hazy kindle
verbal pumice
#

worst case you can just style={{ backgroundColor: "var(--input-background)" }}

hazy kindle
#

what’s with the quotes?

crude raptor
#

actually wait- i might have

#

hold on

verbal pumice
hazy kindle
#

css doesn’t normally have quotes around color props

#

some React quirk ig

verbal pumice
#

thats jsx i fucked up the var name

crude raptor
#

ok good news

#

i was wrong- disabled does work

hazy kindle
#

yeah i’m just confused by jsx’s syntax. Since that maps directly to css i assume

crude raptor
#

i just had another error in my code-

olive aurora
#

it uses element.style

#

which has camelCase

hazy kindle
#

interesting

#

(not what i was talking about tho – the quotes)

livid heath
#

Yeah since kebab case is invalid syntax in js

#

<ehm computed props

hazy kindle
#

does jsx eval the rhs of that by default?

livid heath
#

No

#

var(whatever here) is a css expression

olive aurora
#

anything inside {} is just js

hazy kindle
#

but {{}} is surely different?

livid heath
#

Nah

olive aurora
#

its just an object literal inside {}

livid heath
#

^

#

{ // start js expression
{ // start js object literal
Hence 2 {{ and }}

turbid hatch
olive aurora
#

i hate jsx so much

turbid hatch
#

it's react's way of doing css styles in a more sane way

livid heath
#

let's all move to rust

turbid hatch
#

usually you'd use it with classes though

#

hence the name

#

because you could do something like

#

{{ active: <some condition> }}

#

and it'd conditionally apply the class

#

but ah well

#

but yeah it converts it to actual css stuff when rendering, so that'll transform into background-color: var(...)

hazy kindle
#

interesting, got (all of) it, tyall! 🙂

#

incl. that it makes sense that rhs is quoted

turbid hatch
#

npnp

crude raptor
#

hm ok so

#

i have a... const [value, setValue] = useState("");

#

wait maybe im stupid

turbid hatch
#

i love revelations like this

#

hmm i have this thing
here's what im doing
wait i'm silly nvm

#

have no context on the actual problem but it has been resolved

#

:P

hazy kindle
crude raptor
#

ok i wasn't just stupid

#

i have that state thing

hazy kindle
#

plot twist!

crude raptor
#

i want to update the value, inside a TextInput's value field

#

i know something similar is possible- but the way ive used already gets me a (non-breaking) error

#

idk how to redo this [var, var] thing with one being let and another being const

dapper crest
#

You don't

long stream
#

why can't you just use const

#

the value updates regardless

dapper crest
#

Why would you want either property to be mutable for a use state

crude raptor
#

ok so

turbid hatch
#

nonononono

#

you dont reassign the value

#

you use setValue to set it

crude raptor
#

i can't

turbid hatch
#

you have to

#

you have no choice

crude raptor
#

setValue is void

turbid hatch
#

yes

crude raptor
#

it errors when inside of value=""

turbid hatch
#

do it outside of the value={} section

crude raptor
#

how

turbid hatch
#

you cant reassign value

long stream
#

why are you

#

calling setvalue while setting the initial value

turbid hatch
#

hold on

crude raptor
#

there's a loop that like- IS this html

turbid hatch
#

no this is react jsx

dapper crest
#

To be fair getting over how state hooks work in react is one of the worst experiences a developer goes through

turbid hatch
#

so

#

value={value} is correct, that's how you want to do it

#

what you actually want to do is use the onChange event here

crude raptor
#

uh

long stream
turbid hatch
#

so something like onChange={v => setValue(applyRule(rule, v))}

crude raptor
#

its not editable

turbid hatch
#

wha

crude raptor
#

hold on i haven't restarted lemme demo

turbid hatch
#

but you're setting the value when assigning to that

#

okay well where does this

#

actually come from

crude raptor
#

its applying each rule in order- so you can catch errors in the middle, i think it'll be useful

turbid hatch
#

right

#

okay i understand now

turbid hatch
# crude raptor

this rule preview needs to be a separate component with whatever rule you want to apply as a prop

#

then you want to use a useMemo hook to calculate what the result should be, depending on the rule and the input value

crude raptor
#

you've lost me already lmao

turbid hatch
#

okay show me how you've implemented this preview in full

crude raptor
#

there's const [value. setValue] = useState("")

then there's a TextInput with the onChange calling setValue

then there's the other TextInput with the value = applyRule() from earlier

turbid hatch
#

okay

#

the way i would implement this, because this requires some semi-complex state

#

is write a new tiny component to encapsulate what you need

#

because the way you're doing it at the minute is a bit.. Not React-y

#

it's not really built to do what you are trying

#

so

#

i'm going to do this without typings because i dont know what they're meant to be at this state

#
function RulePreview({ rule, text }) {
    const result = useMemo(() => applyRule(rule, text), [rule, text]);

    return <TextInput editable={false} value={result} />;
}

this'll rerender when either the rule updates or the text before it updates, but i have a feeling there's another issue

turbid hatch
#

you need the result of when you apply the rule

#

to pass down

crude raptor
#

yea

turbid hatch
#

hm..

charred monolithBOT
olive aurora
turbid hatch
#

the only real way i can think about doing this is a callback

charred monolithBOT
turbid hatch
#

we dont use class components

olive aurora
#

arrow function

turbid hatch
#

no

olive aurora
#

class components insane

long stream
#

the oop brainrot

verbal pumice
#

arrow function components????

#

who prefers that

#

in contexts like this

austere talon
olive aurora
#

pretty

#

function so uglyy

austere talon
#
const RulePreview = ({ }) => {
function RulePreview({}) {
#

function looks so much better

#

the arrow func syntax sooo ugly

crude raptor
#

i agree

olive aurora
#

ur ugly

austere talon
#

lisp fans should not be allowed to have an opinion

verbal pumice
#

i like my functions looking like functions at a glance thank you

turbid hatch
#
function RulePreview({ rule, text, onRuleApply }) {
    const result = useMemo(() => applyRule(rule, text), [rule, text]);

    // don't want to fire the callback in the memoization, so we use an effect
    // here *after* it's been calculated
    useEffect(() => onRuleApply(result), [result]);

    return <TextInput editable={false} value={result} />;
}

i think is the best way of doing it? ven can probably help me out here if there's a significantly better way

#

mm that useEffect feels redundant

austere talon
#

using an effect to run on change is an anti pattern

turbid hatch
#

yeah

#

im just realising that's probably not needed anyway

austere talon
#

you should just use onChange

turbid hatch
#

oh i could couldnt i

#
function RulePreview({ rule, text, onRuleApply }) {
    const result = useMemo(() => applyRule(rule, text), [rule, text]);
    return <TextInput editable={false} value={result} onChange={onRuleApply} />;
}
austere talon
#

yeah like that

turbid hatch
#

@crude raptor give that a go, use that component to do your rule previews

#

you can use the onRuleApply callback to get the resultant value back out

#

it's a bit of an odd way of doing it but i can see why you want to do it this way

crude raptor
#

what would i put as onRuleApply?

#

setValue(???)

#

oh wait is it e => setValue(e)?

#

that doesn't pop up an error so-

turbid hatch
#

ALTHOUGH

#

be VERY CAREFUL

#

if you're using value and you're passing it back into the same rule preview component, it'll cause a loop

crude raptor
#

so...?

#

oh do you mean like

turbid hatch
#

so... discord will probably freeze up until the state stops changing

crude raptor
#

don't do value => setValue(value) ?

turbid hatch
#

no i mean

#

dont do this

#
const [value, setValue] = useState(someInitialValue);

<RulePreview rule={...} value={value} onRuleApply={v => setValue(v)} />;
crude raptor
#

uh

turbid hatch
#

this'll cause a state update loop if value always changes every render

crude raptor
#

what else CAN i do

charred monolithBOT
#

Content

Hi there,

I'm not entirely familiar with using Github, so I hope this message reaches the right people. I have a suggestion for the vencord app developers: could you consider adding a feature that allows users to hide certain buttons?

Here's a simple idea of how it could work:

Navigate to the 'Plugins' section.
Enter "Hide Buttons" or a similarly fitting name for this new plugin.
Once selected, this plugin would give users the option to choose which buttons they'd like...

turbid hatch
#

wait there's a really simple method here

#

whoops

#

ignore what i said about separate component before

turbid hatch
#

yeah i know i just realised a much better method

crude raptor
#

well thats good lol

charred monolithBOT
turbid hatch
#
// okay, so
const input = ...;

// let's say you have all of your active rules here:
const activeRules = [...];

// we want to run through all of them, apply, and then store a preview
const previews = useMemo(() => {
    const previews = [];

    let inputText = input;

    for (const rule of activeRules) {
        inputText = applyRule(rule, inputText);
        previews.push(<TextInput editable={false} value={inputText} />); // jumpscare!
    }

    return previews;
}, [input, activeRules]);

// so now we have all of our previews in an array
// when we render all of our rules, you need to get the index of the rule you've got
// and then render the preview after it

// so, pretending we have all of our rules here
let currentActiveRule = 0;

return (
    <>
        {rules.map(rule => (
          <>
            // whatever other components you render here blah blah blah
            {rule.active && previews[currentActiveRule++]};
          </>
        );
    </>
);
#

i believe something like that

#

would work okay

crude raptor
#

oh that seems doable

turbid hatch
#

that's probably the best way of doing it

#

obviously this isnt a great implementation since i'm making assumptions but i hope that gets the point on what u should try and do

crude raptor
#

i might...

#

i think there's already an iteration variable for the rules

turbid hatch
#

yeah but you need a separate one here

#

because we're only iterating over the active rules when we're generating the preview components

#

no point doing it for inactive rules xd

#

although..

#

for implementation convenience, it might be best to do it for all of them so that you arent having blank spaces on non-active rules

#

it just wont change the text

crude raptor
#

im so lost lmfao

#

i don't think its working- granted its not copied word for word

turbid hatch
#
const previews = useMemo(() => {
    const previews = [];

    let inputText = input;

    for (const rule of rules) {
        if (rule.active) inputText = applyRule(rule, inputText);
        previews.push(<TextInput editable={false} value={inputText} />);
    }

    return previews;
}, [input, rules]);

you should probs just do this

#

for the preview components

#

where you render all of them regardless of them being active or not

austere talon
#

no map 😔

crude raptor
turbid hatch
#

oh

#

const previews: Element[] = [];

#

its because it doesnt have any typescript typing

#

so it doesnt know what they're meant to be

austere talon
#
const previews = useMemo(() => {
    let inputText = input;

    return rules.map(rule => {
        if (rule.active) inputText = applyRule(rule, inputText);
        return <TextInput editable={false} value={inputText} />;
    });
}, [input, rules]);
turbid hatch
#

without the filter, do the filtering in the map

austere talon
#

true you can return null

turbid hatch
#

cause otherwise we'll have blanks when the rules are disabled which will look ugly

austere talon
#

oh

#

is preview not below?

turbid hatch
#

no its off to the side

austere talon
#

there i edited it

turbid hatch
#

so you can see it like a waterfall

crude raptor
#

oh wait it is working

turbid hatch
#

its quite cool

crude raptor
#

i think it might've been working before but i was just being stupid

#

but it is DEFINITELY working now and its epic

turbid hatch
#

it might've compiled with the type errors in which case the logic part wouldve worked fine

#

the compiler was just crying that it wasnt typed probably

austere talon
crude raptor
austere talon
#

i would gray out the preview too

#

or make it blank

crude raptor
#

uhhh that should be doable

turbid hatch
austere talon
#

yes but memoisation itself costs

#

memoising things that dont need to memoised is bad

turbid hatch
#

hm

#

actually good point

#

most of the rerenders will be because those two deps change

austere talon
#

and maybe delete button should be on the left too? it feels weird to have it not next to the toggle

crude raptor
#

hi i made them grayed out
uhhh idk where im gonna put the delete buttons

#

honest the entire left side is probably going to get rejigged

placid wave
#

@austere talon i fixed

crude raptor
#

(note: the disabled propery of the preview boxes doesn't update until you update the... top box... instead of anything)

crude raptor
# crude raptor

(instead of a drag thing, i think up/down buttons would be easier, but i also have no idea if anything like that exists in discord rn lol)

dire trench
#

u could just use Button

crude raptor
#

ig- moreso- is there an up and down arrow svg lol

dire trench
#

ive never seen one

#

but you could just use anything

#

doesnt have to be from discord

placid wave
#

@vagrant topazyou

#

did it prompt for the layout

#

did it work

#

it has delay

#

nice

austere talon
#

venmic on steamos??

placid wave
#

yeah

austere talon
#

pog

placid wave
#

prob only on preview

#

since its based on a much newer arch

austere talon
#

nah

placid wave
#

wtf

#

lmao

austere talon
#

we made it work on ancient

placid wave
#

oh fun

#

run it on my samsung tv linux 3 when

austere talon
#

by static linking stdc++ and using old glibc

placid wave
#

i was only aware of the first

#

cool

#

lmao tho you love

#

valves thing doesnt update the ui after loading the data the first time

charred monolithBOT
placid wave
#

so i just call the protocol url again

#

combined with the steam url handler having immense delay because valve are deranged

#

yeah

#

once youve loaded it on your account once it has the data cached

#

so it doesnt do that

#

but yeah lmao least terrible valve react code

#

you should see the appid one

#

to call the steam:// protocol to request a layout update for the vesktop shortcut you have in steam

#

it requires either the shortcut name or its appid

austere talon
#

we really need to make a dedicated vesktop page soon

#

with feat comparison

placid wave
#

true

charred monolithBOT
austere talon
#

does stock discord even support wayland screenshare

placid wave
#

no lmao

#

not at all

#

true

#

add to steamgriddb

#

and users of the decky plugin can add it easily

austere talon
#

yeah so vesktop is amazing for linux users

#

wayland streaming
audio streaming
good steamdeck support (soon)
floss
good privacy

placid wave
#

it is blobcatcozy

placid wave
#

good idea

austere talon
#

make

placid wave
#

do

#

it would need a bencord plugin too tho

austere talon
#

does stock discord run on decky?

crude raptor
#

the code for this is SO FUCKING UGLY
but it looks so pretty omg ✨

hazy kindle
junior olive
placid wave
#

this is probably a much saner approach than marios plugin lmao

#

which loads discord in steam's cef 85

placid wave
hazy kindle
austere talon
#

discord app

placid wave
#

tjeu cam

#

they Can

#

stock discord app runs but

#

it hangs if you get a desktop notification

junior olive
#

@austere talon vee

placid wave
#

because discords shitcode electron fork waits forever for notifyd to connect but it cant connect to notifyd because it tries to use a nonexistent proxy

charred monolithBOT
austere talon
#

thanks aagamingmachine

crude raptor
placid wave
#

god

#

i hate emoji picker

#

so much

austere talon
#

soon

placid wave
#

see

#

steamos has a notifyd

#

which will work

junior olive
#

can we get decor review blobhuskcozy

placid wave
#

the os side is done

charred monolithBOT
placid wave
#

notifications get sent as protocol urls to steam

#

the problem

#

THEY DIDNT FUCKING IMPLEMENT THE JS SIDE

#

SO IT DOES NOTHING WITH THE DATA

hazy kindle
crude raptor
#

oh thats just a rule i already had set up

charred monolithBOT
crude raptor
#

the top 6 are actually just reminders to myself, they're gonna be off lol, but its a good way to show off the rule tests

#

whats the easiest way to move an element up or down in a list in tsx