-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[INS-1517] adds GitHubStarsButton #5009
Conversation
I did run through some smoke test. I noticed two things in the case of offline;
Otherwise, this PR looks good to me and the description of the PR is detained and amazing! |
I left minor comments on something trivial and this PR looks good to me. I ran some smoke tests as well and it looks working as expected. One edge case may be handling the offline status, but I haven't been able to reproduce it after first few times of reload. |
18e8a87
to
af55eb5
Compare
I missed a comment on the ticket
af55eb5
to
731f4a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to keep the github url intact so make it easier to search for should we ever need to update it, but non-blocking and kinda opinionated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
- There's a slight discrepancy in stargazers numbers when you disable Incognito. It's only noticeable up to the point you switch to another tab. For example, first we show
21700
stargazers, then upon switching to another Design Document tab, we re-render with a new number of21749
- When we work offline / network disabled, the element is a bit jittery. It tries to render the star count, only to be back to just the star button in a split second:
Kapture.2022-07-27.at.10.46.47.mp4
5d9e396
to
d07c58f
Compare
thanks @filfreire for finding that. d07c58f fixes it (and as a note for the future, @gatzjames / @jackkav / @filfreire all saw and approved of the approach in that commit, with the suggestion from @gatzjames that in a future PR we can improve this further by hardcoding the fallback (today, set to 21700) with an environment variable that's fed into the production build by the CI). |
Ahh I hate to be that person, but is there perhaps a way to hide this control? I find it doesn't meaningfully add to my experience with the app, and I find it visually cluttering. |
This PR adds a GitHub star tracker, as commonly seen in many applications.
Some notes
useEffect
the component was benchmarked to rerender 8 times (despite no props changes)useMount
it is improved (as, it only fetches on mount) to when changing insomnia activities (broadly speaking)App Dashboard
Request Collection
Design Document
Unit Test
Incognito Mode
Also works well in themes
Segment
As with the rest of the application, segment events will not fire if "send usage statistics" is false (including by being set by incognito mode). If true, here is what the events look like (cc: @wdawson):
changelog(Improvements): Adds a GitHub stargazer button to the app header