#👾-core-development
1 messages · Page 126 of 1
Time to fork vencord and name it 🅱️encord
too late to think for that
Jk there's no point in forking and maintaining an already working piece of software
The steam deck comes with version 2.36 and even then I get the error message
As previously mentioned you need to build from master to get the lowered requirement.
Are you sure you're building from master?
Not an installer issue.
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] ...
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 ...
Just searched in issues closed, need to update vencord from tray icon. sorry for the trouble. my bad.
Discord Account
edm115
What happens when the bug or crash occurs?
When you login from a new IP address, Discord sends you an email with a link (https://discord.com/authorize-ip#token=...)
But the page simply never shows :
more details on the logs under :)
What is the expected behaviour?
The Vencord Web plugin should not be enabled on those pages
My workaround would ...
it's-a-me ^^
i never get that screen huh
got a.. dev? build? idk words- working- reimplemented the allow empty replace thing and thats functioning we are so winning

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?
can you also add a rule toggle
oh thats handy
(thisss looks terrible because i have no idea what im doing, but, it shows that my idea works)
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*
i covered that too
good good
Added:
- bigger modal
- merge both type of rule into one with regex checkbox
- convert old data to this new one
- 2000 char max length
- realtime update test rule as typing no need to unfocus
- create new rule button
- import and export
- rule toggle checkbox
Removed:
- auto delete empty row
- auto create last row if not empty
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
this looks good
if i know how to
honestly we should also maybe have a better way to enter rules
git question: is there a way to make a pull request thats just a further pull request off of a pre-existing one?
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
I recommend just forking their fork and pring to their branch
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)
switch to textreplace branch
bruhhh
how lmfaoooo
wait genuinely where is this tickbox i KNOW i have seen it before but i cannot find it anywhere LMFAO
accessibility
thanks lol
the Checkbox component in the Menu common module: https://tenor.com/view/25279479
im new here shhh
fair fair
also i have no idea how to use that
2094
uh
is the extension of your plugin's file ts or tsx
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??
ok well i found reason i guess
No, sorry, didn't catch that. I'm using the Appimage ver since the steam deck wipes every app you install via konsole everytime there's a new update.
_ In addition, anything you install outside of flatpak (via pacman for instance) may be wiped with the next SteamOS update._
Sucks to suck. But I hope you guys can release that flatpak release for us soon
took a lot of effort to change literally 2 buttons but i am proud LMFAO
is there any way to copy the seperator with like- built in stuff for vencord?
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
yeah ok- just wanted to check if it was like the tickboxes where i could just use a premade thing
sounds like hell for themes lmao
OS: Debian GNU/Linux 12
Installed pnpm from the official website.
As soon i try to find the depencies to compile, i get the following error log:
Make sure node is installed and within your environment. I recommend to use NVM.

