Skip to content

Release v2-testnet-4.0.2 #1801

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

Merged
merged 24 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
26bb22f
feat: update ui library, abstract hover transition style, update favi…
kemuru Dec 14, 2024
985e6eb
Merge branch 'dev' into feat/update-ui-components-library-version-and…
kemuru Dec 14, 2024
7465db0
chore: switch hover effect in appeal's option card
kemuru Dec 15, 2024
0da7cbd
chore: adjust hover effect in card
kemuru Dec 16, 2024
7147c8f
feat: destroying margins, update ui component library
kemuru Dec 16, 2024
79e65e5
Merge branch 'dev' into feat/update-ui-components-library-version-and…
kemuru Dec 16, 2024
b6aad1b
chore: simplify styles
kemuru Dec 16, 2024
3913d04
chore: remove margins from getpnk page
kemuru Dec 16, 2024
3aff981
feat(web): starred-cases
Harman-singh-waraich Dec 16, 2024
3785d5a
refactor(web): rabbit-feedback
Harman-singh-waraich Dec 16, 2024
4bf05d1
Merge branch 'dev' into feat/case-bookmark
Harman-singh-waraich Dec 16, 2024
2b72384
fix(web): stake-input-error-display
Harman-singh-waraich Dec 17, 2024
2a8c9f9
Merge branch 'dev' into feat/update-ui-components-library-version-and…
alcercu Dec 17, 2024
d7416a6
Merge branch 'dev' into feat/case-bookmark
alcercu Dec 17, 2024
cb1cb29
Merge pull request #1792 from kleros/feat/update-ui-components-librar…
alcercu Dec 17, 2024
1c13912
feat: stroke color, ui library, margin adjustments
kemuru Dec 17, 2024
2d3fa5b
Merge branch 'dev' into feat/case-bookmark
Harman-singh-waraich Dec 17, 2024
fb69a01
Merge pull request #1799 from kleros/feat/new-stroke-color-update-ui-…
alcercu Dec 17, 2024
f5e6562
refactor(web): use-set-to-store-favorite-case-ids
Harman-singh-waraich Dec 17, 2024
165bfdc
refactor(web): update-favorite-cases-style
Harman-singh-waraich Dec 17, 2024
1e74faa
Merge branch 'dev' into feat/case-bookmark
alcercu Dec 17, 2024
4849f30
Merge pull request #1794 from kleros/feat/case-bookmark
alcercu Dec 17, 2024
24a9c9c
Merge branch 'dev' into fix/stake-input
alcercu Dec 17, 2024
20ac82c
Merge pull request #1797 from kleros/fix/stake-input
alcercu Dec 17, 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
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"@kleros/kleros-app": "^2.0.1",
"@kleros/kleros-sdk": "workspace:^",
"@kleros/kleros-v2-contracts": "workspace:^",
"@kleros/ui-components-library": "^2.16.0",
"@kleros/ui-components-library": "^2.18.0",
"@lifi/wallet-management": "^3.4.6",
"@lifi/widget": "^3.12.3",
"@sentry/react": "^7.120.0",
Expand Down
1 change: 1 addition & 0 deletions web/src/assets/svgs/icons/star.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions web/src/components/CaseStarButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import React, { useMemo } from "react";
import styled, { css } from "styled-components";

import { Button, Tooltip } from "@kleros/ui-components-library";

import Star from "svgs/icons/star.svg";

import useIsDesktop from "hooks/useIsDesktop";
import useStarredCases from "hooks/useStarredCases";

const StyledButton = styled(Button)<{ starred: boolean }>`
background: none;
padding: 0 0 2px 0;

.button-svg {
width: 24px;
height: 24px;
margin: 0;
fill: none;

path {
stroke: ${({ theme }) => theme.secondaryPurple};
}
${({ starred }) =>
starred &&
css`
fill: ${({ theme }) => theme.secondaryPurple};
`};
}

:hover {
background: none;
}
`;

const CaseStarButton: React.FC<{ id: string }> = ({ id }) => {
const { starredCases, starCase } = useStarredCases();
const isDesktop = useIsDesktop();
const starred = useMemo(() => Boolean(starredCases.has(id)), [id, starredCases]);
const text = starred ? "Remove from favorite" : "Add to favorite";
return (
<Tooltip {...{ text }} place={isDesktop ? "right" : "bottom"}>
<StyledButton
Icon={Star}
text=""
starred={starred}
aria-label={text}
aria-checked={starred}
onClick={(e) => {
e.stopPropagation();
starCase(id);
}}
/>
</Tooltip>
);
};

export default CaseStarButton;
29 changes: 17 additions & 12 deletions web/src/components/CasesDisplay/Filters.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from "react";
import styled, { useTheme } from "styled-components";
import styled, { css, useTheme } from "styled-components";

import { hoverShortTransitionTiming } from "styles/commonStyles";

import { useNavigate, useParams } from "react-router-dom";

Expand All @@ -19,29 +21,32 @@ const Container = styled.div`
width: fit-content;
`;

const StyledGridIcon = styled(GridIcon)`
cursor: pointer;
transition: filter 0.2s ease;
fill: ${({ theme }) => theme.primaryBlue};
width: 16px;
height: 16px;
overflow: hidden;
`;

const IconsContainer = styled.div`
display: flex;
justify-content: center;
align-items: center;
gap: 4px;
`;

const StyledListIcon = styled(ListIcon)`
const BaseIconStyles = css`
${hoverShortTransitionTiming}
cursor: pointer;
transition: filter 0.2s ease;
fill: ${({ theme }) => theme.primaryBlue};
width: 16px;
height: 16px;
overflow: hidden;

:hover {
fill: ${({ theme }) => theme.secondaryBlue};
}
`;

const StyledGridIcon = styled(GridIcon)`
${BaseIconStyles}
`;

const StyledListIcon = styled(ListIcon)`
${BaseIconStyles}
`;

const Filters: React.FC = () => {
Expand Down
10 changes: 4 additions & 6 deletions web/src/components/CasesDisplay/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ import { responsiveSize } from "styles/responsiveSize";
const Container = styled.div`
display: flex;
flex-direction: column;
gap: 4px;
gap: ${responsiveSize(8, 16)};

${landscapeStyle(
() =>
css`
flex-direction: row;
gap: ${responsiveSize(4, 22)};
`
() => css`
flex-direction: row;
`
)}
`;

Expand Down
6 changes: 4 additions & 2 deletions web/src/components/CasesDisplay/StatsAndFilters.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import React from "react";
import styled from "styled-components";

import { responsiveSize } from "styles/responsiveSize";

import Filters from "./Filters";
import Stats, { IStats } from "./Stats";

const Container = styled.div`
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 11px;
margin-bottom: 48px;
margin-top: ${responsiveSize(4, 8)};
margin-bottom: ${responsiveSize(16, 32)};
justify-content: space-between;
`;

Expand Down
2 changes: 1 addition & 1 deletion web/src/components/CasesDisplay/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const TitleContainer = styled.div`
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
margin-bottom: ${responsiveSize(32, 48)};
margin-bottom: ${responsiveSize(12, 24)};
`;

const StyledTitle = styled.h1`
Expand Down
3 changes: 2 additions & 1 deletion web/src/components/DisputePreview/Policies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { getIpfsUrl } from "utils/getIpfsUrl";
import { isUndefined } from "utils/index";

import { responsiveSize } from "styles/responsiveSize";
import { hoverShortTransitionTiming } from "styles/commonStyles";

import { InternalLink } from "components/InternalLink";

Expand Down Expand Up @@ -38,12 +39,12 @@ const StyledPaperclipIcon = styled(PaperclipIcon)`
`;

const StyledInternalLink = styled(InternalLink)`
${hoverShortTransitionTiming}
display: flex;
gap: 4px;

&:hover {
svg {
transition: fill 0.1s;
fill: ${({ theme }) => theme.secondaryBlue};
}
}
Expand Down
9 changes: 3 additions & 6 deletions web/src/components/DisputeView/DisputeCardView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,19 @@ import { Card } from "@kleros/ui-components-library";
import { Periods } from "consts/periods";

import { responsiveSize } from "styles/responsiveSize";
import { hoverShortTransitionTiming } from "styles/commonStyles";

import { StyledSkeleton } from "components/StyledSkeleton";

import DisputeInfo from "./DisputeInfo";
import PeriodBanner from "./PeriodBanner";

const StyledCard = styled(Card)`
${hoverShortTransitionTiming}
width: 100%;
height: 100%;
max-height: 335px;
min-height: 290px;
transition: background-color 0.1s;

&:hover {
background-color: ${({ theme }) => theme.lightGrey}BB;
}
`;

const CardContainer = styled.div`
Expand Down Expand Up @@ -61,7 +58,7 @@ interface IDisputeCardView {
const DisputeCardView: React.FC<IDisputeCardView> = ({ isLoading, ...props }) => {
return (
<Link to={`/cases/${props?.disputeID?.toString()}`}>
<StyledCard>
<StyledCard hover>
<PeriodBanner id={parseInt(props?.disputeID)} period={props?.period} />
<CardContainer>
{isLoading ? <StyledCaseCardTitleSkeleton /> : <TruncatedTitle text={props?.title} maxLength={100} />}
Expand Down
9 changes: 3 additions & 6 deletions web/src/components/DisputeView/DisputeListView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,17 @@ import { Card } from "@kleros/ui-components-library";
import { Periods } from "consts/periods";

import { responsiveSize } from "styles/responsiveSize";
import { hoverShortTransitionTiming } from "styles/commonStyles";

import DisputeInfo from "./DisputeInfo";
import PeriodBanner from "./PeriodBanner";

const StyledListItem = styled(Card)`
${hoverShortTransitionTiming}
display: flex;
flex-grow: 1;
width: 100%;
height: 82px;
transition: background-color 0.1s;

&:hover {
background-color: ${({ theme }) => theme.lightGrey}BB;
}
`;

const ListContainer = styled.div`
Expand Down Expand Up @@ -64,7 +61,7 @@ const DisputeListView: React.FC<IDisputeListView> = (props) => {
const { isDisconnected } = useAccount();
return (
<Link to={`/cases/${props?.disputeID?.toString()}`}>
<StyledListItem>
<StyledListItem hover>
<PeriodBanner isCard={false} id={parseInt(props?.disputeID ?? "0")} period={props.period} />
<ListContainer>
<TitleContainer isLabel={!isDisconnected}>
Expand Down
7 changes: 6 additions & 1 deletion web/src/components/DottedMenuButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from "react";
import styled, { css, keyframes } from "styled-components";

import { hoverShortTransitionTiming } from "styles/commonStyles";

import DottedMenu from "svgs/icons/dotted-menu.svg";

const ripple = keyframes`
Expand Down Expand Up @@ -57,13 +59,16 @@ const Container = styled.div<{ displayRipple: boolean }>`
`;

const ButtonContainer = styled.div`
${hoverShortTransitionTiming}
border-radius: 50%;
z-index: 1;
background-color: ${({ theme }) => theme.lightBackground};

transition: background-color 0.1s;
:hover {
background-color: ${({ theme }) => theme.lightGrey};
svg {
fill: ${({ theme }) => theme.secondaryBlue};
}
}
`;

Expand Down
3 changes: 2 additions & 1 deletion web/src/components/EvidenceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import styled, { css } from "styled-components";

import { landscapeStyle } from "styles/landscapeStyle";
import { responsiveSize } from "styles/responsiveSize";
import { hoverShortTransitionTiming } from "styles/commonStyles";

import Identicon from "react-identicons";
import ReactMarkdown from "react-markdown";
Expand Down Expand Up @@ -165,6 +166,7 @@ const MobileText = styled.span`
`;

const StyledInternalLink = styled(InternalLink)`
${hoverShortTransitionTiming}
display: flex;
gap: ${responsiveSize(5, 6)};
> svg {
Expand All @@ -173,7 +175,6 @@ const StyledInternalLink = styled(InternalLink)`
}

:hover svg {
transition: fill 0.1s;
fill: ${({ theme }) => theme.secondaryBlue};
}
`;
Expand Down
1 change: 0 additions & 1 deletion web/src/components/ExtraStatsDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const Container = styled.div`
display: flex;
gap: 8px;
align-items: center;
margin-top: 24px;
`;

const SVGContainer = styled.div`
Expand Down
Loading
Loading