Add support to detect new Stars "browser" and Star Lists pages#211
Add support to detect new Stars "browser" and Star Lists pages#211lstn wants to merge 5 commits intorefined-github:mainfrom
Conversation
eb9f2e0 to
60a85f1
Compare
|
I'll admit I'm not usually a frontend dev and TS/JS is very rare for me to write so I can't quite figure out how to the the CI Test job to not fail for those |
We only add detections to this package if there's an immediate need for them. If not, we don't |
Right - so if I wanted to implement a feature that relies on the new StarsList page in Refined Github, I'd have to submit this PR at the same time instead of doing it before? |
|
Ideally you'd ask about the issue first so that when you open this PR here, you can point back to it. Given the state of GitHub at the moment it's very unlikely we add new features, especially for secondary pages like star lists. |
Github added some new functionality with Star Lists recently: https://docs.github.com/en/get-started/exploring-projects-on-github/saving-repositories-with-stars#organizing-starred-repositories-with-lists
And it seems they shadow added a new Stars browser (cannot find documentation for that) that is available at
/stars.I've added the following functions to detect these paths as I can foresee a few features that could be cool to include in Refined Github to enhance them, especially the Star Lists:
isStarsURL implementation tableToggle isStars table
truetrue. 🔒 login is required on this page - Will always be the user's own profiletruetruetruefalsefalse./username?tab=starspage instead.true/usernameprofile UI, not the "Stars Browser" UI._isOwnStarsURL implementation tableNote: I noticed the current
isOwn...methods do not have URL tests associated with them currently, so I did not add any for these in the code.Toggle isOwnStars table
truefalse. SeeisStarstabletrueorfalseisStarstable. Return value determined byisLoggedIntrueorfalseisStarstable. Return value determined byisLoggedIntrueorfalseisStarstable. Return value determined byisLoggedInfalsefalse./username?tab=starspage instead.trueorfalseisStarstable. Return value determined byisLoggedInisStarsListURL implementation tableToggle isStarsList table
falsetrue/usernameprofile UI, not the "Stars Browser" UI.isOwnStarsListURL implementation tableNote: I noticed the current
isOwn...methods do not have URL tests associated with them currently, so I did not add any for these in the code.Toggle isOwnStarsList table
falsetrueorfalseisStarsListtable. Return value determined byisLoggedInOn a couple things I did/didn't include:
isOwn...implementations. In my head, they seemed like they could be useful for some Refined Github features that would apply only the the user's Star Lists, so I added them. If you don't feel like they fit here, I'm not opposed to removing them but I genuinely can think of a couple examples where they might be useful down the line and they'd end up getting added anyway in the future.isStarsRepositoriesorisStarsTopicsor theisOwn...version of them as they are essentially and functionally the exact same UX as the other "Star Browser" pages (except the Stars List page itself)/username?tab=starsURL toisStarsorisOwnStarsfor basically the same reason - the UX is drastically different on these pages, which I can't imagine would be useful at all for anyone using these checks to implement features on Refined Github. In fact, I can see it being a hindrance that makes these checks unusable for now until Github decides to further change this UX and go all in on the "Stars Browser" or whatever they are calling it.