Add link to all commits from tree page#60909
Conversation
|
I think this is a reasonable stop-gap to the issue! Putting my UX hat on now :) the placement of "show all commits" does not feel like it belongs in the directory table. I'd imagine a standalone button centered below the file list, in place of where the previous commit history table was. Users familiar with Sourcegraph will be looking there for the commit history, and find the button instead, which is less drastic of a change than placing a text link in an adjacent, arguably unrelated table. Just my 2 cents. |
|
Sorry, this slipped through the cracks... there seem to be a lot of unrelated changes in this PR, can you rebase? My gut reaction is that the link feels a bit out of place in this view. Although I'm not a big fan of this either, what do you think about adding a link/button similar to one the one the repo homepage: That would at least make things consistent. |
c6a2b18 to
ea1fbf4
Compare
|
That makes sense. Would something like this work better? @fkling |
|
@gabtorre Yes! |
|
@gabtorre I don't see any
I also don't see any ownership info; not sure if that's an indicator of something broken on my end or not. I do see the |
|
I just pushed the changes and updated the description, sorry about that! @peterguy |
|
Looks great, thanks, @gabtorre! |
|
@gabtorre I double-checked your modification to include the revision in the link to the commits. Works well for |
…page. Followup to PR #60909, which added a Commits button to the folders, and included the revision in it, expoing the shortcome of the Commits button in the repo root page, which didn't include the revision.
…ology (#61408) * Add the current revision to the Commits button link on the repo root page. Followup to PR #60909, which added a Commits button to the folders, and included the revision in it, expoing the shortcome of the Commits button in the repo root page, which didn't include the revision. * Refactor commin code into a function And add handling for Perforce depots, so that the button shows "changelists" for Perforce instead of "commits" and it navigates to `/-/changelists` instead of to `/-/commits`. * Remove unnecessary fragment wrapper tags * Use inline `RepoCommitsButton` instead of treating it as a function * Add tests for TreePage and the new Commits button language * test using toBeInTheDocument() * Add a name attribute to the button for testing. And move the `as` attribute to the top to make it clear that it renders as a link. * Add tests for the button link to make sure that it builds the url correctly. * Add CHANGELOG entries for the Commits button changes
Closes https://github.com/sourcegraph/sourcegraph/issues/60867
This PR adds a link to the page showing all commits like the repo root page.
Test plan
Manually tested