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

feat: changing height and present widget better for mobile #276

Merged
merged 62 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
ae1695d
chore: spike out some changes around changing height and present the …
DNR500 Jul 19, 2024
0c854a1
chore: add the resize of token list
DNR500 Jul 24, 2024
bd96801
feat: get full height working with virtual token list
DNR500 Jul 24, 2024
4217ec1
refactor: folder the token list height into a single hook
DNR500 Jul 24, 2024
0472381
refactor: fix incorect branch statements
DNR500 Jul 24, 2024
8b4ad79
feat: minor changs to support non full height flex
DNR500 Jul 24, 2024
e04216f
fix: reworkthe bookmarks page to remove scrollbars
DNR500 Jul 24, 2024
d60156a
fix: changes after checks on bookmarks
DNR500 Jul 25, 2024
435a914
feat: allow bookmark list height to be set for flex layout
DNR500 Jul 25, 2024
66c531b
fix: add back in the optimiser for vite
DNR500 Jul 26, 2024
9399468
feat: ensure that dvh units are supported in playground for better pr…
DNR500 Jul 26, 2024
c13f195
fix: revert change after disucss about main page and buton positioning
DNR500 Jul 26, 2024
38e7ed4
feat: get routes expanded to adapt to flex to expand into available s…
DNR500 Jul 26, 2024
2eebefa
feat: ensure that the routes show only the needed space when a few ro…
DNR500 Jul 29, 2024
b78d181
feat: ensure sticky headers still work
DNR500 Jul 29, 2024
9835203
chore: clean up flex layout
DNR500 Jul 29, 2024
0cfc3f7
feat: sticky-style headers suing fixed position
DNR500 Aug 1, 2024
a9c64bc
feat: small token list hight for mobile
DNR500 Aug 1, 2024
27bd21c
feat: improve mobile layout for bookmark pages
DNR500 Aug 2, 2024
a8c9361
feat: adjust the chains select on mobile
DNR500 Aug 5, 2024
b520fef
Merge branch 'main' into LF-3514-improve-widget-height-adjustment
DNR500 Aug 5, 2024
0af090c
fix: transaction details page after merge
DNR500 Aug 5, 2024
2e9ebbb
feat: update page meta for viewport
DNR500 Aug 5, 2024
a33f1de
feat: add layout control
DNR500 Aug 5, 2024
56eb8fa
chore: set of changes from review session
DNR500 Aug 6, 2024
b52165d
chore: remove mobile layout from config and check height is 100%
DNR500 Aug 6, 2024
54d0863
feat: conrol updates and fix for maxHeight
DNR500 Aug 7, 2024
7f323c1
feat: get routes to respect default hieght in default layout
DNR500 Aug 7, 2024
94cba39
feat: improvements to layout control
DNR500 Aug 7, 2024
b6592c4
refactor: export the default max height for use in playground
DNR500 Aug 7, 2024
c993054
feat: get token list to listen to height changes in config
DNR500 Aug 8, 2024
5264bbf
fix: the display of routes
DNR500 Aug 8, 2024
d983e2b
feat: add header and footer controls
DNR500 Aug 8, 2024
755e33e
fix: bookmark page button position and token list positioning
DNR500 Aug 8, 2024
c12431a
refactor: remove use effect to position for header
DNR500 Aug 9, 2024
550a884
refactor: create coupling between header and header adjustment code
DNR500 Aug 9, 2024
62d884f
refactor: clean up
DNR500 Aug 9, 2024
c5a6461
feat: allow the footer to be made sticky
DNR500 Aug 9, 2024
0e8cc71
fix: prevent buggy appear of drawer vaiant
DNR500 Aug 9, 2024
0398d0b
feat: make max-height and default views of the widget present only mi…
DNR500 Aug 9, 2024
0c6bef3
feat: preent broke looking experiences when switching between layouts…
DNR500 Aug 9, 2024
d8cb9d8
Merge branch 'main' into LF-3514-improve-widget-height-adjustment
DNR500 Aug 9, 2024
96e2cba
fix: widget position in playground
DNR500 Aug 11, 2024
a899ed9
fix: next playground build and restore vite config
DNR500 Aug 12, 2024
859b805
refactor: clean up layout controls
DNR500 Aug 12, 2024
4cc7f0a
refactor: clean up plaground tools
DNR500 Aug 12, 2024
d3a2414
feat: disable layout controls when variant is drawer rather than hide
DNR500 Aug 12, 2024
208c908
chore: clean up config file
DNR500 Aug 12, 2024
fe841e4
chore: correct config file
DNR500 Aug 12, 2024
ea6faaf
chore: delete unused components
DNR500 Aug 12, 2024
936a65f
fix: fizes post review
DNR500 Aug 12, 2024
d911798
chore: move layout control out of is dev view flag
DNR500 Aug 12, 2024
5738827
chore: remove ids
DNR500 Aug 12, 2024
af9869a
chore: remove more ids
DNR500 Aug 12, 2024
3a7312c
chore: fixs post review
DNR500 Aug 13, 2024
28bf3f6
feat: allow header to be stles to hide scrolling in full height mode
DNR500 Aug 13, 2024
6936909
feat: support page background in the playground
DNR500 Aug 13, 2024
75d3471
fix: use correct header page background after initial page load
DNR500 Aug 13, 2024
0248c05
fix: ensure that token list can reduce in height
DNR500 Aug 13, 2024
cd5c79b
chore: add fallback for older browsers
DNR500 Aug 13, 2024
3f7cb14
chore: revert page background support
DNR500 Aug 13, 2024
5e97028
chore: remove comment
chybisov Aug 14, 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 packages/widget-playground-vite/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" />
<link rel="shortcut icon" href="/favicon.png" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<link rel="apple-touch-icon" href="/logo192.png" />

