improve navigation between tree browser and file details@@ -126,6 +126,17 @@ const RepositoryTreeView: ReactIsland<
)
)}
</Select>
+ {shouldShowPrevPath && (
+ <a
+ title={`Go to root`}
+ href={buildRouteLink(AppRoute.REPOSITORY_DETAILS, {
+ orgSlug,
+ repoSlug,
+ })}
+ >
+ ~
+ </a>
+ )}
{currPathParts.map(
(pathPart, idx) =>
pathPart.trim() !== "" &&
@@ -54,6 +54,7 @@ const RepositoryBrowserView: ReactView<RepositoryBrowserViewProps> = ({
repo,
}) => {
const currPathParts = path.split("/");
+ const shouldShowRootPath = path !== "/";
return (
<Layout {...commonProps}>
@@ -63,9 +64,7 @@ const RepositoryBrowserView: ReactView<RepositoryBrowserViewProps> = ({
forkedFromRepo={repo.forkedFromRepo}
forksCount={repo.forks.length}
parentOrg={parentOrg}
- path={path}
repo={repo}
- separator={"/"}
/>
</IslandWrapper>
<Grid.Col fluid style={{ marginTop: 32 }}>
@@ -86,8 +85,15 @@ const RepositoryBrowserView: ReactView<RepositoryBrowserViewProps> = ({
<Card
style={{
width: "100%",
- padding: 8,
marginTop: lastCommit != null ? 8 : 0,
+ padding: 8,
+ backdropFilter: "blur(8px)",
+ backgroundColor:
+ NamedColors.CARD_ALPHA_01[commonProps.themeScheme],
+ position: "sticky",
+ top: 80,
+ zIndex: 9000,
+ borderRadius: 8,
}}
themeScheme={commonProps.themeScheme}
>
@@ -164,6 +170,17 @@ const RepositoryBrowserView: ReactView<RepositoryBrowserViewProps> = ({
)
)}
</Select>
+ {shouldShowRootPath && (
+ <a
+ title={`Go to root`}
+ href={buildRouteLink(AppRoute.REPOSITORY_DETAILS, {
+ orgSlug: parentOrg.slug,
+ repoSlug: repo.slug,
+ })}
+ >
+ ~
+ </a>
+ )}
{currPathParts.map(
(pathPart, idx, self) =>
pathPart.trim() !== "" &&