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

ENG-2696: Fix restore seed phrase screen scroll #700

Merged
merged 10 commits into from
Jan 15, 2024
3 changes: 2 additions & 1 deletion src/app/components/extendedScreenContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import styled from 'styled-components';
const ExtendedScreenRouteContainer = styled.div((props) => ({
display: 'flex',
flexDirection: 'column',
height: '100vh',
height: '100%',
minHeight: '100vh',
Comment on lines +9 to +10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question as below.

did you check that this doesn't break the other screens which open up via options.html?
e.g. any of the collectibles screens when you click 'Open gallery' button, or the ledger send flows

width: '100vw',
backgroundColor: props.theme.colors.elevation0,
border: `1px solid ${props.theme.colors.elevation2}`,
Expand Down
10 changes: 4 additions & 6 deletions src/app/components/seedPhraseInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,10 @@ export default function SeedPhraseInput({

const handlePaste = (pastedText: string) => {
const splitPastedText = pastedText.split(' ');
splitPastedText.forEach((text, index) => {
setSeedInputValues((prevSeed) => {
prevSeed[index] = text;
return [...prevSeed];
});
});
setSeedInputValues((prevSeed) =>
// To prevent unnecessary rerenders
prevSeed.map((value, index) => splitPastedText[index] || value),
);
};

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/screens/restoreWallet/enterSeedphrase.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import ActionButton from '@components/button';
import SeedPhraseInput from '@components/seedPhraseInput';
import React from 'react';
import { useTranslation } from 'react-i18next';
import styled from 'styled-components';

const Container = styled.div({
display: 'flex',
flexDirection: 'column',
flex: 1,
alignSelf: 'flex-start',
});

const Title = styled.h1((props) => ({
Expand Down
3 changes: 2 additions & 1 deletion src/app/screens/restoreWallet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const Body = styled.div(() => ({
display: 'flex',
height: '100%',
justifyContent: 'center',
alignItems: 'center',
alignItems: 'flex-start',
margin: '60px 0',
}));

const Container = styled.div((props) => ({
Expand Down
6 changes: 4 additions & 2 deletions src/pages/Options/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ body {
margin: 0;
padding: 0;
color: #ffffff;
background-color: #0C0C0C;
background-color: #0c0c0c;
position: relative;
overflow-x: hidden;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious what did this solve for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scrnli_1_11_2024_2-24-51.PM.webm

overflow-x: hidden; removes the horizontal scrollbar here

}
header {
display: flex;
Expand All @@ -22,7 +23,8 @@ header h2 {
}

#app-container {
height: 100vh;
height: 100%;
min-height: 100vh;
Comment on lines +26 to +27
Copy link
Member

@teebszet teebszet Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you check that this doesn't break the other screens which open up via options.html?
e.g. any of the collectibles screens when you click 'Open gallery' button, or the ledger send flows

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I did! Attached screenshots to a new comment.

width: 100vw;
display: flex;
flex-direction: column;
Expand Down
Loading