feat: improve follow checks, extension UX and improve README - #25
Open
cheemney wants to merge 1 commit into
Open
feat: improve follow checks, extension UX and improve README#25cheemney wants to merge 1 commit into
cheemney wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
This PR focuses on simplifying the extension's architecture, removing the unnecessary GitHub token requirement, fixing the existing tab/profile issues, and adding runtime language selection.
Follow-status checks
GET /users/{username}/following/{target_user}endpoint.tabsandwebNavigationpermissions that were no longer necessary.Acceptheaders.Issues addressed
This PR addresses the following open issues:
#19 — Multiple tab bug
Closes #19
The previous implementation could sometimes show an incorrect follow status when multiple GitHub tabs were open or when navigating between profiles quickly.
The follow check is now tied to the profile currently displayed in each tab instead of relying on shared tab-dependent state. Stale API responses are also ignored when the user navigates to another profile before a previous request finishes.
#23 — Own profile badge
Closes #23
The extension now explicitly detects when the visited profile belongs to the configured GitHub username.
In that case, no follow-status API request is made and the follow badge is not displayed. This also prevents the extension from incorrectly treating the user's own profile as a profile that follows them.
#22 — Refactoring
Closes #22
The existing implementation had duplicated navigation handling and state shared across different tabs.
As part of this change, I simplified the background service worker, moved the follow check to a message-based flow, removed unnecessary browser permissions, separated API handling from UI rendering, and added clearer handling for different application states.
The goal was to make the code easier to follow and maintain without introducing a build step or additional dependencies.
Localization
The existing
locales.jsonis now used as the extension's runtime localization source.The extension currently supports:
The extension now:
Popup and UX
Privacy
The extension no longer requires or stores a GitHub access token.
The configured GitHub username and language preference are stored locally using
chrome.storage.local.There is no third-party backend. Follow-status requests are sent directly to GitHub's public REST API.
Documentation
Testing
manifest.jsonandlocales.json.