is there a way to put a link in the plugin's description
look up markdown link
that will work in the description field thingy?
oh wait that description
uhh idk if thats markdown
look at usrbg
ik that has a link
probably a stupid question, buts whats the difference between scss and css?
Make sure node is installed and within your environment. I recommend to use NVM.
the problem tho is that there is no package for debian about node, and the official site only provides packages for windows and macOS. So where should i find the node depency for debian?
looked at pronoun db, also uses "settingsAboutComponent"
but while i was there, discovered Forms.FormDivider which is the divider i wanted basically LMAO
settingsAboutComponent is a property for plugins that renders the component you return on the Plugin "about" which is under their authors
how do i add something to this thign when you hover over a message
scammed
is this the wrong channel 
https://nodejs.org/en/download/package-manager#debian-and-ubuntu-based-linux-distributions (also how do you even install pnpm without node)
the node in main deb repo is like v12
message popover api
it'll be rare that someone uses vencord but isn't in the server, but i think this is handy
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
});
well array settings are that well supported
you have to instead options = options.concat(...)
look at how ignore activities does it
docs/settings#quirks here we come
are you using the invite modal?
the wha
unless it already does that
im just using a <Link> but i can swap if there's better practise
does it open in the browser or discord?
you can make it open in a dialog
ill do that in a sec
how would i do that
maybe it was in review db
i know a place it is used
(but that's gone)
oh, that's Vesktop.openInviteModal
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
**index.ts: **Line 24
export async function openInviteModal(code: string) {
maybe put it in utils
hm?
you know
that thing every project has for putting a load of functions which nobody can find a better home for

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
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)
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
oh ni
people playing with the themes tab
you all make me sad
im gonna have to rewrite your code in my pr again :(
no im not touching it i just used it to find a way to open an invite modal
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
nah its fine im playing
its just that every time someone changes that component it causes a merge conflict in my pr :p
oh lmfao
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 
wtf
question but does this replace the default stylesheet discord loads
I thought you were sunnie @turbid hatch
try to be compatible with their implementation?
what's usercss?
uh- i guess the InviteLink component works?
it didn't open browser and it shoved me into general lol
depency 🔥
normal if you're member alr
ye
now im wondering about a channel link...
which... which part of that actually sends me to the channel lmfao
oh good point lol
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.
I realise that this plugin is quite similar to TextReplace, however custom snippets could be more flexible - if expanded upon with the suggested improvements.
in sourse
i can't text to #assets ಠ_ಠ
no perms
so i put it here?
um first i forgor to turn off random names
second
why i "can" Toggle picture in picture on a ZIP
virus

exactly what does usercss do then
configurable
isnt it just quickcss
it gives you a ui
as in
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
oh, so extensions of default css
yes
@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
was wondering if it actually loaded a custom stylesheet to fix discord lag
:(
btw, what about animations
?
arent anims in discord controlled by js ?
you can use css
is it possible to remove that code, then implement it into css
oh, in theory with a plugin but eh
would make controlling anims of certain ui stuff easier tho
why doesn't discord do this 
it's not hardware accelarated, like why discord
that is why, if said "animation" was moved to the css which would be useful for theming
also with the usercss pr
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 ¯_(ツ)_/¯
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?)
pnpm build --standalone
open settings folder -> vencordDist
paste files from Vencord/dist
thanks
@vague gale PRing is a word
HAHAHA
srry
Cool, thanks 👍
NO

check bottom of vesktop settings
and choose your vencord clone dist
oh thats simple
wtf since when
hell yeah
i guess im stupid
ages ago 🗿
this is actually pretty dope
betterfolders still dead?
nope
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
this seems very not robust. what if the error is very different? you should add null safety / error handling and a sensible default message
vencord android is number one enemy of humanity
oh
Vendroid
kek
nop
(i haven’t tried it yet, so unqualified opinion again)
its absolutely horrible
I hated every second of my life while using it

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...
✅ help spread some more horror to the world, humanity deserves it
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
lol
this reminds me of #⭐-starboard message
real question, why is the variable called "ass" 
hehehe
(_,_)
Is the pr just copy pasted from stupiditydb's fork?
i doubt they'd care to work on the installer
it was just a genuine mistake. the changes aren't even from stupiditydb's fork
I see
Newlines between markdown headers and their section content is so disgusting
It is apparently a recommend style for markdown
Well it's dumb
another useless pr, fun
Not like it makes any difference with the rendered content
It is a waste of space, doesn't effect rendered content, and reads worse in editing
got an example link? Cause i’d assume it reads better, particularly on a narrow viewport
I refuse accept that it reads worse
# dumb convention
Example text
# what I prefer
Example text
^
second just feels like it might be single line wrapped
right im bored again- how do y'all reckon the best way to format text replace rules would be
format?
so like- instead of a row with checkbox, text input, text input, text input, checkbox, delete button
ah layout
another arrangement that makes it more user friendly
why two checkboxes?
enabled and isRegex
that part was autumn- i just made it the right type of checkbox lolll
is an enabled-checkbox cluttery? you could just add an X or two to the beginning of the match
i think its nice to have, idk
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
wha
I don't think I made sense
me neither
what’s user unfriendly about this?
Instead of a toggle maybe use checkboxes?
is there a component for those already?
it makes sense, but checkbox is prbly easier for most users
((having the /g toggle optional could be useful occasionally tho)) but prbly not worth the effort
Actually nvm I don't think discord uses checkboxes anywhere, might add inconsistency
rn im just using <Switch>
it has at LEAST 1- in 1 place
but idk if thats been recreated as a component anywhere in vencord- and its probably not worth the effort to do that
I forgot but what's the third input for?
that guy pr'd to my repo first but I told him to pr into original repo
if contains
he forgot to remove prob
Ah
oh right- i did also want to consider if i could change the ifcontains to regex too- if it finds a match or not
it doesnt even look like ai
oh it’s not?
then you could do something like, replace only if the message STARTS WITH
yeah i said that before checking
insane
(i mean also not hard to do in the match field but yeah)
if for regex rules the third field is not treated as regex, i’d consider that a bug
should be v easy fix
id recommend using checkboxes for this
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
although i think people have already said that xd
lolwut
switches imply the action is immediate
again- is there a checkbox component
im not sure if we have one extracted in vencord but checkboxes do exist
eh
nevermind, ignore me
keep using switches
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
it does fit with discord ui i guess
i dont know why discord use checkboxes and switches if they mean the same thing
i don’t like it
switches are usually "immediate action" and checkboxes are usually "form field"
can you just use the whole viewport width instead?
the text fields could wrap and expand downwards when you hit the end
i think this is where we could benefit from enlarging the settings pane just for this plugin

it already got expanded i think
i wanna say autumn changed it from the default to dynamic (tho it seems just like large)
probs 60-70% of the window
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
sounds hard tbh, but possibly you can yoink it from somewhere else
it would make sense to have a component for it
harsh
Something like this, so match and replace cover most of the modal
i mean it was mostly just really minor changes, so its understandable
TIL that still exists
yeah we have tons in the UK
this isn't... terrible
still want to sneak in a rule-test box in the design somewhere
this is the nicest design i've seen for this so far, although i think the "if contains" shouldn't be hidden away
if contains is a vital thing that changes the behaviour of the rule
your first contribution to a repo should never be just changing existing code without adding or fixing anything
huh
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
ig people often just go through all the warnings on their IDE
(somebody has done this for me because they were using a much more superiour IDE 😭)
the pr description sounded quite committed so even if it’s a deny, i personally would have wanted to be nicer about it. But i understand if ven doesn’t have the nerve for that, i have no idea how they manage running all of this anyway 
thats a good call
honestly with the amount of PRs ven has to go through personally it's not unreasonable
Pressing the screenshare button while on a call does nothing.
I'm on Arch Linux + Wayland.
OS: Arch Linux
Vencord: 522fdcd
Vesktop; 0.4.2
especially when a lot of the stuff we have to go through
is like that.
that tells me nothing
i wouldn't say it wasn't nice

just straight to the point
Could change that in the final design, I just hid it because I (personally) consider it (if contains) a secondary field and leaving just match and replace outside made sense
Equalizer APO is responsible for applying the voice effects. We're just taking what it's outputting. If it's not applying the effects properly there's nothing we can do.
^source: i have used equalizer apo
prbly used more by Dr. Who than actual callers at this point
nice mockup 🙂
so even with Options unexpanded, each rule would be 2 lines? :/
hm
that's a good point
and it's a lot of wasted whitespace
we should use a menu icon for that
like ...
That too works
oi fascinating
Maybe move the arrow to the left of match field
or ⚙️ coggers
I have lost count of how many times I've done that
nah i agree with the hiding. If Contains is an obscure feature, almost never needed
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
me when i improve code quality by adding newlines to readme
regex is obvious because the match is usually a regex string
and enabled state can be represented by dim
ig should be expanded by default if non-empty
possibly
i suggest denoting regex by putting / to left and right of match field
yeah basically this @hazy kindle
it's just a spam pr essentially
adds nothing of value and wastes the time of everyone involved
’xD
oh that bad :/
Yeah what I meant by #👾-core-development message
speaking of this, is there a recommended site to learn regex at all
i like regexr
https://regular-expressions.info is good
At Regular-Expressions.info you will find a wide range of in-depth information about a powerful search pattern language called regular expressions.
https://regex101.com/ helps you build it and has a quick reference
^
https://ihateregex.io/ is a cheatsheet for basic stuff
I use this ^ great site and supports many regex engines
fun fact, i spent a lot of time with the maker of it in #regex on freenode irc back in the day
Lindrian(?)
How do you pronounce regex
reh jecks
you kids wouldn’t understand
correct
reh gecks is a sin
wreck X
careful of elon
its pronounced regular expression
actually rini it's pronounced regex
you are pronounced regular expression
regular and irregular expression
ain’t nobody got time for that
when regular expression finds irregular expression
what am i talking about
STOP SAKURA POSTING
no one knows
regulars express themselves in #🌺-regulars
BAD
What is that program/website
↑ me when i’m caught in a bad romance
That looks neat but I will stick to blatent piracy for now
this is the kind of yuri made by a completely male team and it's just fetishizatin
fair nuff
img selfhosts are the scourge of the internet
what’s that?
everything is automated and i just click and it go
a ss tool?
oh
should I watch
lmfao i thought you meant jellyfin ignore me
NO
you are horrible
don’t enable each other
girls going to a school together that shuts down in 3 years
I JUST SAID IT
i just know it from the kiss gifs lmaoo
and they love each other
so they wanna make memories
before the school shuts down
ven>i see cute girl i click
RAH
MY PIRACY HAS GONE WHITE
WHY
IT USED TO BE BLACK
oh well not bothering to fix it
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
oh with my stuff its just the browser you need
then u can request whatever u want

really nice premise
Do you have to pay for a debrid service or live where your isp doesn't get mad to host that kind of thing?
my isp doesnt care
plus everything is done through cloudflare tunnel, so they cant snoop on it anyway
i just torrent things and mpv them
same i use mpv as my jellyfin frontend
banger
i used to do that on my previous install but i got too lazy to setup jellyfin again
where does it source the media content data, your hd?
ye
ive got a little sort-of NAS that i built with 12tb of storage on it
running zfs for the data pool
LOL LIMEWIRE
that’s a respectable number of TBs
yis
nice nick btw:)
is it a feminization step?^^
explen
suletta is a character from one of my favourite shows
sulewitta is me just replacing the l with lewi
Is there a nicely written markdown guide I can follow for jellyfin torrenting at some point?
i'll dm
i love blatant piracy
@long stream
I am aware I encouraged this conversation within this channel but I was too lazy to ask to move
gl recovering from this guilt
I will never
Explode
fun fact, i set up a bd dual boot so i can use https://github.com/QWERTxD/BetterDiscordPlugins/blob/main/GlobalReplies to more nimbly move convos to the right channel but ofc it’s broken 
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
2 days worth of porting 👍
inb4 patched at api level
that's nothing for a bd plugin
they have a lot of boilerplate
please does anyone know why this is a thing and how i can undo it
if you’re good at plugin dev maybe, but i’m largely a newb
clearly you havent seen the 3000+ line plugins
clearly you haven't seen average devilbro code
i think its bugging me most because, not assigning a value to editable, is fine
BUT SPECIFYING TRUE MAKES IT INVISIBLE
i have thankfully been spared
add a class that makes it not do that
?
No way there's 300 lines of boilerplate
no one knows why it does that discord is insane
How do bd plugin devs survive
then why add editable lol
it may mean something different from what you think
we dont know
to toggle editable
ah
ACTUALLY WHY DOES EDITABLE HAVE ANY CONTROL OVER THE APPEARANCE- NON-EDCITABLE ONES DON'T GRAY OUT OR ANYTHING???
whar
shouldnt there be a disabled prop
instead of editable
that would make more sense to me
idk- unless im missing something
yeah use disabled instead of editable
TextInput component is editable by default tho
^
disabled grays it out, editable keeps it looking clickable but just cant add text
and it sounds like you want the former
confusing edible
ok pause
i don't want it to gray out
i just want to make it so you can't edit it.
Works fine without editable prop
problem.
Disabled makes it not editable
well you should gray it out if you can’t edit it no?
I DID MOVE TO DISABLED AND IT STILL TURNS THE ENABLED ONES TRANSPARENT
huh
im lowering the opacity on a parent-
im so confused
that is a really odd rule for sure. Just override it?
worst case you can just style={{ backgroundColor: "var(--input-background)" }}
what’s with the quotes?
?
thats jsx i fucked up the var name
yeah i’m just confused by jsx’s syntax. Since that maps directly to css i assume
i just had another error in my code-
does jsx eval the rhs of that by default?
anything inside {} is just js
but {{}} is surely different?
Nah
its just an object literal inside {}
it's a class list
i hate jsx so much
it's react's way of doing css styles in a more sane way
let's all move to rust
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(...)
npnp
hm ok so
i have a... const [value, setValue] = useState("");
wait maybe im stupid
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
rubber ducking intensifies
plot twist!
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
You don't
Why would you want either property to be mutable for a use state
i can't
setValue is void
??
yes
it errors when inside of value=""
do it outside of the value={} section
how
you cant reassign value
hold on
there's a loop that like- IS this html
no this is react jsx
To be fair getting over how state hooks work in react is one of the worst experiences a developer goes through
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
uh
learning react is one of the worst experiences a developer can go through
so something like onChange={v => setValue(applyRule(rule, v))}
its not editable
wha
hold on i haven't restarted lemme demo
but you're setting the value when assigning to that
okay well where does this
actually come from
its applying each rule in order- so you can catch errors in the middle, i think it'll be useful
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
you've lost me already lmao
okay show me how you've implemented this preview in full
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
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
yea
hm..
Issue had nothing to do with the app, but with my xdg-desktop-portal configurations.
function for component evil
the only real way i can think about doing this is a callback
Additionally, when trying to cut text from an input field it copies the text but doesn't delete it
https://github.com/Vencord/Vesktop/assets/24937357/ea590f68-751a-4b1d-ba34-591e7ca68b9e
I think the cause is the same, that's why I post it here
rini it's how we've done it in vencord this entire time
we dont use class components
arrow function
no
class components insane
the oop brainrot
why in the world would you use arrow funcs
const RulePreview = ({ }) => {
function RulePreview({}) {
function looks so much better
the arrow func syntax sooo ugly
i agree
ur ugly
i like my functions looking like functions at a glance thank you
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
using an effect to run on change is an anti pattern
you should just use onChange
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} />;
}
yeah like that
@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
what would i put as onRuleApply?
setValue(???)
oh wait is it e => setValue(e)?
that doesn't pop up an error so-
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
so... discord will probably freeze up until the state stops changing
don't do value => setValue(value) ?
no i mean
dont do this
const [value, setValue] = useState(someInitialValue);
<RulePreview rule={...} value={value} onRuleApply={v => setValue(v)} />;
uh
this'll cause a state update loop if value always changes every render
what else CAN i do
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...
wait there's a really simple method here
whoops
ignore what i said about separate component before
yeah i know i just realised a much better method
well thats good lol
css can do this. this form is also not for suggestions and you were very clearly told this when opening it
// 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
oh that seems doable
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
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
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
no map 😔
oh
const previews: Element[] = [];
its because it doesnt have any typescript typing
so it doesnt know what they're meant to be
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]);

