-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global Tags #240
Comments
Cool, with this I also thought of like friends and follow buttons for users to know when their friends are making sets |
Idk if mine is a good idea but it’s there |
I can also help with this if needed |
Also what is the vocabustudy devoeloper team? Am |
Also what is the “verified” role mean… like that you have verified yourself via email or is it like Twitter |
This will be pretty hard to implement - Firebase does not offer a method for querying a specific user's roles w/o the Admin SDK
No to both of these - New Member is too hard to implement ("First 7 days") and Verified is redundant |
Instead of Custom Claims, we could make another thing in the database |
I just saw this:
I have something even better - binary flags! (Or is that what you were thinking about?) |
Yea but there is multiple ways to get 48 |
So binary is better tight |
No there's only one way |
Oh wait |
I’m selling |
Nevermind |
That's genius!! perfect |
Thanks! So let's say Boolean(48 & 32) // true
Boolean(48 & 16) // true
Boolean(48 & 8) // false We can probably store all of this in Cloud Storage as a JSON file (the tags won't change too often right?) with a 2-3 day cache {
// The bit mask is 2^index in array
"t": [{"n": "Dev", "c": "some color"},{"n": "For Zero", "c": "some color"},{"n": "Donator", "c": "some color"},{"n": "Honor", "c": "some color"},{"n": "Helper", "c": "some color"}],
"u": {"userid": 48, "userid2": 10}
} Then to parse it: const globalTags = await fetch("...");
function getTagsForUser(userId) {
let userTags = [];
let userTagsNum = globalTags.u[userId];
for (let [i, tag] of globalTags.t.entries()) {
if (userTagsNum & (1 << 5)) userTags.push(tag);
}
return userTags;
} |
Good idea |
Ok that is acc perfect… idk why ur code looks so much better than mine… but yea genius |
I love binary operations |
Your code seems great. Although, because of the number 1 tags, it will be better to use a 1 day cache so it updates every day. |
I can see that, lol. Will the JSON file be automatically updated? does Firebase take care of that? |
I don't think there would be a source to automatically update from, so we would have to do it manually |
firestore is a source to automatically update from, no? we assign the binary code to each uid. can we not fetch the binary number whenever we need to display tags, and then write a function to display them? |
There are three possible things we could do:
The thing about option 3 is that it would be harder to cache than Cloud Storage. In addition, there are two possible options for that:
the |
Okay I think that # 2 is the best like u said bc that’s the way I have tried before… like long ago when I was helping my cousin make a website for stuff…(I just was trying to learn what he was doing) also why did u add me to the developers and then remove me.. like it’s cool… I can be a developer Idrc rn cuz I haven’t done anything and I should but my parents want me doing other things away from my computer for thanksgiving break so I’m unable to sorry |
Thanks
I don't want to seem rude or anything but you haven't committed to the repo at all yet, and being on the developers team gives you full write access. I wanted you to have the info in the team, but I wanted to hold off on the perms for now. I added developing info to the README if you want to see that Note that you don't have to be on the developers team to be a contributer - being on it just shows that you have a reasonable experience with the Vocabustudy code |
Makes sense cuz like u said I haven’t done anything so I only want it if I do things and I need it… plus I’m kinda brainstorming and when I’m like boom we need to do this… it just doesn’t seem good and I’m kinda scared that it is a bad idea and don’t put an issue in |
No worries - if you want a place to put brainstormed ideas that may not warrant a full issue, you could use discussions |
Yea sound good |
I was thinking option 3.1 lol. if you're comfortable with cloud storage, then let's do that. |
That would also work but hear me out and I could be wrong but isn’t option 2 simpler? |
And more versatile? |
option 2 is cloud storage lol. we're on the same page |
Alr |
This will now be 10 times easier with Bulma tags |
nice |
perfect |
Handled by the custom |
Vocabustudy Tags
Vocabustudy Tags are identifiers that appear everywhere, which help differentiate people from others:
It's really messy, lol.
Tags can be implemented as an array, where every user has a binary array ([0,1,1,0,0,0,0]). 1 means they have the tag; 0 means they don't. We add more values for the more tags we have. This is stored in Firebase.
Types of tags (can add more later):
Special Roles:
New Member -> Only given for the first 7 days of getting new role.
"Verified" Checkmark -> Given to only Siddhant, Ruhan, Omkar, and Nikhil's accounts
All of this will take a good amount of time to implement, which is why I'm setting the milestone to 2.0.0. Please let me know what modifications we should make
The text was updated successfully, but these errors were encountered: