Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 36 additions & 0 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
"xregexp": "^4.4.0"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
"@nabla/vite-plugin-eslint": "^2.0.5",
"@react-router/dev": "^7.6.2",
"@rtk-query/codegen-openapi": "^1.2.0",
Expand Down Expand Up @@ -210,5 +211,19 @@
}
}
]
},
"prettier": {
"plugins": [
"@ianvs/prettier-plugin-sort-imports"
],
"importOrder": [
"",
"<THIRD_PARTY_MODULES>",
"",
"^(?!.*[.]s?css$)[./].*$",
"",
".s?css$"
],
"importOrderCaseSensitive": false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add this option? I tested this locally and it sorts the import blocks neatly.

Suggested change
"importOrderCaseSensitive": false
"importOrderCaseSensitive": false,
"importOrder": [
"",
"<THIRD_PARTY_MODULES>",
"",
"^(?!.*[.]s?css$)[./].*$",
"",
".s?css$"
]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure 👍 98cf27e

}
}
1 change: 1 addition & 0 deletions client/server/app.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import "react-router";

import { createRequestHandler } from "@react-router/express";
import express from "express";

Expand Down
3 changes: 2 additions & 1 deletion client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@ import { Fragment, useEffect, useRef, useState } from "react";
import { Helmet } from "react-helmet";
import { Route, Routes, useLocation } from "react-router";
import { ToastContainer } from "react-toastify";

