#๐Ÿ‘พ-core-development

1 messages ยท Page 28 of 1

austere talon
#

DataStore is non blocking and has the great benefit that it's not json

#

so you can store arbitrary data and objects there even if they aren't json serialisable

quaint sapphire
charred monolithBOT
quaint sapphire
#

do you think that this is ok?

#

i didnt want to first get and then set if it did not exist, so i used the update method

#

oldValue is undefined according to the doc

#

*if missing

#

uhh, kinda useless tbh

#

since typescript will force me to type guard it every time

#

so it is redundant

crude hearth
#

oh my god you are really working on it

#

I am gonna cry ๐Ÿ˜ญ

quaint sapphire
#

I actually find this plugin useful since I have many foreign friends around the globe

#

so yeah

#

datastore is indeed nice

#

oof, it will say timezone removed no matter what in that snippet

crude hearth
#

and stick to modals trolley

quaint sapphire
#

some people prefer commands

#

but i will add modals either way

crude hearth
quaint sapphire
#

its not like you are forced to use them

crude hearth
#

like in my latest commit i added this (thanks to arjix)

#

actually you can disable this

#

so you have a point

#

hmm also this looks ugly if people have statuses written

#

it looks like part of the status

quaint sapphire
#

this was entirely written by github copilot

quaint sapphire
#

ok fully migrated to the data store

#

@crude hearth can i have push access to your fork?

crude hearth
quaint sapphire
#

repo settings

#

collaborators

#

Add people

crude hearth
#

ok ur github profile

#

send

quaint sapphire
#

ArjixWasTaken

crude hearth
#

SENT

#

wait were you arjix

#

๐Ÿ’€

quaint sapphire
#

got it

#

yeah

#

lmao

#

i am not toxic anymore lol

#

Pog

#

working on batch fetch

#

@fiery jungle why is it a POST? shouldn't it be a GET?

#

no data is modified after all

#

is it so that the ids are sent in the body instead of the query params?

#

weird design choice imo

charred monolithBOT
fiery jungle
#

doesnt matter though

quaint sapphire
#

@fiery jungle im getting 404s, please help

#

(it re-tries every 3 seconds)

#

no response is given

#

just 404

fiery jungle
#

weird

#

ill check later

quaint sapphire
fiery jungle
#

oh no it isnt

#

lol

quaint sapphire
#

im lost

fiery jungle
#

also ?client_mod isnt real for the api

#

only for linking to the website

fiery jungle
#

ill check later

quaint sapphire
#

maybe its bc you dont handle preflight requests or smth? im confused af

fiery jungle
#

we should be

quaint sapphire
austere talon
#

FIX CORS @fiery jungle

cunning bobcat
#

UNFIX CORS

quaint sapphire
#

so useless

charred monolithBOT
quaint sapphire
#

@fiery jungle why not found?

#

i did login

#

is the bulk just broken?

#

oooh

#

the content type header is at fault

quaint sapphire
#

Really weird

frail skyBOT
#
Bad Patches

VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/

RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function

Bad Starts

None

Discord Errors

#
Bad Patches

VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/

RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function

Bad Starts

None

Discord Errors

crude hearth
#

or aagamer vps will get ddosed

quaint sapphire
#

Lmao, I did make it retry only after 15 seconds

#

So not that bad

#

But still wtf is going on?

#

Anyways, tomo I'll make the modals

#

Actually, does it really have to be a modal?
We could just add a drop-down in-place when you click edit

charred monolithBOT
quaint sapphire
#

If it is done well it will feel like a native discord feature

charred monolithBOT
crude hearth
#

if we make it good enough discord developers will steal code from us

charred monolithBOT
charred monolithBOT
quaint sapphire
#

@crude hearth

#

when you click the edit icon, it lets you pick a timezone, clicking the edit button again saves the timezone, and delete does what you expect it to

crude hearth
#

holy

#

that looks cool

quaint sapphire
#

(it deletes the timezone from the db)

#

also when you click the time, it tells the timezone

#

with a toast

#

@crude hearth you can now check this off

crude hearth
#

okay

#

don

quaint sapphire
#

๐Ÿ‘

#

@crude hearth can you move all the inline styles I have to conditional classes?

crude hearth
#

not now

charred monolithBOT
quaint sapphire
#

@crude hearth if you could make it to not be a draft PR, that would be nice

crude hearth
#

don

charred monolithBOT
quaint sapphire
#

@crude hearth two out of the three conversations can be marked as resolved

charred monolithBOT
turbid hatch
#

@spark cove time to write vencordbot so we can do /assign user

spark cove
#

REAL

#

PLEASE

crude hearth
#

I resolved all of them

turbid hatch
#

