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

Release 2021-12-06 #1806

Merged
merged 44 commits into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
fc48fd1
add template for pull requests (#1751)
asnaith Nov 16, 2021
b21a7b8
Bump ssri from 6.0.1 to 6.0.2 (#1747)
dependabot[bot] Nov 16, 2021
92abc31
Bump merge-deep from 3.0.2 to 3.0.3 (#1744)
dependabot[bot] Nov 16, 2021
9784c12
Bump dns-packet from 1.3.1 to 1.3.4 (#1745)
dependabot[bot] Nov 16, 2021
3599ee4
Bump tmpl from 1.0.4 to 1.0.5 (#1741)
dependabot[bot] Nov 16, 2021
6337f63
Bump path-parse from 1.0.6 to 1.0.7 (#1742)
dependabot[bot] Nov 16, 2021
71e7d7e
Bump color-string from 1.5.3 to 1.6.0 (#1743)
dependabot[bot] Nov 16, 2021
4e64f03
Bump hosted-git-info from 2.8.8 to 2.8.9 (#1746)
dependabot[bot] Nov 16, 2021
9addf3e
bump cypress to v9.0 (#1749)
asnaith Nov 16, 2021
6674c0f
Bump url-parse from 1.4.7 to 1.5.3 (#1748)
dependabot[bot] Nov 16, 2021
f994607
Link sharing redesign (#1722)
Tbaut Nov 16, 2021
328b402
Resolved (#1731)
RyRy79261 Nov 16, 2021
0062f31
Add subdirectory for pr template (#1756)
asnaith Nov 17, 2021
d80d513
add test for hotkey navigation in file preview (#1755)
asnaith Nov 17, 2021
9c52fbe
fix video preview overflow (#1752)
FSM1 Nov 17, 2021
ef5e677
Share files from browser support (#1736)
tanmoyAtb Nov 18, 2021
7170268
Revert "copy working" (#1759)
FSM1 Nov 19, 2021
9dc9db8
Translations update from Hosted Weblate (#1753)
weblate Nov 22, 2021
c2ee766
[ImgBot] Optimize images (#1767)
imgbot[bot] Nov 22, 2021
4e867ca
Report modal styles and cut off fix (#1766)
tanmoyAtb Nov 23, 2021
ea0e03f
Fix Mobile Nav Drawer blocks breadcrumb (#1768)
FSM1 Nov 23, 2021
57028b1
secondary colors update (#1769)
tanmoyAtb Nov 23, 2021
99c3cce
File info modal CID and Key copy arrangements (#1773)
tanmoyAtb Nov 24, 2021
a011e6f
fix share transfer modal alignment (#1774)
FSM1 Nov 24, 2021
d1d8b62
move pr template to .github root dir (#1776)
asnaith Nov 24, 2021
484b7f1
UI fix (#1777)
tanmoyAtb Nov 25, 2021
2c1ea37
resolve double tap (#1778)
FSM1 Nov 25, 2021
1335725
Mobile sharing folder rename modal (#1779)
RyRy79261 Nov 25, 2021
ffa9706
Rename with split extension (#1760)
RyRy79261 Nov 25, 2021
d4b978e
Add ui test coverage for link creation / deletion (#1775)
asnaith Nov 26, 2021
c50aca3
Translated using Weblate (French) (#1784)
weblate Nov 29, 2021
e2dc429
Bump Cypress to 9.1 (#1785)
Tbaut Nov 30, 2021
a31313b
removing gaming dashboard from monorepo (#1790)
FSM1 Dec 1, 2021
85401e9
Fix 0 randomly appearing (#1789)
Tbaut Dec 1, 2021
44fe032
Fix typing issues that appeared with cypress v9.1 upgrade (#1791)
Tbaut Dec 1, 2021
f8e65e3
Edit PR template (#1798)
Tbaut Dec 2, 2021
f1e3828
Heic loader (#1765)
RyRy79261 Dec 2, 2021
9149d5e
change for create (#1797)
Tbaut Dec 3, 2021
9f9e397
attempt fixing storybook build (#1801)
FSM1 Dec 3, 2021
e611241
add sorting header for mobile file browser (#1786)
FSM1 Dec 6, 2021
2139dba
Add header content for selected (#1796)
FSM1 Dec 7, 2021
4674382
Translated using Weblate (French) (#1811)
weblate Dec 7, 2021
f2922a9
fix breaking tests (#1813)
FSM1 Dec 8, 2021
e3778cf
Enforce props on a new line for multiline components (#1807)
Tbaut Dec 8, 2021
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: 2 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/prop-types": 0,
"react/jsx-max-props-per-line": [2, {
"maximum": 1,
"when": "always"
}],
"react/jsx-max-props-per-line": ["error", { "maximum": 1, "when": "always" }],
"react/jsx-first-prop-new-line": ["error", "multiline-multiprop"],
"react/jsx-fragments": "error",
"arrow-spacing": "error",
"space-infix-ops": "error",
Expand Down
15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
closes #

---

Submission checklist:

<!-- Remove anything below that is not applicable -->

#### Layout
- [] Change looks good in the desktop web ui
- - [] Change looks good in the mobile web ui

#### Theme
- [] Components / elements inspected in light mode
- [] Components / elements inspected in dark mode
40 changes: 0 additions & 40 deletions .github/workflows/lingui-extract-gaming.yml

This file was deleted.

4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ Theme context and other utilities for generating and using the theming capabilit

The UI for Chainsafe Files

#### **`packages/gaming-ui`**

The UI for Chainsafe Gaming

#### **`packages/storage-ui`**

The UI for Chainsafe Storage
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"eslint": "^6.8.0",
"eslint-plugin-cypress": "^2.11.3",
"eslint-plugin-no-only-tests": "^2.6.0",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react": "^7.27.1",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-ternary": "^1.0.4",
"npm-run-all": "^4.1.5",
Expand All @@ -38,9 +38,6 @@
"build:files-ui": "yarn wsrun -p files-ui -c build",
"release:files-ui": "yarn wsrun -p files-ui -c release",
"start:files-ui": "yarn wsrun -p files-ui -c start",
"build:gaming-ui": "yarn wsrun -p gaming-ui -c build",
"release:gaming-ui": "yarn wsrun -p gaming-ui -c release",
"start:gaming-ui": "yarn wsrun -p gaming-ui -c start",
"build:storage-ui": "yarn wsrun -p storage-ui -c build",
"release:storage-ui": "yarn wsrun -p storage-ui -c release",
"start:storage-ui": "yarn wsrun -p storage-ui -c start",
Expand Down
2 changes: 1 addition & 1 deletion packages/common-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"scripts": {
"storybook": "start-storybook -p 6006",
"build:storybook": "build-storybook",
"build:storybook": "(export NODE_OPTIONS=--openssl-legacy-provider; build-storybook)",
"build": "rollup -c",
"start": "rollup -c -w",
"lint": "eslint './{src, cypress}/**/*.{js,jsx,ts,tsx}'"
Expand Down
20 changes: 17 additions & 3 deletions packages/common-components/src/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const useStyles = makeStyles(
fill: palette.common.white.main
},
"&:hover": {
backgroundColor: palette.primary.main,
backgroundColor: palette.primary.hover,
color: palette.common.white.main,
...overrides?.Button?.variants?.secondary?.hover
},
Expand All @@ -109,6 +109,20 @@ const useStyles = makeStyles(
},
...overrides?.Button?.variants?.secondary?.root
},
text: {
backgroundColor: "transparent",
color: palette.additional["gray"][9],
"&:hover": {
...overrides?.Button?.variants?.text?.hover
},
"&:focus": {
...overrides?.Button?.variants?.text?.focus
},
"&:active": {
...overrides?.Button?.variants?.text?.active
},
...overrides?.Button?.variants?.text?.root
},
tertiary: {
backgroundColor: palette.additional["gray"][3],
color: palette.common.black.main,
Expand Down Expand Up @@ -293,7 +307,7 @@ interface IButtonProps extends Omit<ReactButton, "size"> {
className?: string
children?: ReactNode | ReactNode[]
fullsize?: boolean
variant?: "link" | "primary" | "secondary" |"tertiary" | "outline" | "dashed" | "danger"
variant?: "link" | "primary" | "secondary" |"tertiary" | "outline" | "dashed" | "danger" | "text"
iconButton?: boolean
size?: "large" | "medium" | "small"
type?: "button" | "submit" | "reset"
Expand Down Expand Up @@ -347,7 +361,7 @@ const Button: React.FC<IButtonProps> = ({
{loading && (
<>
<Loading
type="inherit"
type="initial"
size={16}
/>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const useStyles = makeStyles(
root: {
cursor: "pointer",
display: "flex",
alignItems: "center",
...overrides?.CheckboxInput?.root
},
checkbox: {
Expand Down
7 changes: 7 additions & 0 deletions packages/common-components/src/Icons/icons/Sort.icon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as React from "react"
import createSvgIcon from "../createSvgIcon"
import { ReactComponent as SortSvg } from "../svgs/sort.svg"

export { SortSvg }

export default createSvgIcon(<SortSvg />)
1 change: 1 addition & 0 deletions packages/common-components/src/Icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export { default as SearchIcon, SearchSvg } from "./icons/Search.icon"
export { default as SettingIcon, SettingSvg } from "./icons/Setting.icon"
export { default as ShareAltIcon, ShareAltSvg } from "./icons/ShareAlt.icon"
export { default as StarIcon, StarSvg } from "./icons/Star.icon"
export { default as SortIcon, SortSvg } from "./icons/Sort.icon"
export { default as SunIcon, SunSvg } from "./icons/Sun.icon"
export { default as TableIcon, TableSvg } from "./icons/Table.icon"
export { default as UpdateIcon, UpdateSvg } from "./icons/Update.icon"
Expand Down
4 changes: 1 addition & 3 deletions packages/common-components/src/Icons/svgs/document.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 1 addition & 13 deletions packages/common-components/src/Icons/svgs/ethereum-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/common-components/src/Icons/svgs/sort.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/common-components/src/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ const useStyles = makeStyles(
margin: "auto",
maxHeight: "100%",
overflow: "auto",
alignItems: "center",
"&.xs": {
width: `calc(100% - ${constants.generalUnit * 2}px)`,
maxWidth: breakpoints.width("xs"),
Expand Down
1 change: 0 additions & 1 deletion packages/common-components/src/SelectInput/SelectInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const useStyles = makeStyles(
({ animation, constants, palette, overrides }: ITheme) =>
createStyles({
root: {
margin: 5,
display: "block",
...overrides?.SelectInput?.root
},
Expand Down
56 changes: 42 additions & 14 deletions packages/common-components/src/Spinner/Loading.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from "react"
import React, { useMemo } from "react"
import { ITheme, useTheme } from "@chainsafe/common-theme"

export interface ILoadingProps {
type?: "inherit" | "primary" | "dark" | "light"
type?: "initial" | "primary" | "dark" | "light"
size?: number
className?: string
}
Expand All @@ -13,6 +13,42 @@ const Loading: React.FC<ILoadingProps> = ({
className
}) => {
const theme: ITheme = useTheme()

const uniqueKey = `${Math.random()}-${Math.random()}`

const {
start,
end
} = useMemo(() => {
switch (type) {
case "primary":
return {
start: theme.palette.primary.main,
end: "transparent"
}
case "light":
return {
start: theme.palette.common.white.main,
end: "transparent"
}
case "dark":
return {
start: theme.palette.common.black.main,
end: "transparent"
}
case "initial":
return {
start: "#FFFFFF",
end: "transparent"
}
default:
return {
start: "#FFFFFF",
end: "transparent"
}
}
}, [type, theme.palette])

return (
<svg
width={size}
Expand All @@ -22,35 +58,27 @@ const Loading: React.FC<ILoadingProps> = ({
>
<defs>
<linearGradient
id="gradient"
id={`gradient-${uniqueKey}`}
x1="0%"
y1="0%"
x2="0%"
y2="100%"
>
<stop
offset="0%"
stopColor={
type === "primary"
? theme.palette.primary.main
: type === "dark"
? theme.palette.common.black.main
: theme.palette.additional["gray"][5]
}
stopColor={start}
/>
<stop
offset="100%"
stopColor={
type === "light" ? theme.palette.common.white.main : "transparent"
}
stopColor={end}
/>
</linearGradient>
</defs>
<circle
cx="50"
cy="50"
r="47"
stroke="url(#gradient)"
stroke={`url(#gradient-${uniqueKey})`}
strokeWidth="6"
fill="none"
transform="rotate(90 50 50)"
Expand Down
3 changes: 2 additions & 1 deletion packages/common-components/src/Toasts/ToastContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ const ToastContent = ({ toast, onClose }: ToastContentProps) => {
/>
{onProgressCancel &&
onProgressCancelLoading
? <Loading size={16}
? <Loading
size={16}
className={classes.progressCrossButton} />
: <CloseCirceSvg
className={classes.progressCrossButton}
Expand Down
4 changes: 3 additions & 1 deletion packages/common-components/src/stories/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ export const actionsData = {
onClick: action("onClickButton")
}

type VariantOption = "primary" | "secondary" | "tertiary" | "outline" | "dashed" | "danger" | undefined;
type VariantOption = "primary" | "secondary" | "tertiary" | "link" | "text" | "outline" | "dashed" | "danger" | undefined;
const variantOptions: VariantOption[] = [
"primary",
"outline",
"dashed",
"danger",
"link",
"text",
undefined
]

Expand Down
3 changes: 2 additions & 1 deletion packages/common-components/src/stories/Tabs.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export const TabsDemo = (): React.ReactNode => {
activeKey={tab}
onTabSelect={setTab}
>
<TabPane title="tab 1"
<TabPane
title="tab 1"
tabKey="1"
>
first
Expand Down
9 changes: 5 additions & 4 deletions packages/common-components/src/stories/Toasts.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ const ToastNotificationDemo: React.FC<{toast: ToastParams}> = ({ toast }) => {
<br />
{toasts.map((toast) => (
toast.progress && toast.progress < 80 ? (
<button onClick={() => updateToast(toast.id, {
...toast,
progress: toast.progress !== undefined ? toast.progress + 20 : undefined
})}>
<button
onClick={() => updateToast(toast.id, {
...toast,
progress: toast.progress !== undefined ? toast.progress + 20 : undefined
})}>
increase progress toast
</button>
) : null
Expand Down
12 changes: 12 additions & 0 deletions packages/common-theme/src/Overrides/Button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ export interface IButtonOverride {
focus?: Record<string, any>
active?: Record<string, any>
}
link?: {
root?: Record<string, any>
hover?: Record<string, any>
focus?: Record<string, any>
active?: Record<string, any>
}
text?: {
root?: Record<string, any>
hover?: Record<string, any>
focus?: Record<string, any>
active?: Record<string, any>
}
}
state?: {
danger?: {
Expand Down
Loading