Skip to content

feat: turn off renku legacy project dataset creation #3723

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

Draft
wants to merge 5 commits into
base: main
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
14 changes: 12 additions & 2 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,20 @@
*/

import { skipToken } from "@reduxjs/toolkit/query";
import cx from "classnames";
import { Fragment, useContext, useEffect, useState } from "react";
import { Helmet } from "react-helmet";
import { Navigate, Route, Routes, useLocation } from "react-router";
import { ToastContainer } from "react-toastify";

import { LoginHelper } from "./authentication";
import { Loader } from "./components/Loader";
import LazyDatasetAddToProject from "./dataset/addtoproject/LazyDatasetAddToProject";
import { DatasetCoordinator } from "./dataset/Dataset.state";
import LazyShowDataset from "./dataset/LazyShowDataset";
import LazyAdminPage from "./features/admin/LazyAdminPage";
import { Favicon } from "./features/favicon/Favicon";
import { Unavailable } from "./features/maintenance/Maintenance";
import SunsetBanner from "./features/projectsV2/shared/SunsetV1Banner";
import LazyRootV1 from "./features/rootV1/LazyRootV1";
import LazyRootV2 from "./features/rootV2/LazyRootV2";
import { useGetUserQuery } from "./features/usersV2/api/users.api";
Expand Down Expand Up @@ -94,7 +95,16 @@ function CentralContentContainer({ user }) {
<Route
path="/datasets/:identifier/add"
element={
<LazyDatasetAddToProject insideProject={false} model={model} />
<div
className={cx(
"d-flex",
"flex-column",
"align-items-center",
"w-100"
)}
>
<SunsetBanner />
</div>
}
/>
<Route
Expand Down
57 changes: 0 additions & 57 deletions client/src/components/addDatasetButtons/AddDatasetButtons.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import {
InputLabel,
} from "../formlabels/FormLabels";
import ImageEditor, { CARD_IMAGE_DIMENSIONS } from "../imageEditor/ImageEditor";
import { DESIRABLE_FINAL_IMAGE_SIZE } from "../../project/new/components/NewProjectAvatar";
import { DESIRABLE_FINAL_IMAGE_SIZE } from "../../project/components/NewProjectAvatar";

function userInputOption(options) {
let userInput = options.find((o) => o[Prop.STOCK] === false);
Expand Down
30 changes: 14 additions & 16 deletions client/src/components/navbar/NavBarItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
DropdownToggle,
NavLink,
UncontrolledDropdown,
UncontrolledTooltip,
} from "reactstrap";

import { LoginHelper } from "../../authentication";
Expand Down Expand Up @@ -57,26 +58,23 @@ export function RenkuToolbarItemPlus() {
const activeProjectPathWithNamespace = getActiveProjectPathWithNamespace(
location.pathname
);

const datasetDropdown = activeProjectPathWithNamespace ? (
<DropdownItem className="p-0">
<Link
className="dropdown-item"
id="navbar-dataset-new"
to={`/projects/${activeProjectPathWithNamespace}/datasets/new`}
>
Dataset
</Link>
<DropdownItem className="p-0" id="add-dataset-main-link">
<div className="dropdown-item disabled">Dataset</div>
<UncontrolledTooltip target="add-dataset-main-link" placement="right">
Creating new datasets is no longer supported in Renku Legacy. Switch to
Renku 2.0 to continue creating and managing your work.
</UncontrolledTooltip>
</DropdownItem>
) : null;
const projectDropdown = (
<DropdownItem className="p-0">
<Link
className="dropdown-item"
id="navbar-project-new"
to={ABSOLUTE_ROUTES.v1.projects.new}
>
Project
</Link>
<DropdownItem className="p-0" id="add-project-main-link">
<div className="dropdown-item disabled">Project</div>
<UncontrolledTooltip target="add-project-main-link" placement="right">
Creating new projects is no longer supported in Renku Legacy. Switch to
Renku 2.0 to continue creating and managing your work.
</UncontrolledTooltip>
</DropdownItem>
);

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/quicknav/QuickNav.present.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { Link } from "react-router";

// ? react-autosuggest styles are defined there q_q
// ? also, the order of import matters here q_q
import "../../project/new/Project.style.css";
import "../../project/Project.style.css";
import "./QuickNav.style.css";

class QuickNavPresent extends Component {
Expand Down
24 changes: 7 additions & 17 deletions client/src/dataset/Dataset.present.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,35 +297,25 @@ function ErrorAfterCreation(props) {
) : null;
}

function AddToProjectButton({ insideKg, locked, logged, identifier }) {
function AddToProjectButton({ identifier }) {
const navigate = useNavigate();

const addDatasetUrl = `/datasets/${identifier}/add`;
const goToAddToProject = () => {
navigate(addDatasetUrl);
};

const tooltip =
logged && locked ? (
<UncontrolledTooltip target="add-dataset-to-project-button">
Cannot add dataset to project until project modification finishes
</UncontrolledTooltip>
) : insideKg === false ? (
<UncontrolledTooltip target="add-dataset-to-project-button">
Cannot add dataset to project, the project containing this dataset is
not indexed
</UncontrolledTooltip>
) : (
<UncontrolledTooltip target="add-dataset-to-project-button">
Import Dataset in new or existing project
</UncontrolledTooltip>
);
const tooltip = (
<UncontrolledTooltip target="add-dataset-to-project-button">
Adding new datasets is no longer supported in the legacy Renku interface
</UncontrolledTooltip>
);

return (
<span id="add-dataset-to-project-button">
<Button
data-cy="add-to-project-button"
disabled={insideKg === false || locked}
disabled={true}
className="btn-outline-rk-pink icon-button"
size="sm"
onClick={() => goToAddToProject()}
Expand Down
183 changes: 0 additions & 183 deletions client/src/dataset/addtoproject/DatasetAdd.present.tsx

This file was deleted.

Loading
Loading