ill actually do it

quaint sapphire
spark cove
#

people will use to annoy ven

#

tbh

quaint sapphire
#

since we link the link

turbid hatch
#

well if i was to do it, itd be so that it could auto-assign reviewers for plugins that they own (based on the actual contributor field in the file?) or so that anyone who's an admin can authorize the auto checks or whatever

spark cove
#

@turbid hatch how does this work

turbid hatch
#

in backup / restore

#

there should be some dev buttons

#

click authorize to set it up

#

forgor is to deauthorize yourself

#

sync to cloud will upload your current settings

#

sync from will pull them down

spark cove
#

i will backup my settings one sec

turbid hatch
#

the other button doesnt work atm cuz i broke it

spark cove
#

version?

#

yea 404 real

turbid hatch
#

it should 404 initially cause you dont have anything up there

#

the request works, the logging bit doesnt

#

404s are definitely intentional though when you dont initially have any settings data

spark cove
#

ohh

quaint sapphire
#

@crude hearth manti you idiot

crude hearth
#

WHAT

quaint sapphire
#

hooks dont work if you return before them

#

all returns must be made after all the hooks

#

if a hook is not called consistently it wont work

crude hearth
spark cove
#

@turbid hatch whats the E2E encryption for

turbid hatch
#

the whosawhatsit

#

its compression

crude hearth
#

if user is null you dont do anything

spark cove
#

oh

turbid hatch
#

using fflate

spark cove
#

ok yea

#

nvm

#

silly

turbid hatch
#

xd

charred monolithBOT
spark cove
#

lol

#

i realized u also put Number

#

zzzzzz

quaint sapphire
#

im done with this PR lol

#

did enough stuff

spark cove
#

@turbid hatch is there a reason ur doing new URL(u)

#

is that for validation

turbid hatch
#

i copied it from another plugin

#

:P

spark cove
#

oh lol silly

turbid hatch
#

but yes i presume the intent is to validate it

spark cove
#

im moving fetch logic into a class so just making sure

turbid hatch
#

ah oki

#

oh are you actually improving it lol

spark cove
#

i hope

turbid hatch
#

mwah

spark cove
#

:3

#

what plugin did u copy this from

#

lmao

#

a vencord plugin?

turbid hatch
#

yee

#

lemme get it

spark cove
#

which one because a lot of what im doing could probably apply to it as well xd

turbid hatch
#

whats the component name

#

for the oauth2 dialog

spark cove
#

OAuth2AuthorizeModal

turbid hatch
grave mangoBOT
# turbid hatch https://github.com/Vendicated/Vencord/blob/bad96b78879f296d5b9e7adacb03756b0f584...

**Utils.tsx: **Lines 42-72

openModal((props: any) =>
    <OAuth2AuthorizeModal
        {...props}
        scopes={["identify"]}
        responseType="code"
        redirectUri="https://manti.vendicated.dev/URauth"
        permissions={0n}
        clientId="915703782174752809"
        cancelCompletesFlow={false}
        callback={async (u: string) => {
            try {
                const url = new URL(u);
                url.searchParams.append("returnType", "json");
                url.searchParams.append("clientMod", "vencord");
                const res = await fetch(url, {
                    headers: new Headers({ Accept: "application/json" })
                });
                const { token, status } = await res.json();
                if (status === 0) {
                    Settings.plugins.ReviewDB.token = token;
                    showToast("Successfully logged in!");
                    callback?.();
                } else if (res.status === 1) {
                    showToast("An Error occurred while logging in.");
                }
            } catch (e) {
                new Logger("ReviewDB").error("Failed to authorise", e);
            }
        }}
    />
);
spark cove
#

oh its reviewdb

#

im not touching that

turbid hatch
#

aha

#

but yeah tahts what i was using

spark cove
#

epic

turbid hatch
#

ooooh

#

its to add search params

#

you can drop the new URL() then

spark cove
#

ah okay

#

makes sense

turbid hatch
#

i dont particularly care about them

spark cove
#

i figured it could have been a security thing

turbid hatch
#

nah

#

i forgot why i did it

spark cove
#

xdxd

crude hearth
#

@quaint sapphire this is not aligneeeeed

#

I was thinking

#

whats wrong

quaint sapphire
#

you can align it urself!

crude hearth
charred monolithBOT
fiery jungle
#

@quaint sapphire can you remove me from the screenshot on github

quaint sapphire
#

Sure

fiery jungle
#

thank

charred monolithBOT
fiery jungle
#

i dont want my discord that public
no need

#

theres a reason i dont put my discord anywhere

#

also my tz trolley
commits only have gmt-7

spark cove
#

vencord plugin that is enabled by default that opens profile modal for Devs.rushii

