Skip to content
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

Update URLs for v2 becoming the default version #3521

Draft
wants to merge 2 commits into
base: launch-build
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,19 +460,21 @@ flowchart LR
subgraph L1
A(/)-->DA(/datasets)
A-->HE(/help)
A-->LOOUT(/logout)
A-->LOGOUT(/logout)
A-->PR(/projects)
A-->SEA(/search)
A-->SE(/sessions)
A-->V1(/v1)
end
subgraph L2
PR-->PR1(/new)
PR-->PRID(/:id)
DA-->DAID(/:id)
HE-->HE1(/changes)
HE-->HE2(/docs)
HE-->HE3(/features)
HE-->HE4(/status)
V1-->V1_HE(/help)
V1-->V1_PR_NEW(/projects/new)
end
subgraph L3
PRID-->PRID1(/overview)
Expand Down
6 changes: 0 additions & 6 deletions client/scripts/generate_sitemap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ tee > "${OUTPUT_FILE}" << EOF
<url>
<loc>${BASE_URL}/help</loc>
</url>
<url>
<loc>${BASE_URL}/help/docs</loc>
</url>
<url>
<loc>${BASE_URL}/help/features</loc>
</url>
<url>
<loc>${BASE_URL}/help/status</loc>
</url>
Expand Down
26 changes: 4 additions & 22 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,17 @@ import LazyDatasetAddToProject from "./dataset/addtoproject/LazyDatasetAddToProj
import { DatasetCoordinator } from "./dataset/Dataset.state";
import LazyShowDataset from "./dataset/LazyShowDataset";
import LazyAdminPage from "./features/admin/LazyAdminPage";
import LazyDashboardV2 from "./features/dashboardV2/LazyDashboardV2";
import { Favicon } from "./features/favicon/Favicon";
import { Unavailable } from "./features/maintenance/Maintenance";
import LazyRootV1 from "./features/rootV1/LazyRootV1";
import LazyRootV2 from "./features/rootV2/LazyRootV2";
import { useGetUserQuery } from "./features/usersV2/api/users.api";
import LazyAnonymousHome from "./landing/LazyAnonymousHome";
import { FooterNavbar, RenkuNavBar } from "./landing/NavBar";
import LazyNotFound from "./not-found/LazyNotFound";
import NotificationsManager from "./notifications/NotificationsManager";
import Cookie from "./privacy/Cookie";
import LazyProjectView from "./project/LazyProjectView";
import LazyProjectList from "./project/list/LazyProjectList";
import LazyNewProject from "./project/new/LazyNewProject";
import { ABSOLUTE_ROUTES } from "./routing/routes.constants";
import AppContext from "./utils/context/appContext";
import useLegacySelector from "./utils/customHooks/useLegacySelector.hook";
import { setupWebSocket } from "./websocket";
Expand Down Expand Up @@ -84,26 +81,14 @@ function CentralContentContainer({ user, socket }) {
<CompatRoute exact path="/">
{user.logged ? (
<ContainerWrap fullSize={true}>
<LazyDashboardV2 />
<LazyRootV2 />
</ContainerWrap>
) : (
<div className="w-100">
<LazyAnonymousHome />
</div>
)}
</CompatRoute>
{["/projects", "/projects/starred", "/projects/all"].map((path) => (
<CompatRoute key={path} exact path={path}>
<ContainerWrap>
<LazyProjectList />
</ContainerWrap>
</CompatRoute>
))}
<CompatRoute exact path="/projects/new">
<ContainerWrap>
<LazyNewProject />
</ContainerWrap>
</CompatRoute>
<Route path="/projects/:subUrl+">
<LazyProjectView
client={client}
Expand Down Expand Up @@ -131,14 +116,11 @@ function CentralContentContainer({ user, socket }) {
/>
</CompatRoute>
<CompatRoute path="/datasets">
<Redirect to="/search?type=dataset" />
<Redirect to={`${ABSOLUTE_ROUTES.v1.search}?type=dataset`} />
</CompatRoute>
<CompatRoute path="/v1">
<LazyRootV1 user={user} />
</CompatRoute>
<CompatRoute path="/v2">
<LazyRootV2 />
</CompatRoute>
{userInfo?.isLoggedIn && userInfo.is_admin && (
<CompatRoute path="/admin">
<ContainerWrap>
Expand All @@ -147,7 +129,7 @@ function CentralContentContainer({ user, socket }) {
</CompatRoute>
)}
<Route path="/*">
<LazyNotFound />
<LazyRootV2 />
</Route>
</Switch>
</div>
Expand Down

This file was deleted.

154 changes: 0 additions & 154 deletions client/src/components/earlyAccessBanner/EarlyAccessBanner.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion client/src/components/navbar/AnonymousNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
RenkuToolbarItemUser,
RenkuToolbarNotifications,
} from "./NavBarItems";
import { RENKU_LOGO } from "./navbar.constans";
import { RENKU_LOGO } from "./navbar.constants";

export default function AnonymousNavBar() {
const { params, model, notifications } = useContext(AppContext);
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/navbar/LoggedInNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
RenkuToolbarItemUser,
RenkuToolbarNotifications,
} from "./NavBarItems";
import { RENKU_LOGO } from "./navbar.constans";
import { RENKU_LOGO } from "./navbar.constants";

export default function LoggedInNavBar() {
const { params, model, notifications } = useContext(AppContext);
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/navbar/NavBarItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function RenkuToolbarItemPlus() {
<Link
className="dropdown-item"
id="navbar-project-new"
to="/projects/new"
to={ABSOLUTE_ROUTES.v1.projects.new}
>
Project
</Link>
Expand Down Expand Up @@ -345,7 +345,7 @@ export function RenkuToolbarItemUser({
{isV2 && (
<>
<Link
to={ABSOLUTE_ROUTES.v2.connectedServices}
to={ABSOLUTE_ROUTES.v2.integrations}
className="dropdown-item"
>
Integrations
Expand Down
14 changes: 7 additions & 7 deletions client/src/components/quicknav/QuickNav.container.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ export const defaultSuggestionQuickBar = {
type: "fixed",
path: "",
id: "link-projects",
url: "/search",
url: "/v1/search",
label: "My Projects",
icon: "/project-icon.svg",
},
{
type: "fixed",
path: "",
id: "link-datasets",
url: "/search",
url: "/v1/search",
label: "My datasets",
icon: "/dataset-icon.svg",
},
Expand All @@ -57,15 +57,15 @@ export const defaultAnonymousSuggestionQuickBar = {
type: "fixed",
path: "",
id: "link-projects",
url: "/search",
url: "/v1/search",
label: "Projects",
icon: "/project-icon.svg",
},
{
type: "fixed",
path: "",
id: "link-datasets",
url: "/search",
url: "/v1/search",
label: "Datasets",
icon: "/dataset-icon.svg",
},
Expand Down Expand Up @@ -98,7 +98,7 @@ export function QuickNavContainer({ user }) {
type: "last-queries",
path: "",
id: "last-queries",
url: "/search",
url: "/v1/search",
label: query,
query,
});
Expand Down Expand Up @@ -132,8 +132,8 @@ export function QuickNavContainer({ user }) {
e.preventDefault();
setPhrase(currentPhrase);
refetchLastQueries(e.currentTarget);
if (location.pathname === "/search") return;
navigate("/search");
if (location.pathname === "/v1/search") return;
navigate("/v1/search");
};

const onSuggestionsFetchRequested = () => {
Expand Down
Loading
Loading