mirror of
https://github.com/davidarroyo1234/InstagramUnfollowers.git
synced 2026-04-25 21:05:49 +03:00
[GH-ISSUE #28] Further suggestions & future plans #210
Labels
No labels
bug
documentation
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/InstagramUnfollowers#210
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tomleb3 on GitHub (Oct 2, 2022).
Original GitHub issue: https://github.com/davidarroyo1234/InstagramUnfollowers/issues/28
Hey @davidarroyo1234 👋🏼
Hope all is well with you.
First of, let me just say that I've enjoyed working on this tool, and thanks for adding me as a collaborator.
Ultimately I think the result came out good, the script was already very useful and now has a nice UI and everything.
I'd like to open a short discussion and get your thoughts on some stuff.
Currently, the weak point of the script IMO is the HTML template strings.
I used them since they we're the simpler option at the time, but they are bulky and difficult to read, which makes it harder not only for us, but also for new devs who would like to contribute and don't know the code.
Also, the more stuff we add, the messier it will get.
This is something that I would like to improve and be happy to take upon myself to work on whenever I have some spare time.
I would mainly like to discuss options for this and find out what you'll feel more comfortable with.
Here are some options that come to mind:
However, although some of these frameworks are very popular now, the main downside of using it is that their popularity will likely not last forever, unlike vanilla JS, which will probably still be used after humans colonize Mars 😆
Anyway, just some thoughts.
Please let me know which ideas you feel comfortable with, if any.
Also if you have any other ideas, I'm open for them.
P.S. - I actually have an idea of how to implement the unfollow-notification idea that was suggested in one of the issues.
And even relatively within the context of the script. Sort of.
But that's a conversation for another day.
Thanks again,
Tom.
@davidarroyo1234 commented on GitHub (Oct 8, 2022):
Yeah i agree with you, but maybe is a little bit too overkill to use react on this project haha. But we could try to at least improve that templating part.
I would like to know the way you are thinking to implement the notification system.
Thanks for all the design and functions you did. Now it's more usable.
P.S: sorry for the late answer im a little bit bussy lately.
@tomleb3 commented on GitHub (Oct 10, 2022):
Alright, then I'll look into the "CSS in JS" option.
Basically, the general idea I have is using Github's workflows.
The user will need to fork the repo and do some setup.
The workflow will automatically run at the specified interval and will compare a stored "previous unfollower list" to the current.
This could be set up in a way that will send an email or a message via the Telegram bot or any other way probably.
Not sure if there are any obvious problems with this idea though..
It's fine :)
@davidarroyo1234 commented on GitHub (Oct 13, 2022):
But this will not work i think. You will need to log in from a different ip, use the 2FA etc etc.. Instagram will see a strange ip login. And could get ban. (Maybe im not understanding how github workflow works. Correct me if im wrong.).
The css on js option sound good to me.
@tomleb3 commented on GitHub (Oct 13, 2022):
Yeah it's definitely not easy. But it's an idea 🤷🏼♂️
Who knows, maybe at some point :)
👍🏼
@davidarroyo1234 commented on GitHub (Oct 17, 2022):
I would first implement the css in js and then we could think about the notification system. Its a bit more complex to do i think.
@onnipotenza commented on GitHub (Oct 23, 2022):
Hi, i wanted to thank everyone who worked on this amazing tool, i really like it
By the way i want to make a suggestion: it would be great if there was an option to exclude a list of users, like a whitelist or something like that. (because i have a bunch of pages that i follow that doesn't have the blue thing so everytime i have to select manually who to follow rather than just using select everyone).
@tomleb3 commented on GitHub (Oct 23, 2022):
@onnipotenza Nice idea!
This can definitely be useful IMO, and gives me some ideas.
The implementation should be rather simple, but need to consider how this can be integrated into the UI.
I'll check some options, perhaps this will indeed be added.
@tomleb3 commented on GitHub (Nov 7, 2022):
Hey @davidarroyo1234
I have some new stuff I've been working on related to this post.
Trying to open a PR in the repo, getting a permission error.
Has anything changed in the repo params?
@davidarroyo1234 commented on GitHub (Nov 8, 2022):
mm nop, i didnt change anything. I'll check if github has done some changes.
Can you post a photo of the error?
@tomleb3 commented on GitHub (Nov 17, 2022):
TODO list:
Leaving this here as a reminder for myself.
Shouldn't be too difficult to implement, but will require some new UI and making some relevant decisions.
Not sure when I'll get around to this, but I do believe it will be added.
@mavr1k commented on GitHub (Dec 20, 2022):
Hello folks! Thanks for creating and supporting an excellent tool as an alternative to AppStore trash with a huge number of ads.
One probably useful idea from my side:
Didn't you consider wrapping it in the chrome extension?
@davidarroyo1234 commented on GitHub (Dec 20, 2022):
I have consider doing it, but I dont know if violates some chrome store rules or some law. Also is not as "transparent" for a user. Here you can see all the code that is being use.
I could create a downloadable chrome extension in the repo and then if someone wants it could import itself.
@mavr1k commented on GitHub (Dec 20, 2022):
Sounds great to me, thanks!
I also think that a good approach would be is to add the possibility to pull the latest script version from the master branch. As this repo is public, it could easily done over HTTP
@tomleb3 commented on GitHub (Dec 30, 2022):
@davidarroyo1234 Wanted to get your thoughts on something.
As we've concluded before, adding React or any other framework to this project would be overkill.
However, it is possible to add just JSX capabilities.
This would require adding
babelto the npm dependencies, but that isn't an issue IMO.JSX is a much nicer way of combining HTML with JS then what we currently have, and it will make some stuff a lot cleaner.
Most notably, it will add the option to use components just like in React.
Using components will make it so that everything can be nicely organized.
For instance, you can have a "results" component and a "unfollow-log" component, etc.. for different parts of the app.
This will make it a lot easier to understand what's happening in the code, since ATM we have these parts of code scattered about in different places that seem detached from eachother.
I've played around with it a bit and it seems to work just fine.
It will also compile to plain JS just like scss with css, etc..
Wanted to know WDYT about this change and how comfortable you are with JSX.
@bestfizzz commented on GitHub (Jan 2, 2023):
Hello, I notice that the unfollower list json come in chronological order: First item=most recent; last item=the earliest user you followed.
You can find the unfollower's index in the list then whitelist everyone after that index.
This feature is useful for hacked accounts to "restore" their original state.
@davidarroyo1234 commented on GitHub (Jan 2, 2023):
I usually use angular so im not used to jsx. But we could try it.
We should not make a very large code to copy.
@davidarroyo1234 commented on GitHub (Jan 2, 2023):
I will take a note for a future sort option. Thanks!
@tomleb3 commented on GitHub (Jan 5, 2023):
It shouldn't enlarge the code IIRC, as the babel simply compiles everything to regular JS at build.
I'll start slowly working on stuff and will open a PR when I'll have at least a minimal example.
@davidarroyo1234
@davidarroyo1234 commented on GitHub (Jan 6, 2023):
Okay, thanks @tomleb3!
@eshdoesntexist commented on GitHub (Jan 12, 2023):
hello
first of all thanks for making such a useful tool!
I have a few suggestions.
instead of a framework, I'd like to recommend the use of a template engine like handlebars. this should lead to a smaller code size as well because libraries like react and vue require virtual doms which increases the size by a lot.
can you please look into turning it into a chrome extension, I think that should make the script much more user-friendly.
If I get time ill try to implement these changes and make a PR.
@tomleb3 commented on GitHub (Jan 12, 2023):
Hey @eshdownbad !
First of all, thanks and do feel free to contribute.
As for the framework discussion, we've decided not to go with it, as it is overkill in this case.
However, it is possible to write JSX without React, and IMO it will be very beneficial in this case (mainly the ability to make reusable components, and have more options when it comes to placing attributes on the elements).
It also shouldn't enlarge the code much, as it ultimately compiles into pretty much regular JS as I've mentioned in the past.
I am not familiar with Handlebars but it definitely sounds interesting.
I'll give it a look and see if it has any clear advantages over JSX.
@tomleb3 commented on GitHub (Jan 24, 2023):
BTW I toyed around with using JSX without React like I've mentioned before.
And while it generally works, it doesn't actually React to changes in data, which makes sense.
So while it improves some aspects of the code, I'm not sure it's good enough to persue.
My main issue, as I've mentioned before, is that the manual DOM manipulation is very janky and difficult to keep track of.
Tried "Handlebars" like the user above suggested, but didn't feel comfortable enough with it.
If we eventually would like to incorporate a framework, then 2 good options IMO are:
Wanted to know if you have any thoughts on this.
If you have any other idea on how to avoid the uncomfortable DOM manipulation, let me know :)
@davidarroyo1234
@davidarroyo1234 commented on GitHub (Jan 25, 2023):
@tomleb3 Preact sounds good, if you can recreate a minimal example to inject in chrome i would appreciate it. (some html code and state change or something)
@tomleb3 commented on GitHub (Jan 26, 2023):
Definitely. I'll start working on it in my spare time.
@tomleb3 commented on GitHub (Mar 3, 2023):
Hey @davidarroyo1234 !
I'm currently doing some work and adding some new stuff.
Wanted to ask, where did you get the types for the API responses?
i.e. the stuff in
model/user.ts.Can't find documentation for it anywhere.
Also, I see that you made all fields optional, is it supposed to be that way?
I'm asking since I'm also adding some TS rules (most notably
strict) which now forces me to handle the potentialundefinedvalue wherever those fields are used.@davidarroyo1234 commented on GitHub (Mar 3, 2023):
There is not documentation for the types of user.. It's manually done, using the chrome devtool on the network tab. Then grab the response when you click on the follower list.
With the response you can write the model manually or use some online/offline mapper.
I made the fields optional because i don't know if instagram will send me every time this values.
@tomleb3 commented on GitHub (Mar 4, 2023):
OK, I think we can assume them to be non-optional until proven otherwise.
Reason being that if we leave them optional, we'll have to do assertions everywhere in TS strict mode, which will bloat the code.
If you think that's a safe assumption then I'll add this change also.
@davidarroyo1234 commented on GitHub (Mar 5, 2023):
I mean, all the values should come from the api, but its not 100% sure...
@tomleb3 commented on GitHub (Mar 6, 2023):
True, technically we can't rely on them being there.
But then again we also don't handle cases where they are not provided anywhere in code.
So, whether if they are optional or not, if not provided, currently the code will likely break.
So it leaves us with 2 options.
Either keep them optional and handle the missing value anywhere these fields are used, which would bloat the code.
Or assume they always exists, at least until we're proven otherwise, which might not be the safest, but as mentioned, we don't handle it now either.
Let me know your thoughts on this.
@onnipotenza commented on GitHub (Mar 7, 2023):
I think this option is better. Because at least you will know if they always exits or not.
@tomleb3 commented on GitHub (Apr 22, 2023):
I think it's time to close this issue.
Most things that were suggested here were indeed added by this point.
So we can definitely say that we've accomplished what we set out to do here.
@davidarroyo1234 commented on GitHub (Apr 23, 2023):
Yep, Good job. If someone else has any other idea open a issue or discussion.
God joob @tomleb3
@tomleb3 commented on GitHub (Apr 24, 2023):
Thanks @davidarroyo1234 !
Been fun working on this.
Definitely very humbling to see the rise in the amount of stars for this script.
Probably going to reach 1k rather soon 🌟 🚀