import { LoginHelper } from "./authentication";
import { Loader } from "./components/Loader";
import LazyAdminPage from "./features/admin/LazyAdminPage";
import { Favicon } from "./features/favicon/Favicon";
import LazyAnonymousHome from "./features/landing/LazyAnonymousHome";
import {
FooterNavbar,
RenkuNavBar,
} from "./features/landing/components/NavBar/NavBar";
import LazyAnonymousHome from "./features/landing/LazyAnonymousHome";
import LegacyDatasetAddToProject from "./features/legacy/LegacyDatasetAddToProject";
import LegacyDatasets from "./features/legacy/LegacyDatasets";
import LegacyProjectView from "./features/legacy/LegacyProjectView";
Expand Down
1 change: 1 addition & 0 deletions client/src/api-client/dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import {
addMarqueeImageToDataset,
cleanDatasetId,
Expand Down
8 changes: 4 additions & 4 deletions client/src/api-client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { CoreApiVersionedUrlHelper } from "../utils/helpers/url";

import { CoreApiVersionedUrlHelper } from "../utils/helpers/url";
import addDatasetMethods from "./dataset";
import { alertAPIErrors, API_ERRORS, APIError } from "./errors";
import addGraphMethods from "./graph";
import addInstanceMethods from "./instance";
import addJobMethods from "./job";
import addNotebookServersMethods from "./notebook-servers";
import processPaginationHeaders from "./pagination";
import addPipelineMethods from "./pipeline";
import addProjectMethods from "./project";
import addRepositoryMethods from "./repository";
import addTemplatesMethods from "./templates";
import addUserMethods from "./user";
import processPaginationHeaders from "./pagination";
import testClient from "./test-client";
import { APIError, alertAPIErrors, API_ERRORS } from "./errors";
import addUserMethods from "./user";
import { renkuFetch, RETURN_TYPES } from "./utils";

const ACCESS_LEVELS = {
Expand Down
2 changes: 1 addition & 1 deletion client/src/api-client/repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

import { API_ERRORS, alertAPIErrors } from "./errors";
import { alertAPIErrors, API_ERRORS } from "./errors";

function addRepositoryMethods(client) {
client.postCommit = (projectId, commitPayload) => {
Expand Down
2 changes: 1 addition & 1 deletion client/src/api-client/test-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* limitations under the License.
*/

import * as samples from "./test-samples";
import { carveProject } from "./project";
import * as samples from "./test-samples";

const methods = {
getProjects: {
Expand Down
4 changes: 2 additions & 2 deletions client/src/api-client/test-samples/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { namespaces } from "./namespaces";
import {
projects,
projectReadme,
projectNotebookFile,
projectReadme,
projects,
} from "./project-samples";
import { statuspage } from "./statuspage";
import { user } from "./user";
Expand Down
2 changes: 1 addition & 1 deletion client/src/api-client/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

import { APIError, API_ERRORS, throwAPIErrors, throwAuthError } from "./errors";
import { API_ERRORS, APIError, throwAPIErrors, throwAuthError } from "./errors";

const RETURN_TYPES = {
json: "json",
Expand Down
1 change: 1 addition & 0 deletions client/src/authentication/Authentication.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* Authentication.test.js
* Tests for authentication.
*/

import { describe, expect, it, vi } from "vitest";

import { LoginHelper, RenkuQueryParams } from "./Authentication.container";
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/Alert.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
* Alert.js
* Alert code and presentation.
*/

import cx from "classnames";
import { Component } from "react";
import { Alert } from "reactstrap";
import {
CheckCircle,
ExclamationTriangle,
InfoCircle,
} from "react-bootstrap-icons";
import { Alert } from "reactstrap";

import { ALERT_ICON_SIZE } from "./Alert.constants";

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ExternalLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*/

import cx from "classnames";
import { BoxArrowUpRight } from "react-bootstrap-icons";
import { useRef } from "react";
import { BoxArrowUpRight } from "react-bootstrap-icons";
import { UncontrolledTooltip } from "reactstrap";

type ExternalLinkButtonProps = Pick<
Expand Down
7 changes: 4 additions & 3 deletions client/src/components/FileExplorer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import cx from "classnames";
import React, { Component, useState, useEffect } from "react";
import { Link } from "react-router";
import React, { Component, useEffect, useState } from "react";
import {
FileEarmarkFill,
FolderFill,
Folder2Open,
FolderFill,
} from "react-bootstrap-icons";
import { Link } from "react-router";

import { Loader } from "./Loader";

type HashElt = {
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/InformativeIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
* limitations under the License.
*/

import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { ReactNode, useRef } from "react";
import { PopoverBody, UncontrolledPopover } from "reactstrap";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";

interface InformativeIconProps {
children: string | ReactNode;
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/List.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
* limitations under the License.
*/

import Masonry from "react-masonry-css";

import Pagination from "./PaginationLegacy";
import ListBar from "./list/ListBar";
import ListCard from "./list/ListCard";
import Pagination from "./PaginationLegacy";

import Masonry from "react-masonry-css";

/**
* This class receives a list of "items" and displays them either in a grid or in classic list.
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/Loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
* limitations under the License.
*/

import { useEffect, useRef } from "react";
import cx from "classnames";
import { useEffect, useRef } from "react";

import styles from "./Loader.module.scss";

interface LoaderProps {
Expand Down
9 changes: 5 additions & 4 deletions client/src/components/Logs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* limitations under the License.
*/

import { getSessionStatusStyles } from "~/features/sessionsV2/components/SessionStatus/SessionStatus";
import { SessionV2 } from "~/features/sessionsV2/sessionsV2.types";
import cx from "classnames";
import React, { createRef, ReactNode, useEffect, useState } from "react";
import { ArrowRepeat, FileEarmarkArrowDown } from "react-bootstrap-icons";
Expand All @@ -30,15 +32,14 @@ import {
TabContent,
TabPane,
} from "reactstrap";
import { getSessionStatusStyles } from "~/features/sessionsV2/components/SessionStatus/SessionStatus";
import { SessionV2 } from "~/features/sessionsV2/sessionsV2.types";

import { displaySlice } from "../features/display";
import { NotebooksHelper } from "../notebooks";
import { LOG_ERROR_KEY } from "../notebooks/Notebooks.state";
import { NotebookAnnotations } from "../notebooks/components/session.types";
import useGetSessionLogs from "../utils/customHooks/UseGetSessionLogs";
import { LOG_ERROR_KEY } from "../notebooks/Notebooks.state";
import useAppDispatch from "../utils/customHooks/useAppDispatch.hook";
import useAppSelector from "../utils/customHooks/useAppSelector.hook";
import useGetSessionLogs from "../utils/customHooks/UseGetSessionLogs";
import {
capitalizeFirstLetter,
generateZip,
Expand Down
1 change: 1 addition & 0 deletions client/src/components/LogsV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import { skipToken } from "@reduxjs/toolkit/query/react";
import { useGetSessionsBySessionIdQuery } from "~/features/sessionsV2/api/sessionsV2.api";

import { displaySlice } from "../features/display";
import useAppDispatch from "../utils/customHooks/useAppDispatch.hook";
import useAppSelector from "../utils/customHooks/useAppSelector.hook";
Expand Down
2 changes: 2 additions & 0 deletions client/src/components/PageNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import cx from "classnames";
import { Eye, Search, Sliders } from "react-bootstrap-icons";
import { Nav, NavItem } from "reactstrap";

import RenkuNavLinkV2 from "./RenkuNavLinkV2";

export interface PageNavOptions {
Expand Down
1 change: 1 addition & 0 deletions client/src/components/PrimaryAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import cx from "classnames";
import { Alert } from "reactstrap";

import styles from "./PrimaryAlert.module.scss";

interface PrimaryAlertProps {
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/RenkuNavLinkV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import { RefAttributes, useMemo } from "react";
import {
matchPath,
NavLink as RRNavLink,
type NavLinkProps as RRNavLinkProps,
useLocation,
type NavLinkProps as RRNavLinkProps,
} from "react-router";
import { NavLink } from "reactstrap";

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/SelectAutosuggestInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/

import { useState } from "react";
import { FormGroup, FormText } from "reactstrap";
import Autosuggest from "react-autosuggest";
import { FormGroup, FormText } from "reactstrap";

import FormLabel from "./form-field/FormLabel";
import { ErrorLabel } from "./formlabels/FormLabels";
Expand Down
1 change: 1 addition & 0 deletions client/src/components/TimeCaption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import cx from "classnames";
import { DateTime, Duration } from "luxon";
import { ReactNode, useEffect, useRef, useState } from "react";
import { UncontrolledTooltip } from "reactstrap";

import {
ensureDateTime,
toHumanDateTime,
Expand Down
5 changes: 3 additions & 2 deletions client/src/components/Tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ import {
} from "react-bootstrap-icons";
import { Link } from "react-router";
import { Col } from "reactstrap";

import { simpleHash } from "../utils/helpers/HelperFunctions";
import LinkWithTooltip from "./LinkWithTooltip";
import { EntityChildrenDot } from "./entities/Children";
import EntityCreators, { EntityCreator } from "./entities/Creators";
import EntityDuration from "./entities/Duration";
import { EntityExecutions } from "./entities/Executions";
import { EntityType, WorkflowType } from "./entities/entities.types";
import { EntityExecutions } from "./entities/Executions";
import LinkWithTooltip from "./LinkWithTooltip";

/* eslint-disable @typescript-eslint/no-explicit-any */

Expand Down
1 change: 1 addition & 0 deletions client/src/components/buttons/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import {

import { simpleHash } from "../../utils/helpers/HelperFunctions";
import { LoadingLabel, SuccessLabel } from "../formlabels/FormLabels";

import buttonStyles from "./Buttons.module.scss";

type ButtonWithMenuProps = {
Expand Down
1 change: 1 addition & 0 deletions client/src/components/clamped/ClampedParagraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import cx from "classnames";

interface ClampedParagraphProps {
Expand Down
2 changes: 2 additions & 0 deletions client/src/components/commitSelector/CommitSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ import Autosuggest, {
SuggestionSelectedEventData,
} from "react-autosuggest";
import { ChevronDown, ChevronUp } from "react-bootstrap-icons";

import { Loader } from "../Loader";
import { TimeCaption } from "../TimeCaption";

import "./CommitSelector.scss";

/* eslint-disable @typescript-eslint/no-explicit-any */
Expand Down
Loading
Loading