Repository navigation
Show GitHub activity on the new-chat canvas - #882
Open
woosal1337 wants to merge 11 commits into
Open
woosal1337 wants to merge 11 commits into
woosal1337 wants to merge 11 commits into
Conversation
Show the 30-day counters and the year heatmap only. Remove the streak, peak, and attention rows, the period and repository filters, and the repository list from the panel, the engine, and the wire types. Show the panel only when all of it fits under the composer, and give it the width of the composer pill. Put the agent update notice above the destination selectors so that it does not cover the heatmap or the folder picker.
Add a shell test that sizes the window from 1512x903 to 900x600 and 1512x560. When the panel shows, the test makes sure that it starts under the composer, matches the composer width, and ends inside the window. The test also makes sure that the panel shows in a full window and hides in a short window. Format the new files with rustfmt.
The first partial week took a label of its own, so that label touched the next month at the left edge. Each week that contains the 1st of a month now carries that label, and no other week does.
Name the 30-day period one time in the heading, and remove "vs last month" from each count. Show the change as a colored number with no dot, and show no change line when the change is 0. Shorten the pull request labels. Remove the Less/More legend and the weekday labels, so that the heatmap gets the full panel width.
Remove the module comments from the three new files, the comment on GET_GITHUB_ACTIVITY, and the comment above the update notice in the shell.
The heatmap now sits under the counts. Remove year_total from the snapshot and totalContributions from the year query, because the panel no longer shows them.
The GraphQL call takes 3 to 4 seconds, and the engine kept its result only in memory, so each launch waited for GitHub. The engine now writes each snapshot to github-activity.json in the data directory, keyed by the gh account, the same way the pull request board keeps its first pages. The panel asks for the stored copy first, shows it, and then asks GitHub for a new snapshot. In a macOS build the panel now shows 0.9 to 1.3 seconds after launch, not 5.1 seconds.
The switch is on by default. When it is off, the new chat canvas shows no panel and the panel makes no GitHub request. The window-size test also makes sure that the switch hides the panel.
With no stored copy, the first request takes about 4 seconds and the panel stayed empty. When that request runs for more than 200 ms, the panel now shows its labels, pulsing bars for the counts, and an empty heatmap grid. The skeleton has the same layout as the data, so nothing moves when the data arrives. It uses the pull request skeleton bar and the shared pulse clock, so it holds still under reduced motion. A stored copy loads in less than 200 ms, so a warm launch shows no skeleton. A failed request hides the skeleton.
…oads When the first snapshot arrives, each heatmap column changes from the empty color to its level color over 0.3 seconds, and each column starts 10 ms after the one before it. The month labels and the counts fade in with the same timing. The full fill takes about 0.8 seconds. Later refreshes change the data with no animation, and reduced motion shows the data at once.
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.
Summary
ghaccount with one GraphQL call. Hide the panel whenghis missing or signed out.github-activity.jsonin the data directory, keyed by theghaccount, as the pull request board does. At launch the panel shows the stored copy, then refreshes behind it. Keep the last good snapshot when a refresh fails. With no stored copy, show a skeleton in the same layout when the first request runs for more than 200 ms. When the first data arrives, fill the heatmap from left to right in about 0.8 s. Reduced motion shows the data at once.Test plan
github_activity_stays_inside_the_window_at_each_size. The panel shows at 1512x903, 1320x880, 1200x760, and 1110x676, and hides at 900x600 and 1512x560.gh api graphqlon a real account: no errors, 53 weeks.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.