<!--
Expand Down
8 changes: 8 additions & 0 deletions packages/widget-playground/src/components/Card/Card.style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ export const CardRowContainer = styled(Box)(({ theme }) => ({
padding: theme.spacing(2),
}));

export const CardRowColumn = styled(Box)(({ theme }) => ({
display: 'flex',
width: '100%',
flexDirection: 'column',
alignItems: 'flex-start',
padding: 0,
}));

export const CardValue = styled(Typography)({
lineHeight: '1.25',
fontWeight: 500,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { safe6DigitHexColor } from '../../../utils';
import { ExpandableCard } from '../../Card';
import {
CapitalizeFirstLetter,
ColorControlContainer,
ColorInput,
ColorSelectorContainer,
ColorSwatch,
ColorSwatches,
} from './DesignControls.style';
Expand Down Expand Up @@ -57,15 +57,15 @@ const ColorSelector = ({
const { setColor } = useConfigActions();

return colorValue ? (
<ColorSelectorContainer {...rest}>
<ColorControlContainer {...rest}>
<CapitalizeFirstLetter>{colorName}</CapitalizeFirstLetter>
<ColorInput
aria-label={`${colorName} color selection`}
type="color"
value={safe6DigitHexColor(colorValue).toUpperCase()}
onChange={(e) => setColor(colorPath, e.target.value)}
/>
</ColorSelectorContainer>
</ColorControlContainer>
) : null;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { autocompleteClasses } from '@mui/material/Autocomplete';
import { inputBaseClasses } from '@mui/material/InputBase';
import { alpha, styled } from '@mui/material/styles';
import { getCardFieldsetBackgroundColor } from '../../../utils';
import { CardRowContainer } from '../../Card';
import { autocompletePopperZIndex } from '../DrawerControls.style';

export const TabButtonsContainer = styled(Box)(({ theme }) => ({
Expand Down Expand Up @@ -100,6 +101,31 @@ export const TabCustomInput = styled(InputBase)<TabButtonProps>(({
};
});

export const Input = styled(InputBase)(({ theme }) => {
return {
minHeight: 56,
width: '100%',

[`.${inputBaseClasses.input}`]: {
minHeight: 56,
width: '100%',
padding: 0,
textAlign: 'center',
'&::placeholder': {
fontSize: '1rem',
fontWeight: 400,
opacity: 0.5,
},
'&::-webkit-outer-spin-button, &::-webkit-inner-spin-button': {
display: 'none',
},
},
backgroundColor: getCardFieldsetBackgroundColor(theme),
borderRadius: theme.shape.borderRadiusSecondary,
boxShadow: `0px 2px 4px ${alpha(theme.palette.common.black, 0.04)}`,
};
});

export const ColorSwatches = styled(Box)(({ theme }) => ({
display: 'flex',
justifyContent: 'flex-end',
Expand All @@ -121,7 +147,7 @@ export const ColorSwatch = styled(
content: '" "',
}));

export const ColorSelectorContainer = styled(Box)(({ theme }) => ({
export const ControlContainer = styled(Box)(({ theme }) => ({
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
Expand All @@ -130,10 +156,26 @@ export const ColorSelectorContainer = styled(Box)(({ theme }) => ({
theme.shape.borderRadius,
theme.shape.borderRadiusSecondary,
),
padding: theme.spacing(0.5),
paddingLeft: theme.spacing(2.5),
padding: theme.spacing(0.5, 2.5),
gap: theme.spacing(0.5),
height: '3.5rem',
minHeight: theme.spacing(7),
}));

export const ColorControlContainer = styled(ControlContainer)(({ theme }) => ({
height: theme.spacing(7),
paddingRight: theme.spacing(0.5),
}));

export const PlaygroundControlsContainer = styled(Box)(({ theme }) => ({
display: 'flex',
flexDirection: 'column',
gap: theme.spacing(1),
marginTop: theme.spacing(1),
}));

export const ControlRowContainer = styled(CardRowContainer)(({ theme }) => ({
paddingLeft: 0,
paddingRight: 0,
}));

export const ColorInput = styled(InputBase)<InputBaseProps>(
Expand Down
Loading