You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a lot of changes, and I doubt all of them can be implemented easily. I think it's best we do this slowly and when there isn't anything better to do. This is important, but not of high priority.
The layout is based on what exists in my own user data, some keys might be missing.
This is my proposed new layout
# Already stored alright, just a bit cleaner imo.achievements:
exp: intunlocked:
[achievement name]: dateblocked: array of uidclientSettings:
autoplayVideos: boolfontSize: "normal"| "large"showNsfw: "Hide"| "Blur" | "Show"showPolitics: "Hide"| "Blur" | "Show"showPrideFlag: boolshowSensitive: "Hide"| "Blur" | "Show"DMs:
[dm id?]:
isOpen: boolunread?: intwith: uidemail: string# move customThemeExperiment and directMessagesExperiment hereexperiments:
[experiment name]: bool# followers/following count is just the `.length` field on the respective arraysfollowers: array of uidfollowing: array of uidlastLogin: timestamp# renamed from posts# I don't really like this, but I don't know how to change it without losing functionalitynotes:
[note id]:
isRenote: boolnotifications:
unread: int[notification id]:
type: notification type[additional fields based on type]# can be removed once it's done, instead of staying "finished" foreverpreRegisterStep: "finished"| (unknown other variants)profileSettings:
banner: filenamebio: stringdisplay: stringpfp: filenamepronouns: string# replaces readUpdates, same thing but more clearly named for its new purposereadAnnouncements:
[announcement name]: bool# this looks a bit useless here, but I promise it's notspecialFlags:
activeContributor: boolisSubscribed: boolthemes:
current: builtin theme name | "Custom"installed: array of theme idcolors:
[theme fields]saved:
[theme name]:
published?: theme id[theme fields]username: string
Note: Firebase automatically converts between arrays and array-like objects internally, so we can use them in some places.
Proposed Guidelines
So we don't get another mess.
Boolean values that mark the user as something (e.g. subscribed, verified, admin, etc.) should go under specialFlags.
Multiple values that relate to the same thing should be grouped together. userSettings and clientSettings are both settings, but don't relate to the same thing, hence aren't grouped together.
Temporary values (e.g. the current registration step) should be removed once they aren't needed anymore.
Objects where order isn't relevant should be replaced with arrays. Arrays of objects should be avoided, though.
Keys should follow camelCase.
Values outside another object aren't forbidden, but should be avoided.
I can try when I feel the motivation to do so, but right now there's higher things on my priority list then how data is sorted, for now anyways.
Need to move a shit ton of code to the backend, re-add DMs, fix broken code/CSS... realistically what I'm working on right now isn't super high priority either but :p I realistically should have this done in a couple hours (not counting time toward bug fixing and testing)
Also, since there's a comment that asks:
EXP was originally going to be for a leveling system, but it didn't make sense for a social media, so I scrapped it but never removed the part that grants you the EXP.
Changes
There are a lot of changes, and I doubt all of them can be implemented easily. I think it's best we do this slowly and when there isn't anything better to do. This is important, but not of high priority.
The layout is based on what exists in my own user data, some keys might be missing.
This is my proposed new layout
Note: Firebase automatically converts between arrays and array-like objects internally, so we can use them in some places.
Proposed Guidelines
So we don't get another mess.
specialFlags
.userSettings
andclientSettings
are both settings, but don't relate to the same thing, hence aren't grouped together.Motivation
This is the current layout for user data
It's a mess I dont like to work with.
Progress
The text was updated successfully, but these errors were encountered: