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

Design changes for Renku 2.0 #3214

Merged
merged 42 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
03ac773
build: update bootstrap to 5.3.3
lorenzo-cavazzi Jun 19, 2024
6657e30
refactor: revamp design (#3215)
lorenzo-cavazzi Jul 18, 2024
00fab03
revert: do not add meaningless changes to the yellow logo file
lorenzo-cavazzi Jul 22, 2024
de040ba
fix: drop unnecessary tag restriction in new classes
lorenzo-cavazzi Jul 22, 2024
9a64ec5
fix: swap h1 with fs-1 modifier for non-text content
lorenzo-cavazzi Jul 22, 2024
43a6632
fix use of `cx`
lorenzo-cavazzi Jul 22, 2024
9ca7ddb
fix dropdown button
lorenzo-cavazzi Jul 22, 2024
594f6c1
fix: use helmet for applying styles
lorenzo-cavazzi Jul 22, 2024
bfb50d5
Adjust bootstrap imports order
lorenzo-cavazzi Jul 22, 2024
001ba9d
fix e2e test
lorenzo-cavazzi Jul 22, 2024
2a5e19e
style: standardize class name and spacing for inline icons and loaders
lorenzo-cavazzi Jul 23, 2024
f32368c
fix the wrong class names
lorenzo-cavazzi Jul 23, 2024
df8b20f
fix: do not use small icons for card headers
lorenzo-cavazzi Jul 23, 2024
963d9d0
Merge branch 'main' into lorenzo/bootstrap-design
lorenzo-cavazzi Jul 23, 2024
320abc3
fix ButtonWithMenuV2 for outline colors
lorenzo-cavazzi Jul 23, 2024
55b6e90
remove unnecessary ternary operator
lorenzo-cavazzi Jul 23, 2024
e84b418
adjust badges
lorenzo-cavazzi Jul 23, 2024
a484a63
fix data source display
lorenzo-cavazzi Jul 23, 2024
e37c675
fix colors
lorenzo-cavazzi Jul 23, 2024
14e69b6
use a custom class for extending the clickable area flush list group …
lorenzo-cavazzi Jul 23, 2024
537c910
Revert "use a custom class for extending the clickable area flush lis…
lorenzo-cavazzi Jul 23, 2024
b4adae6
apply extended clickable element to flush list group items only insid…
lorenzo-cavazzi Jul 23, 2024
61b0689
Revert "apply extended clickable element to flush list group items on…
lorenzo-cavazzi Jul 23, 2024
93b8ede
apply extended clickable element to flush list group items only insid…
lorenzo-cavazzi Jul 23, 2024
0362354
further logs cleanup
lorenzo-cavazzi Jul 23, 2024
f1a69d1
remove unnecessary button onclick event
lorenzo-cavazzi Jul 24, 2024
a53c31f
fix visibility text(icons on project creation
lorenzo-cavazzi Jul 24, 2024
14ba91b
add shared component to clamp text
lorenzo-cavazzi Jul 24, 2024
4c9aea9
adjust spacing in text icons
lorenzo-cavazzi Jul 24, 2024
f7be9df
adjust ProjectSimple and GroupSimple components
lorenzo-cavazzi Jul 24, 2024
fd7c7f3
adjust search result components
lorenzo-cavazzi Jul 24, 2024
e9f76ed
remove/restore comments
lorenzo-cavazzi Jul 24, 2024
b9fc268
minor fixes
lorenzo-cavazzi Jul 24, 2024
e4655b4
Merge branch 'main' into lorenzo/bootstrap-design
lorenzo-cavazzi Jul 24, 2024
d0b00ba
nest connected rules in the boostrap customization file
lorenzo-cavazzi Jul 25, 2024
8c19656
adjust modals paddings and buttons
lorenzo-cavazzi Jul 25, 2024
2c88096
keep button text cases consistent
lorenzo-cavazzi Jul 25, 2024
075ec9e
fix colors and elements in session modals
lorenzo-cavazzi Jul 29, 2024
5010c57
adjust v2 session buttons
lorenzo-cavazzi Jul 29, 2024
e13b70d
use cx
lorenzo-cavazzi Jul 29, 2024
6f379db
Merge branch 'main' into lorenzo/bootstrap-design
lorenzo-cavazzi Jul 29, 2024
c47ea57
fix avatar font size
lorenzo-cavazzi Jul 30, 2024
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
4 changes: 4 additions & 0 deletions client/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
"azureblob",
"backend",
"beforeunload",
"blockquote",
"bioconductor",
"bool",
"booleans",
Expand All @@ -114,6 +115,7 @@
"ciyer",
"ckeditor",
"cktextarea",
"clearfix",
"cloudstorage",
"codegen",
"codemirror",
Expand Down Expand Up @@ -200,11 +202,13 @@
"papermill",
"pathname",
"pdfjs",
"plaintext",
"poller",
"popups",
"prepend",
"presentational",
"profiler",
"progressbar",
"proxying",
"Pupikofer",
"pygments",
Expand Down
2 changes: 1 addition & 1 deletion client/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { DEFAULT_APP_PARAMS } from "../src/utils/context/appParams.constants";
import { createStore } from "../src/utils/helpers/EnhancedState";
import { createCoreApiVersionedUrlConfig } from "../src/utils/helpers/url";

import "../src/styles/index.scss";
import "../src/styles/renku_bootstrap.scss";

// This how the documentation recommends introducing the store into storybook
// https://storybook.js.org/addons/@dreamworld/addon-redux/
Expand Down
8 changes: 4 additions & 4 deletions client/package-lock.json

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

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@renku/ckeditor5-build-renku": "0.0.6",
"@sentry/react": "^7.81.1",
"ajv": "^6.12.6",
"bootstrap": "^5.3.0",
"bootstrap": "^5.3.3",
"classnames": "^2.3.2",
"cookieconsent": "^3.1.1",
"d3": "^7.9.0",
Expand Down
4 changes: 2 additions & 2 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ function App(props) {
const user = useLegacySelector((state) => state.stateModel.user);
if (!user?.fetched && user?.fetching) {
return (
<section className="jumbotron-header rounded px-3 px-sm-4 py-3 py-sm-5 text-center mb-3">
<h3 className="text-center text-primary">Checking user data</h3>
<section className="py-5">
<h3 className="text-center">Checking user data</h3>
<Loader />
</section>
);
Expand Down
29 changes: 15 additions & 14 deletions client/src/components/Alert.jsx
leafty marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,15 @@
* Alert.js
* Alert code and presentation.
*/

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

import {
WarningIcon,
DangerIcon,
InfoIcon,
SuccessIcon,
} from "./icons/AlertIcon.tsx";
CheckCircleFill,
ExclamationTriangleFill,
InfoCircleFill,
} from "react-bootstrap-icons";

/**
* Display a alert that can be dismissed.
Expand Down Expand Up @@ -86,13 +85,13 @@ class RenkuAlert extends Component {

getIcon() {
const icon = {
danger: <DangerIcon className="text-danger" />,
info: <InfoIcon className="text-info" />,
warning: <WarningIcon className="text-warning" />,
success: <SuccessIcon className="text-success" />,
danger: <ExclamationTriangleFill className={cx("bi", "text-danger")} />,
lorenzo-cavazzi marked this conversation as resolved.
Show resolved Hide resolved
info: <InfoCircleFill className={cx("bi", "text-info")} />,
warning: <ExclamationTriangleFill className={cx("bi", "text-warning")} />,
success: <CheckCircleFill className={cx("bi", "text-success")} />,
}[this.props.color];

return icon ? <div className="alert-icon">{icon}</div> : "";
return icon;
}

render() {
Expand All @@ -108,9 +107,11 @@ class RenkuAlert extends Component {
className={this.props.className}
data-cy={this.props.dataCy}
>
<div className="alert-content gap-3">
{alertIcon}
<div className="w-100 overflow-auto">{this.props.children}</div>
<div className={cx("d-flex", "gap-3")}>
<div className={cx("fs-1", "my-auto")}>{alertIcon}</div>
<div className={cx("my-auto", "overflow-auto", "w-100")}>
{this.props.children}
</div>
</div>
</Alert>
);
Expand Down
8 changes: 4 additions & 4 deletions client/src/components/ExternalLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ export function ExternalLink({
);
const icon = iconSup ? <sup>{iconNode}</sup> : <>{iconNode}</>;
displayTitle = iconAfter ? (
<span className="btn-icon-text-after">
<span>
{title}
{icon}
<span className="ms-1">{icon}</span>
</span>
) : (
<span className="btn-icon-text">
{icon}
<span>
<span className="me-1">{icon}</span>
{title}
</span>
);
Expand Down
41 changes: 21 additions & 20 deletions client/src/components/Logs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* limitations under the License.
*/

import { faSave, faSyncAlt } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import React, { useEffect } from "react";
import {
Button,
Expand Down Expand Up @@ -45,6 +43,8 @@ import {
import { Loader } from "./Loader";

import "./Logs.css";
import { ArrowRepeat, FileEarmarkArrowDown } from "react-bootstrap-icons";
import cx from "classnames";

export interface ILogs {
data: Record<string, string>;
Expand Down Expand Up @@ -104,7 +104,7 @@ const LogTabs = ({ logs }: { logs: Record<string, string> }) => {

return (
<div>
<Nav pills className="nav-pills-underline log-nav bg-white">
<Nav tabs className="mb-2">
{Object.keys(data).map((tab) => {
return (
<NavItem key={tab} data-cy="log-tab" role="button">
Expand All @@ -125,7 +125,10 @@ const LogTabs = ({ logs }: { logs: Record<string, string> }) => {
return (
<TabPane key={`log_${tab}`} tabId={tab}>
<div className="d-flex flex-column">
<pre className="bg-primary text-white p-2 w-100 overflow-hidden log-container border-radius-8">
<pre
className="overflow-hidden"
style={{ whiteSpace: "pre-line" }}
lorenzo-cavazzi marked this conversation as resolved.
Show resolved Hide resolved
>
{data[tab]}
</pre>
</div>
Expand Down Expand Up @@ -163,14 +166,14 @@ const LogDownloadButton = ({
return (
<Button
data-cy="session-log-download-button"
color={color ?? "rk-green"}
color={color ?? "primary"}
size={size ?? "s"}
disabled={!canDownload(logs)}
onClick={() => {
save();
}}
>
<FontAwesomeIcon icon={faSave} />
<FileEarmarkArrowDown className={cx("bi", "me-1")} />
{downloading ? " Downloading " : " Download"}
{downloading && <Loader inline size={16} />}
</Button>
Expand Down Expand Up @@ -221,8 +224,8 @@ function NoLogsAvailable(props: LogBodyProps) {
<p>
You can try to{" "}
<Button
color="primary"
data-cy="retry-logs-body"
className="btn-outline-rk-green"
size="sm"
onClick={() => {
fetchLogs(name);
Expand All @@ -244,11 +247,11 @@ function SessionLogsBody(props: LogBodyProps) {
<p data-cy="logs-unavailable-message">
Logs unavailable. Please{" "}
<Button
className="btn-outline-rk-green"
size="sm"
color="primary"
onClick={() => {
fetchLogs(name);
}}
size="sm"
>
download
</Button>{" "}
Expand Down Expand Up @@ -280,29 +283,27 @@ function SessionLogs(props: LogBodyProps) {
// TODO: Revisit after #1219
return (
<>
<div className="p-2 p-lg-3 text-nowrap">
<div className={cx("text-nowrap", "mb-3")}>
<Button
key="button"
color="rk-green"
size="sm"
color="outline-primary"
style={{ marginRight: 8 }}
id="session-refresh-logs"
onClick={() => {
fetchLogs(sessionName);
}}
disabled={logs.fetching}
>
<FontAwesomeIcon icon={faSyncAlt} /> Refresh logs
<ArrowRepeat className={cx("bi", "me-1")} /> Refresh logs
</Button>
<LogDownloadButton
logs={logs}
downloading={downloading}
save={save}
size="sm"
color="secondary"
color="outline-primary"
/>
</div>
<div className="p-2 p-lg-3 border-top">
<div>
<SessionLogsBody fetchLogs={fetchLogs} logs={logs} name={sessionName} />
</div>
</>
Expand Down Expand Up @@ -377,14 +378,14 @@ const EnvironmentLogsPresent = ({
return (
<Modal
isOpen={!!logs.show}
className="bg-body modal-dynamic-width"
className="modal-xl"
scrollable={true}
toggle={() => {
toggleLogs(name);
}}
>
<ModalHeader
className="bg-body header-multiline"
className="header-multiline"
toggle={() => {
toggleLogs(name);
}}
Expand All @@ -398,8 +399,8 @@ const EnvironmentLogsPresent = ({
</small>
</div>
</ModalHeader>
<ModalBody className="logs-modal">
<div className="mx-2 bg-white">
<ModalBody>
<div className="mx-2">
<SessionLogs fetchLogs={fetchLogs} logs={logs} name={name} />
</div>
</ModalBody>
Expand Down
Loading
Loading