fiery jungle
#

oh real

#

i fogor about that

#

i should remove

crude hearth
#

Rusher dont be shy

fiery jungle
#

nop

charred monolithBOT
rigid venture
#

@austere talon here but idk how to check for blocked setting and blocked users without making it more complicated than it is

austere talon
#

you're doing wrong

rigid venture
#

yeah

austere talon
#
const myId = UserStore.getCurrentUser().id;

const typingUsersArray = Object.keys(typingUsers).filter(id => id !== myId && !RelationshipStore.isBlocked(id))```
#

this is what u want

austere talon
rigid venture
#

sure but i need to check for setting too

austere talon
#

just do that then silly

rigid venture
#

HOW

cunning bobcat
#

๐Ÿ’€

rigid venture
#

&& if

#

that's more complicated no?

cunning bobcat
#

&& !store.whatever.includes(id) im pretty sure

rigid venture
#

shhhh

cunning bobcat
#

depends how you did it

austere talon
#
const myId = UserStore.getCurrentUser().id;

const typingUsersArray = Object.keys(typingUsers).filter(id => id !== myId && !(RelationshipStore.isBlocked(id) && settings.store.hideBlocked))```
cunning bobcat
#

oh that

rigid venture
#

true

austere talon
#

silly fawna

rigid venture
#

be nice

cunning bobcat
#

fawn will never be not silly

rigid venture
#

also i added the brackets when i was trying to add the blocked too then left it

#

it's okay

#

why can i not request two reviewrs at the same time

quaint sapphire
#

hey @austere talon, ever thought of leaving a new review on the timedones PR?

charred monolithBOT
crude hearth
#

@austere talon REVIEW

rigid venture
quaint sapphire
#

huh

#

the theme looks like a jetbrains ide

#

maybe its just the font

charred monolithBOT
frail skyBOT
#
Bad Patches

VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/

RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function

Bad Starts

None

Discord Errors

#
Bad Patches

VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/

RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function

Bad Starts

None

Discord Errors

charred monolithBOT
austere talon
#

whats up with people closing and opening new prs

crude hearth
#

review when

turbid hatch
#

@supple turtle hoi! why close and open pr

supple turtle
#

i fucked up

#

gh deleted all commits with one click

turbid hatch
#

@austere talon tada

#

although how did you manage that lmao

supple turtle
#

idk, but this warning is a little late

austere talon
#

?

#

dont use main branch anyway

supple turtle
#

next time i won't

charred monolithBOT
charred monolithBOT
rigid venture
#

@austere talon merge literallyt right now

charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
crude hearth
#

@quaint sapphire i fixed ur design

quick ibex
#