without the filter, do the filtering in the map
true you can return null
cause otherwise we'll have blanks when the rules are disabled which will look ugly
no its off to the side
oh wait it is working
its quite cool
i think it might've been working before but i was just being stupid
but it is DEFINITELY working now and its epic
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
but also, there shouldn't be any need to memo this

uhhh that should be doable
probs but it saves on recomputation if it rerenders for whatever reason
yes but memoisation itself costs
memoising things that dont need to memoised is bad
hm
actually good point
most of the rerenders will be because those two deps change
and maybe delete button should be on the left too? it feels weird to have it not next to the toggle
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
@austere talon i fixed
(note: the disabled propery of the preview boxes doesn't update until you update the... top box... instead of anything)
(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)
u could just use Button
ig- moreso- is there an up and down arrow svg lol
@vagrant topazyou
did it prompt for the layout
did it work
it has delay
nice

yeah
pog
nah
we made it work on ancient
by static linking stdc++ and using old glibc
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
I can confirm that streaming, including audio, works fine with latest master on the current Deck Stable software :)
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
true
no lmao
not at all
true
add to steamgriddb
and users of the decky plugin can add it easily
yeah so vesktop is amazing for linux users
wayland streaming
audio streaming
good steamdeck support (soon)
floss
good privacy
it is 
it flosses???

good idea
make
does stock discord run on decky?
the code for this is SO FUCKING UGLY
but it looks so pretty omg ✨
vesktop really does it all
plugin-to-plugin communication
this is probably a much saner approach than marios plugin lmao
which loads discord in steam's cef 85
wdym
this says a lot about our society
discord app
tjeu cam
they Can
stock discord app runs but
it hangs if you get a desktop notification
@austere talon vee
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
thanks aagamingmachine
yknow i should probably make the move buttons functional before i give up on this and leave it to the professionals to clean up LMAO
soon
can we get decor review 
the os side is done
should be fixed on latest main. please confirm
notifications get sent as protocol urls to steam
the problem
THEY DIDNT FUCKING IMPLEMENT THE JS SIDE
SO IT DOES NOTHING WITH THE DATA
looks great 🙂
what’s going on on the right (“shorten”)?
oh thats just a rule i already had set up
it's actually just that the WebContextMenu plugin doesn't implement this






