Skip to content

Commit

Permalink
Use AJAX navigation for default-branch-button (#4631)
Browse files Browse the repository at this point in the history
  • Loading branch information
dertieran committed Aug 4, 2021
1 parent 48852f0 commit c201bf2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions source/features/default-branch-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ async function init(): Promise<false | void> {
<a
className="btn tooltipped tooltipped-ne rgh-default-branch-button"
href={String(url)}
data-pjax="#repo-content-pjax-container"
aria-label="See this view on the default branch"
>
<ChevronLeftIcon/>
Expand Down
7 changes: 6 additions & 1 deletion source/features/latest-tag-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ async function init(): Promise<false | void> {
});

const link = (
<a className="btn btn-sm btn-outline ml-0 flex-self-center css-truncate rgh-latest-tag-button" href={String(url)}>
<a
className="btn btn-sm btn-outline ml-0 flex-self-center css-truncate rgh-latest-tag-button"
href={String(url)}
data-pjax="#repo-content-pjax-container"
>
<TagIcon/>
</a>
);
Expand Down Expand Up @@ -132,6 +136,7 @@ async function init(): Promise<false | void> {
<a
className="btn btn-sm btn-outline tooltipped tooltipped-ne"
href={buildRepoURL(`compare/${latestTag}...${defaultBranch}`)}
data-pjax="#repo-content-pjax-container"
aria-label={`Compare ${latestTag}...${defaultBranch}`}
>
<DiffIcon className="v-align-middle"/>
Expand Down

0 comments on commit c201bf2

Please sign in to comment.