@shut dome depressing status :(

shut dome
#

Death is not friendly. It's dark, black where you look at it. You're all alone. But it's no different when you're alive, right? No matter how many relationships we seem to have, we're all alone. - Misaki Mei

solemn spoke
#

i have only one thing to say: fuck life's purpose. it doesn't have one, so just don't care and enjoy as much as you can

quaint sapphire
#

Death is wholesome, w/o death you wouldn't enjoy life. /s (ofc it is not wholesome, but it aint dark)

quaint sapphire
quaint sapphire
#

how is that dark?

charred monolithBOT
quaint sapphire
#
  1. worrying about smth you cant change is a waste of time and energy, so you should instead focus on living your best life
  2. if you were immortal, there would be no incentive for you to enjoy life
crude hearth
#

what you said is like supporting drugs

solemn spoke
#

uh

#

didn't meant that

crude hearth
#

but yeah I agree with you

#

dont think about something very very long

crude hearth
#

@austere talon REVIEW

charred monolithBOT
#

changes of note:

  • this now creates a new settings entry (settingsSync) to control whether it's turned on or off, instead of relying on the presence of the secret purely
  • cloud settings now has a separate tab to hold its settings, and in the event that we extend the backend more, we can shove all of this under a generic "cloud" tab, or.. "Vencloud" if you will :^)
  • uses a lot less IDB entries (in fact, just two - one to store the secret and one to store when settings were last written ...
frail skyBOT
#
Bad Patches

VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/

RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function

Bad Starts

None

Discord Errors

#
Bad Patches

VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/

RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function

Bad Starts

None

Discord Errors

charred monolithBOT
charred monolithBOT
limber skiff
#

gotta love better discord plugins

solemn spoke
#

agreed

charred monolithBOT
charred monolithBOT
charred monolithBOT
crude hearth
#

@austere talon review

#

I will make you see nightmares if you dont

charred monolithBOT
charred monolithBOT
verbal pumice
#

now that vencord has it's own switch component instead of using the discord one can't boolean setting options be made to use switches now

umbral hedge
#

ye

austere talon
#

wha

#

they could already use switches before

#

megu just decided to implement it this way because idk why

umbral hedge
charred monolithBOT
umbral hedge
#

cant remember exactly but it was probably because of all the extra styling they added on top that couldn't be removed
probably the same reason I didn't want to use them originally on the plugin list

charred monolithBOT
limber skiff
#

@vagrant topaz we are talking about different modules lol

#

the one I point has like the same thing

#

are you sure yours is the correct one?

#

it doesn't have an iconType

#

the old code patched the one with it

#

I haven't tested

#

either way my the current match and replace would work

#

let me test

#

okay yeah yours is the one that works

#

@vagrant topaz you just have to change the find to the one you put

#

I just tried this and it worked

#

||a||||a||||a||||a||||a||||a||||a||||a||

#

||a||||a||||a||||a||||a||||a||||a||||a||

#

@vagrant topaz Implement this fix on revealAllSpoilers too

    patches: [
        {
            find: ".removeObscurity=function",
            replacement: {
                match: /\.removeObscurity=function\((.\i)\){/,
                replace: ".removeObscurity=function($1){$self.reveal($1);"
            }
        }
    ],
#

yeah

#

just so both plugins get fixed

limber skiff
#

ehhh

#

another pr just for that?

#

kinda meh

#

oh guh I made a typo there

#

remove this dot

#

ye

#

you can rename the pr too

#

insane

#

yes

#

that's our custom syntax

#

it gets transformed into something else

#

huh

#

this

#

[A-Za-z_$][\\w$]*

#

it's for matching discord variable names

spark cove
#

are u using eslint

#

wow webstorm so bad

woeful sable
#

i love

spark cove
#

its just weird that its opinionated by default

#

im sure u can turn off it's linter as a whole

umbral hedge
#

you will add 10mb of timezones

charred monolithBOT
austere talon
#

by using a standardised tool rather than reimplementing the wheel using their own proprietary tool?

quaint sapphire
#

I do sound overly dramatic, but rushii being so confident that I stole the timezones from a package made me act up

#

cause in fact, I put in effort to gather that list

#

@austere talon in your opinion, is fetching the list of timezones, on every single restart, the way to go?

austere talon
#

why would you need a list of timezones

quaint sapphire
#

...

austere talon
#

?

quaint sapphire
#

how do you even think this works?

austere talon
#

let the user type the timezone lol

quaint sapphire
#

and another reason for the list, is to verify that the timezone is correct

austere talon
#

why would anyone want a drop down with hundreds of options

crude hearth
crude hearth
turbid hatch
#

a dropdown is worse

austere talon
#

using a drop down with hundreds of options is bad ux

#

lol

turbid hatch
#

if you want good ux

#

go add autocomplete

crude hearth
#

its ordered by name

#

how is it bad

quaint sapphire
crude hearth
#

if you country starts with E just go straight down

turbid hatch
verbal pumice
quaint sapphire
crude hearth
quaint sapphire
#

nobody

austere talon
#

don't use GMT+2

umbral hedge
#

add the fancy timezone selector map trolley

austere talon
crude hearth
#

I wouldnt wanna look at wikipedia just to set timezone

quaint sapphire
#

i too would like a search bar, but that is discord's fault

umbral hedge
quaint sapphire
#

ffs

#

fuck you ven

turbid hatch
#

christ

#

keep the list then for god sake

verbal pumice
#

zamn

turbid hatch
#

just dont present it RAW

#

in a dropdown

#

thats the main issue

quaint sapphire
#

the argument is "why would you need a list"

turbid hatch
#

then it went from that to a discussion of UX

#

once you demonstrated what the list was for

#

yes, i agree having the list is good for validation

#

but the way its being presented as a list of choices to the user is hell

quaint sapphire
#

ven asking why we need a list when he most likely hasnt even seen the plugin is what made me mad

crude hearth
turbid hatch
#

no, i dont want to memorise my timezone string either, but neither do i want to scroll through 200 odd options just to find mine

#

or another person's

quaint sapphire
#

an input box to filter out the list is great

#

but not already implemented by discord

turbid hatch
#

nor do i understand what every single timezone string corrolates to

umbral hedge
#

discord has a list of countries built in
use that and then make a api call to get the timezone when ur configuring it? idk

quaint sapphire
#

i have no need for a list of countries

#

unless you want it to be a two step process

verbal pumice
#

input box with auto complete is better than list imo

quaint sapphire
#

selecting the country and then the city

austere talon
verbal pumice
crude hearth
umbral hedge
#

you mean.. a select box?

#

im confused

quaint sapphire
#

we use a select box

#

so he does not mean that

#

actually, why is the discord select so bad?

umbral hedge
#

discord has select boxes you can type into
what do you mean then

quaint sapphire
#

the default browser select has search built-in

umbral hedge
#

im pretty sure we use it somewhere

quaint sapphire
#

is it a param to the component or smth?

umbral hedge
#

idk its been aaages

verbal pumice
#

settings has search, that?

umbral hedge
#

i can take a look

#

settings search isn't a select

verbal pumice
#

yeah im stupid

turbid hatch
#

one moment

quaint sapphire
turbid hatch
#

thats really bad

#

also there's an official way of doing it

#

its called a datalist

austere talon
#

I'm still not a fan of including it like that in discord

quaint sapphire
austere talon
turbid hatch
#

also it doesnt work on discord selects

quaint sapphire
umbral hedge
#

yeah that map was what i was referring to earlier

#

i see users failing at doing that

#

xd

quaint sapphire
turbid hatch
#

@umbral hedge cant seem to find what you're looking for in @webpack/common

crude hearth
#

they will manage to miswrite

turbid hatch
#

custom component?

umbral hedge
#

I definitely used it once

quaint sapphire
#

I could make my own select if you prefer that

turbid hatch
#

there's CheckedTextInput

#

but thats not quite what we want

austere talon
turbid hatch
#

^ which CTI is a valid use case for

crude hearth
#

for each person you wanna set timezone

#

redirecting to website

#

I dont support that

#

bad ux

turbid hatch
#

then make it not a requirement

umbral hedge
#

ah there's a searchable option for <Select>

turbid hatch
#

to do so

crude hearth
#

if it is possible dropdown with autocomplete would be best

#

ig

umbral hedge
#

but only on the old Select component? not the ui refresh one???

#

discord are u ok

quaint sapphire
#

actually, why doesn't js expose the built-in timezones?

#

fr

turbid hatch
#

also

#

you can

#

Intl.supportedValuesOf('timeZone');

umbral hedge
#

aha there's a component called SearchableSelect

turbid hatch
#

lol

#

it returns every timezone supported by Intl

#

so now including the list is a non-issue because you dont need it

quaint sapphire
turbid hatch
#

what is that running on

quaint sapphire
#

default discord

turbid hatch
#

stable?

quaint sapphire
#

yes

#

default discord

turbid hatch
#

fucking pieces of shit

#

can they just

#

upgrade to electron 17

#

cause it works great there

crude hearth
#

lets just force people to upgrade their electron

#

๐Ÿ‘๐Ÿฟ

umbral hedge
#

search for --icons-width

#

seems like its the SearchableSelect component

#

spent ages just looking for unique code to find it by painWatame

quaint sapphire
#

ok what if we conditionally load the list if Intl does not have the list (due to electron being old)?

turbid hatch
#

no point

#

list is still included in bundle

#

might as well just use the list

quaint sapphire
turbid hatch
#

unless you

#

right okay that makes more sense

quaint sapphire
#

like many dependencies

umbral hedge
#

suing discord to get them to upgrade electron

turbid hatch
#

i guess that works

austere talon
#

another reason I dislike hardcoding a list

quaint sapphire
umbral hedge
#

I wonder when discord is actually gonna update stable electron ver

quaint sapphire
#

that list is most likely a lot more cities

turbid hatch
#

it does seem to have cities

quaint sapphire
#

when their HQ explodes

turbid hatch
#

e.g. America/Dawson and America/Dawson_Creek

#

identical offsets but unique timezones

umbral hedge
#

yeah but like

turbid hatch
#

dawson is yukon time and dawson creek is mountain standard time

umbral hedge
#

if Europe/London is valid then America/Dawson_Creek should be too

turbid hatch
#

yip

#

worst case scenario

#

you just ask what their UTC offset is lol

quaint sapphire
umbral hedge
#

we will simply ask for location perms and get it via gps trolley

#

yeah

turbid hatch
#

lmao

umbral hedge
#

the map method is way better

quaint sapphire
#

what if you are in the same timezone as Europe/London, but you dont live in the UK?

umbral hedge
#

there are multiple

#

Europe/Lisbon

#

etc

turbid hatch
#

there's multiple timezones listed under GMT/UTC

quaint sapphire
#

why not just Etc/GMT?

turbid hatch
#

because DST exists

quaint sapphire
#

like, i never get that

umbral hedge
#

timezones hell

austere talon
turbid hatch
#

if you hardcode it to GMT

quaint sapphire
turbid hatch
#

what happens when Europe/London becomes GMT+1

#

due to BST

quaint sapphire
turbid hatch
#

okay, but this happens literally every year

#

lol

quaint sapphire
#

guess we will die

turbid hatch
#

it also happens in multiple timezones around the world at different times due to various reasons

#

what about the +8:30 offset or whatever it is

umbral hedge
#

tbh we could really oversimplify the timezone picker and do what ven said and send people there

visit this link to get your timezone name

show map
select location
copy this value into vencord

#

ez

turbid hatch
#

also, if you havent already

#

please watch this

#

kthx

woeful sable
#

real

#

watch that

austere talon
#

if someone doesn't know their timezone name they also won't find it in a dropdown

turbid hatch
#

personally i'd type

#

idk

#

UK

#

or London

austere talon
#
  • who doesn't know their timezone
turbid hatch
#

or GMT

quaint sapphire
austere talon
#

99% of people just need to type their continent and capital city

umbral hedge
#

pull in the map JS remotely like we do with shiki and have it appear in the settings form

turbid hatch
#

well thats your own downfall i guess, cuz the entire video is about how painful dealing with timezones is and how to do the UX for them

turbid hatch
#

yes, im trying to give you a resource on the issues with dealing with timezones and the UI/UX that have already been attempted and failed

quaint sapphire
umbral hedge
turbid hatch
#

good for me

umbral hedge
#

if it only downloads the code when you open that plugin's settings then I don't see an issue with size, and its decent UX

quaint sapphire
umbral hedge
#

o

#

didnt see

#

mb

#

(i dont ssee it)

turbid hatch
#

yeah that was a bit vague

quaint sapphire
#

indeed

umbral hedge
#

ah yeah that was not quite the same

turbid hatch
#

i originally thought it meant you include it in the bundle, not load it remotely

quaint sapphire
#

"conditionally load" is the key point

umbral hedge
#

yeah same

turbid hatch
#

yeah but you can conditionally load stuff from the bundle as well

#

it wasnt clear

#

anyway

quaint sapphire
turbid hatch
#

regardless

umbral hedge
#

but ya my vote is with pulling the map bundle when you open the timezonedb settings

quaint sapphire
#

would be stupid

turbid hatch
#

(there are valid reasons e.g. patching for behaviour differences but that's for another time)

quaint sapphire
umbral hedge
quaint sapphire
#

jquery

umbral hedge
#

EW

#

ok something similar that isnt jquery

quaint sapphire
#

we could use an image with zones

#

neat feature

#

but no highlighting

umbral hedge
#

I remember doing image zones on youtube banners back in the old days

#

arguably we could just load the SVG

#

or

#

the one ven sent, they dont use jquery much (why the hell do they even import that shit)

#

we'd barely have to change anything honestly

quaint sapphire
umbral hedge
#

I miss old web dev

#

frameworks were a mistake

turbid hatch
#

anyway so this searchableselect thing

umbral hedge
#

ye

turbid hatch
#

is it just select with an extra prop

umbral hedge
#

nah thats the old one

umbral hedge
quaint sapphire
#

oh well, better UX ig

umbral hedge
#

its props seem to be basically the same as normal select

umbral hedge
#

its not really a biggie i think

turbid hatch
#

yeah it looks about the same

#

in fact it might be the same

#

id have to compare each prop but from a quick glance yeah

umbral hedge
#
  • we can remove that when discord finally gets their act together and updates electron
#

ah actually no bc they have coords in that json

turbid hatch
#

so adding it as a component it should just be

umbral hedge
#

nvm

turbid hatch
#

like

umbral hedge
umbral hedge
turbid hatch
#

export const SearchableSelect = waitForComponent<t.Select>("SearchableSelect", filters.byCode("--icons-width"));

#

more or less

fiery jungle
#

why is this still a debate
default to electrons timezone in a full drop down list
I literally did it for the tzdb website

umbral hedge
#

ig
you probably want more filters than that but yeah

turbid hatch
#

yeah i'll probably just copy the select filters and stick icons-width on the end

umbral hedge
quaint sapphire
#

not a map tho

umbral hedge
#

because people are too stupid to search for "Europe/London"

fiery jungle
#

that's so dumb

umbral hedge
#

have you seen discord mod users

quaint sapphire
turbid hatch
#

because electron 13 doesnt have the right method

#

lol

fiery jungle
#

bruh

turbid hatch
#

electron 17 does though

quaint sapphire
#

discord does not use 17 tho

turbid hatch
#

canary does

fiery jungle
#

just do it anyways
canary is on newer isn't it

turbid hatch
#

canary is on 22 now actually

fiery jungle
#

it's gonna happen eventually

#

default to nothing if the method from electron 17 doesn't work

turbid hatch
#

its always had a newer electron build

#

idk when theyre gonna backport it

fiery jungle
#

shipping a data set of timezones by geolocation is so bad

quaint sapphire
fiery jungle
#

oh great idea
surely someone has made a website to find your tz based on geolocation on a map
just link to that instead of shipping it

quaint sapphire
#

has both select and map

crude hearth
quaint sapphire
quaint sapphire
#

it wont be shipped

#

but imported at runtime

fiery jungle
#

wheres the data loaded from

quaint sapphire
#

who cares?

#

its a map

austere talon
#

you can also just display the current timezone to the user so they can give it to their friends or smth

umbral hedge
#

yeah we found an autocomplete component

austere talon
#

Intl.DateTimeFormat().resolvedOptions().timeZone

should work for getting current timezone

quaint sapphire
#

instead of giving current timezone, you could just set the timezone on TimezoneDB

fiery jungle
#

you cant set for other users

quaint sapphire
#

why would the other user give you the timezone instead of setting it?

fiery jungle
#

youre thinking that everyone uses specifically a client mod and tzdb

#

bruh

quaint sapphire
fiery jungle
#

just gzip it or something and decode when you need
its gonna go down to a single kb

fiery jungle
quaint sapphire
fiery jungle
#

no

quaint sapphire
#

Works on my machine life

turbid hatch
#

cant seem to use it as one though

#

:<

fiery jungle
#

youre the only one in that situation
barely anyone i know actually uses remote tzdb

quaint sapphire
#

what about client mods?

fiery jungle
#

that too

turbid hatch
#

i tried "popoutPosition", "autoFocus", "maxVisibleItems", "--icons-width" and just the last one and it couldnt find the component

#

which is annoying

quaint sapphire
fiery jungle
#

just keep the local settings

#

jesus

quaint sapphire
turbid hatch
turbid hatch
#

well it can definitely find it

austere talon
austere talon
turbid hatch
#

i mean the filter works :<

austere talon
#

don't include a list of timezones in code

#

makes no sense

turbid hatch
#

its just not finding the component

#

so i need to use a different filter

crude hearth
#

@austere talon make it good

#

fix the pr

fiery jungle
#

where do you get it then from bleh

quaint sapphire
#

give me a break

fiery jungle
#

does electron have a list

austere talon
turbid hatch
#
// export const Select = waitForComponent<t.Select>("Select", filters.byCode("optionClassName", "popoutPosition", "autoFocus", "maxVisibleItems"));
export const Select = waitForComponent<t.Select>("Select", filters.byCode("popoutPosition", "autoFocus", "maxVisibleItems", "--icons-width"));
austere talon
crude hearth
#

I will force ven

turbid hatch
#

i was hoping that'd do it

#

cuz --icons-width only points to this searchableselect component

quaint sapphire
austere talon
turbid hatch
#

(btw im only reexporting it as Select to test)

#

no thats the original

#

:P

#

i was using it as reference

austere talon
#

so why are u changing it wha

#

if it's already exported

turbid hatch
#

to test this component

austere talon
#

you're confusing me xd

turbid hatch
#

this is the SearchableSelect thing megu found

crude hearth
#

hmm

quaint sapphire
turbid hatch
#

im testing it by reexporting it as select since it has the same props

crude hearth
#

we will find something

turbid hatch
#

so i can play with it

crude hearth
#

I will force chatgpt to write me a good component

austere talon
#

oh it's a different thing

umbral hedge
#

the old select component had a searchable prop but the new one doesn't

austere talon
#

not Select

turbid hatch
#

ye

umbral hedge
#

the new Select component was split into Select and SearchableSelect

crude hearth
#

also wth are we discussing rn

turbid hatch
#

but its the same as the Select component from our standpoint, just with different functionality

crude hearth
#

select component or 10kb timezone file

quaint sapphire
umbral hedge
turbid hatch
#

its strange though that just the last filter doesnt work

fiery jungle
turbid hatch
#

do you know where discord uses it @umbral hedge ?

umbral hedge
#

uhh

turbid hatch
#

OH

#

I KNOW

#

INTERACTIONS

umbral hedge
#

address form, guild community settings, in interaction components (autocomplete ig), user settings game activity component

#

yeah in community settings

turbid hatch
#

community settings?

umbral hedge
#

you can type in these

turbid hatch
#

huh, guess that works

crude hearth
#

this fr

turbid hatch
#

weird

#

it should be able to find it

#

maybe its because its in a forwardref?

#

although that doesnt make much sense

austere talon
austere talon
turbid hatch
#

oh that is it?

#

welp

umbral hedge
#

its forwardRef yea

#

discord removed the title from videos husk

turbid hatch
#

shows over then xd

#

guess we cant use it

umbral hedge
#

pretty sure thats what we use mapMangled or whatever for

austere talon
#
const filter = wp.filters.byCode("popoutPosition", "autoFocus", "maxVisibleItems", "--icons-width")
find(m => m.render && filter(m.render))
turbid hatch
#

hm

#

well that works, but i dont know how to get the component from that

austere talon
turbid hatch
#

well i tried doing this

export const Select = waitForComponent<t.Select>("Select", m => {
    if (typeof m !== "function") return false;
    return m.render && filters.byCode("popoutPosition", "autoFocus", "maxVisibleItems", "--icons-width")(m.render);
});
#

which got me nowhere

austere talon
#

because its not a function

turbid hatch
#

this is true!

#

it doesnt seem to respect default values though

#

actually wait ive never fiddled with those

#

hold on

#

xd

#

so select -> onChange

#

it seems

#

which i guess makes sense

austere talon
#

just read code to see what it takes

turbid hatch
#

yeah im doing that xd

quaint sapphire
#

manti will update

turbid hatch
#

i think ive gotten every meaningful option out of it

#

the rest seem to be a bit jank or dont make much sense

charred monolithBOT
frail skyBOT
#
Bad Patches

VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/

RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function

Bad Starts

None

Discord Errors

#
Bad Patches

VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/

RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function

Bad Starts

None

Discord Errors

charred monolithBOT
crude hearth
#

IT DIDNT EVEN PASS 6 MONTH PULL REQUEST WAIT TIME

#

@umbral hedge REVERT

#

And OPEN PR LIKE OTHER USERS

umbral hedge
#

?

#

that's not the main branch

#

i'm writing a PR description right now lmao

crude hearth
#

Oh

#

Ok sorry for anger

umbral hedge
#

xd

#

you will be banned

#

1984

crude hearth
#

Nop

charred monolithBOT
crude hearth
#

Now wait 6-8 months depending on vens psychology

umbral hedge
#

I will review and merge it myself blobcatcozy

#

also reviewing PRs is a ballache, you can hardly blame him

crude hearth
#

Just a single click

#

Do it without ven noticing

umbral hedge
#

xd

#

so ugly

#

i will do settings rewrite in 3 million years

#

I think I prefer doing it like this

crude hearth
#

Do checkboz

#

Does discprd have component for it

umbral hedge
#

oh that's not a bad idea

#

we haven't made a settings component for it yet xd

crude hearth
#

Sad

umbral hedge
#

would be nice

#

for now ill do dropdowns

crude hearth
#

Lov

charred monolithBOT
umbral hedge
#

ok its done i think

supple turtle
#

๐Ÿ’ข๐Ÿ’ข๐Ÿ’ข

charred monolithBOT
#

New Discord update makes multiple images in a single post to be displayed side-by-side or in a grid, and makes single images larger. Would be great to have a plugin which reverts it back to the old style, as new previews are cropped and often useless.

quaint sapphire
#

My love

turbid hatch
#

so you could use that

unborn garnet
turbid hatch
#

because its not the legacy select component

#

its the new one with search and stuff

unborn garnet
#

ooh

charred monolithBOT
umbral hedge
#

it was a rare moment of adhd "oh fuck I can program suddenly after ages of not being able to do anything"

#

I won't be very sad if it gets dropped

quaint sapphire
#

Yours is more compact code-wise

#

Maybe see if both plugins can be combined in a way?
(If yours is lacking features)

umbral hedge
#

yeah they seem to have guild/channel notifs as well

#

I'd prefer to move that into my PR bc it feels cleaner but that's just personal preference

#

oh they also have offline notifs

#

thats's pretty neat

charred monolithBOT
quaint sapphire
#

Maybe ping the author

umbral hedge
#

I want to reimplement their stuff in this style but I also don't wanna mess with their efforts xd

cunning bobcat
charred monolithBOT
somber ginkgo
#

@austere talon merges any pull requests challenge (impossible)

umbral hedge
#

simply pay ven a reasonable salary

crude hearth
#

@austere talon

#

how much do you want

austere talon
#

200000โ‚ฌ

crude hearth
opaque pewter
umbral hedge
#

and vendy sponsors me

charred monolithBOT
cunning bobcat
#

fake

verbal pumice
#

do not the webviewcord

charred monolithBOT
austere talon
#

wha

turbid hatch
#

i think they mean that themes depend on the checked class to apply switch coloring

#

but because vencord's custom switches dont have that, they dont get the coloring

#

so they look different from the rest of the switches

charred monolithBOT
charred monolithBOT
frail skyBOT
#
Bad Patches

VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/

RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function

Bad Starts

None

Discord Errors

#
Bad Patches

VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/

RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function

Bad Starts

None

Discord Errors

charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT