Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
3026e87
fix(web): vote-stake-data
nhestrompia Aug 28, 2023
4bbf258
fix: fraction digits
nhestrompia Aug 28, 2023
72d64dd
feat(web): navbar and footer for desktop
kemuru Sep 2, 2023
7968527
fix(web): merge conflicts and fix new bugs
kemuru Sep 2, 2023
9db8b0f
fix(web): better code structure, optimizations, community section, po…
kemuru Sep 2, 2023
d133b69
Merge branch 'dev' into feat(web)/desktop-navbar-and-responsiveness
kemuru Sep 2, 2023
0b69de6
fix: some layout adjustments
nhestrompia Sep 2, 2023
26e761b
fix(web): dont display chain on tablet
kemuru Sep 3, 2023
b810481
fix(web): css top property adjustment on navbar popups
kemuru Sep 3, 2023
d0612bc
fix(web): dashboard juror info desktop responsive
kemuru Sep 4, 2023
fbe85a3
Merge branch 'dev' into feat(web)/desktop-navbar-and-responsiveness
kemuru Sep 4, 2023
8cc0eb0
fix(web): make dashboard look less spacew on desktop
kemuru Sep 4, 2023
4a4e402
fix(web): accurate paddings and distances between components in desktop
kemuru Sep 4, 2023
36c736b
fix(web): show some separator in case of not being staked anywhere
kemuru Sep 4, 2023
758807d
fix(web): community section more tablet responsive
kemuru Sep 5, 2023
1700914
fix(web): bug in desktop view community section
kemuru Sep 5, 2023
61bae81
fix(web): stats paddings adjustments for desktop
kemuru Sep 6, 2023
caafd1d
feat(web): cases-grid-and-list-display
nhestrompia Sep 6, 2023
6fd16e8
refactor(web): use different hook for window size
kemuru Sep 7, 2023
06eb085
feat(web): multiple changes to css across all frontend
kemuru Sep 9, 2023
f27a98d
fix: mobile responsiveness
nhestrompia Sep 10, 2023
dff027b
feat(web): disable appeal tab on last round and add info message
kemuru Aug 23, 2023
b91ec3a
fix: last appeal round
nhestrompia Aug 25, 2023
d628e21
refactor(web): make website mobile first, landscape, portrait later, …
kemuru Sep 11, 2023
6d76597
fix(web): font-weight of wallet address and margin top on Navbar
kemuru Sep 11, 2023
f708cfe
fix(web): center vertically middle side component of desktop header
kemuru Sep 11, 2023
d05f196
fix(web): weird min-height property causing problems
kemuru Sep 11, 2023
d7c876c
refactor(web): remove classname syntax for boolean in styled components
kemuru Sep 11, 2023
633f50f
fix: responsive layout
nhestrompia Sep 12, 2023
dff0822
fix: dashboard list view
nhestrompia Sep 12, 2023
d233f69
fix: code smell
nhestrompia Sep 12, 2023
92f09ad
refactor(web): remove header link classname
alcercu Sep 12, 2023
2407264
Merge branch 'dev' into feat(web)/desktop-navbar-and-responsiveness
alcercu Sep 12, 2023
bca7542
fix(web): useToggle instead of useState to avoid re-renders
alcercu Sep 12, 2023
505d322
Merge branch 'feat(web)/desktop-navbar-and-responsiveness' of github.…
alcercu Sep 12, 2023
0a7e5ce
fix(web): memoize mobile header context to improve performance
alcercu Sep 12, 2023
2288b77
feat(web): style scrollbar a bit and add placeholder if not scrollabl…
kemuru Sep 13, 2023
7e3dc94
fix: change vote stake formula
nhestrompia Sep 13, 2023
f7f1dec
Merge branch 'web-staging' into fix(web)/vote-stake-data
alcercu Sep 13, 2023
88cb3ca
Merge pull request #1200 from kleros/fix(web)/vote-stake-data
alcercu Sep 13, 2023
8490c32
feat(web): add overlay scrollbars plugin, style it, lock functionality
kemuru Sep 13, 2023
00fb81b
fix(web): weird lines beloe hero svgs fix
kemuru Sep 14, 2023
673c60a
fix: responsive layout adjustments
nhestrompia Sep 15, 2023
d3a54c7
fix: dashboard layout
nhestrompia Sep 15, 2023
ed60559
fix(web): juror-score-data
nhestrompia Sep 15, 2023
5952d68
fix(web): scrolling problem on navbar and overlay component restructu…
kemuru Sep 15, 2023
566e38e
fix(web): settings not scrollable on landscape mobile
kemuru Sep 15, 2023
10ce5bb
fix(web): dont show the custom overlaid scrollbar on mobile
kemuru Sep 15, 2023
11839a6
Merge branch 'web-staging' into feat(web)/new-scrollbar-and-placeholder
alcercu Sep 15, 2023
0c056c0
Merge pull request #1229 from kleros/feat(web)/new-scrollbar-and-plac…
alcercu Sep 15, 2023
463722a
fix: merge conflicts, fix scrolling bugs, overlay component bugs
kemuru Sep 16, 2023
0dd543c
Merge pull request #1211 from kleros/feat(web)/desktop-navbar-and-res…
alcercu Sep 18, 2023
475f6dd
feat(merge): web-staging
alcercu Sep 18, 2023
9b97263
Merge pull request #1219 from kleros/feat(web)/cases-grid-and-list-di…
alcercu Sep 18, 2023
d3ebfe8
Merge branch 'web-staging' into fix(web)/disable-appeal-tab-on-last-r…
alcercu Sep 18, 2023
464fd49
Merge pull request #1184 from kleros/fix(web)/disable-appeal-tab-on-l…
alcercu Sep 18, 2023
48092dd
Merge branch 'web-staging' into fix(web)/juror-score-data
alcercu Sep 18, 2023
8a59cf0
Merge pull request #1230 from kleros/fix(web)/juror-score-data
alcercu Sep 18, 2023
03d1634
fix(web): layout unexpected paddings
kemuru Sep 20, 2023
4ff756e
fix: ens-address-and-icon
nhestrompia Sep 20, 2023
d1e355a
Merge pull request #1237 from kleros/fix(web)/ens-address-and-icon
alcercu Sep 20, 2023
69d61b9
Merge pull request #1236 from kleros/fix(web)/padding-bottom-homepage
alcercu Sep 20, 2023
e06e1fd
Merge branch 'dev' into web-staging
jaybuidl Sep 25, 2023
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: 2 additions & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@
"graphql": "^16.7.1",
"graphql-request": "~6.1.0",
"moment": "^2.29.4",
"overlayscrollbars": "^2.3.0",
"overlayscrollbars-react": "^0.5.2",
"react": "^18.2.0",
"react-chartjs-2": "^4.3.1",
"react-dom": "^18.2.0",
Expand Down
23 changes: 13 additions & 10 deletions web/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import "react-toastify/dist/ReactToastify.css";
import Web3Provider from "context/Web3Provider";
import QueryClientProvider from "context/QueryClientProvider";
import StyledComponentsProvider from "context/StyledComponentsProvider";
import { FilterProvider } from "context/FilterProvider";
import RefetchOnBlock from "context/RefetchOnBlock";
import Layout from "layout/index";
import Home from "./pages/Home";
Expand All @@ -20,16 +21,18 @@ const App: React.FC = () => {
<QueryClientProvider>
<RefetchOnBlock />
<Web3Provider>
<SentryRoutes>
<Route path="/" element={<Layout />}>
<Route index element={<Home />} />
<Route path="cases/*" element={<Cases />} />
<Route path="courts/*" element={<Courts />} />
<Route path="dashboard" element={<Dashboard />} />
<Route path="disputeTemplate" element={<DisputeTemplateView />} />
<Route path="*" element={<h1>Justice not found here ¯\_( ͡° ͜ʖ ͡°)_/¯</h1>} />
</Route>
</SentryRoutes>
<FilterProvider>
<SentryRoutes>
<Route path="/" element={<Layout />}>
<Route index element={<Home />} />
<Route path="cases/*" element={<Cases />} />
<Route path="courts/*" element={<Courts />} />
<Route path="dashboard" element={<Dashboard />} />
<Route path="disputeTemplate" element={<DisputeTemplateView />} />
<Route path="*" element={<h1>Justice not found here ¯\_( ͡° ͜ʖ ͡°)_/¯</h1>} />
</Route>
</SentryRoutes>
</FilterProvider>
</Web3Provider>
</QueryClientProvider>
</StyledComponentsProvider>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions web/src/assets/svgs/icons/grid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions web/src/assets/svgs/icons/list.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions web/src/assets/svgs/icons/vea.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 0 additions & 10 deletions web/src/assets/svgs/socialmedia/twitter.svg

This file was deleted.

3 changes: 3 additions & 0 deletions web/src/assets/svgs/socialmedia/x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 45 additions & 7 deletions web/src/components/CasesDisplay/CasesGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,38 @@
import React from "react";
import styled from "styled-components";
import styled, { css } from "styled-components";
import { StandardPagination } from "@kleros/ui-components-library";
import { landscapeStyle } from "styles/landscapeStyle";
import { useFiltersContext } from "context/FilterProvider";
import { CasesPageQuery } from "queries/useCasesQuery";
import DisputeCard from "components/DisputeCard";
import CasesListHeader from "./CasesListHeader";
import { useLocation } from "react-router-dom";

const Container = styled.div`
const GridContainer = styled.div<{ path: string }>`
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
gap: 8px;
${({ path }) =>
landscapeStyle(() =>
path === "/dashboard"
? css`
display: flex;
`
: css`
display: grid;
row-gap: 16px;
column-gap: 8px;
grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
justify-content: space-between;
`
)}
`;
const ListContainer = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
gap: 8px;
`;

Expand All @@ -26,13 +51,26 @@ export interface ICasesGrid {
}

const CasesGrid: React.FC<ICasesGrid> = ({ disputes, currentPage, setCurrentPage, numberDisputes, casesPerPage }) => {
const { isList } = useFiltersContext();
const location = useLocation();

const path = location.pathname;
return (
<>
<Container>
{disputes.map((dispute, i) => {
return <DisputeCard key={i} {...dispute} />;
})}
</Container>
{!isList ? (
<GridContainer path={path}>
{disputes.map((dispute) => {
return <DisputeCard key={dispute?.id} {...dispute} />;
})}
</GridContainer>
) : (
<ListContainer>
{isList && <CasesListHeader />}
{disputes.map((dispute) => {
return <DisputeCard key={dispute?.id} {...dispute} />;
})}
</ListContainer>
)}
<StyledPagination
{...{ currentPage }}
numPages={Math.ceil(numberDisputes / casesPerPage)}
Expand Down
73 changes: 73 additions & 0 deletions web/src/components/CasesDisplay/CasesListHeader.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import React from "react";
import styled, { css } from "styled-components";
import { landscapeStyle } from "styles/landscapeStyle";
import WithHelpTooltip from "pages/Dashboard/WithHelpTooltip";

const Container = styled.div`
display: flex;
justify-content: space-between;
gap: calc(15vw + (40 - 15) * ((100vw - 300px) / (1250 - 300)));
width: 100%;
height: 100%;
`;

const CasesData = styled.div`
display: flex;
align-items: center;
justify-content: space-around;
width: 100%;
margin-left: calc(0px + (33) * (100vw - 370px) / (1250 - 370));
flex-wrap: wrap;
padding: 0 3%;
gap: calc(24px + (48 - 24) * ((100vw - 300px) / (1250 - 300)));
`;

const CaseTitle = styled.div`
display: none;
margin-left: 32px;
gap: 36px;
label {
font-weight: 400;
font-size: 14px;
line-height: 19px;
color: ${({ theme }) => theme.secondaryText} !important;
}

${landscapeStyle(
() =>
css`
display: flex;
`
)}
`;

const StyledLabel = styled.label`
padding-left: calc(4px + (8 - 4) * ((100vw - 300px) / (900 - 300)));
`;

const tooltipMsg =
"Users have an economic interest in serving as jurors in Kleros: " +
"collecting the Juror Rewards in exchange for their work. Each juror who " +
"is coherent with the final ruling receive the Juror Rewards composed of " +
"arbitration fees (ETH) + PNK redistribution between jurors.";

const CasesListHeader: React.FC = () => {
return (
<Container>
<CaseTitle>
<label>#</label>
<label>Title</label>
</CaseTitle>
<CasesData>
<StyledLabel>Court</StyledLabel>
<StyledLabel>Category</StyledLabel>
<WithHelpTooltip place="top" {...{ tooltipMsg }}>
<label> Rewards: </label>
</WithHelpTooltip>
<label>Next Deadline</label>
</CasesData>
</Container>
);
};

export default CasesListHeader;
55 changes: 54 additions & 1 deletion web/src/components/CasesDisplay/Filters.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import React from "react";
import styled, { useTheme } from "styled-components";
import styled, { useTheme, css } from "styled-components";
import { useWindowSize } from "react-use";
import { DropdownSelect } from "@kleros/ui-components-library";
import { useFiltersContext } from "context/FilterProvider";
import { BREAKPOINT_LANDSCAPE } from "styles/landscapeStyle";
import ListIcon from "svgs/icons/list.svg";
import GridIcon from "svgs/icons/grid.svg";

const Container = styled.div`
display: flex;
Expand All @@ -9,8 +14,44 @@ const Container = styled.div`
width: fit-content;
`;

const glowingEffect = css`
filter: drop-shadow(0 0 4px ${({ theme }) => theme.klerosUIComponentsSecondaryPurple});
`;

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

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

const StyledListIcon = styled(ListIcon)<{ isList: boolean; isScreenBig: boolean }>`
cursor: pointer;
display: ${({ isScreenBig }) => (isScreenBig ? "block" : "none")};
transition: filter 0.2s ease;
fill: ${({ theme }) => theme.primaryBlue};
width: 16px;
height: 16px;
overflow: hidden;
${({ isList }) => isList && glowingEffect}
`;

const Filters: React.FC = () => {
const theme = useTheme();
const { width } = useWindowSize();
const { isList, setIsList } = useFiltersContext();
const screenIsBig = width > BREAKPOINT_LANDSCAPE;

return (
<Container>
<DropdownSelect
Expand All @@ -35,6 +76,18 @@ const Filters: React.FC = () => {
defaultValue={0}
callback={() => {}}
/>
<IconsContainer>
<StyledGridIcon isList={isList} onClick={() => setIsList(false)} />
<StyledListIcon
isList={isList}
isScreenBig={screenIsBig}
onClick={() => {
if (screenIsBig) {
setIsList(true);
}
}}
/>
</IconsContainer>
</Container>
);
};
Expand Down
Loading