Skip to content

Commit

Permalink
Merge pull request #1864 from oasisprotocol/lw/extension-long-strings
Browse files Browse the repository at this point in the history
Fix long strings overflowing their container in extension layout
  • Loading branch information
lukaw3d authored Apr 1, 2024
2 parents 338485e + d54191d commit 9fd6c69
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 15 deletions.
1 change: 1 addition & 0 deletions .changelog/1864.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix long strings overflowing their container in extension layout
2 changes: 1 addition & 1 deletion src/app/pages/ParaTimesPage/ParaTimeContent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const ParaTimeContent = ({ children, description, header, isLoading }: Pa
? t('paraTimes.common.depositHeader', 'Deposit to ParaTime')
: t('paraTimes.common.withdrawHeader', 'Withdraw from ParaTime'))}
</Heading>
<Box margin={{ bottom: 'large' }} style={{ maxWidth: '550px' }}>
<Box margin={{ bottom: 'large' }} style={{ maxWidth: 'min(100%, 550px)' }}>
<Text
data-testid="paraTime-content-description"
textAlign="center"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ exports[`<ParaTimeSelection /> should render component 1`] = `
</h3>
<div
class="c2"
style="max-width: 550px;"
style="max-width: min(100%, 550px);"
>
<span
class="c3"
Expand All @@ -456,7 +456,7 @@ exports[`<ParaTimeSelection /> should render component 1`] = `
<form>
<div
class="c5"
style="max-width: 300px;"
style="max-width: min(100%, 300px);"
>
<div
class="c6"
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/ParaTimesPage/ParaTimeSelection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const ParaTimeSelection = () => {
onSubmit={navigateToRecipient}
value={transactionForm}
>
<Box style={{ maxWidth: '300px' }}>
<Box style={{ maxWidth: 'min(100%, 300px)' }}>
<Box margin={{ bottom: 'medium' }}>
<FormField name="paraTime" required>
<Select
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ exports[`<ParaTimeTransferType /> should render component 1`] = `
</h3>
<div
class="c2"
style="max-width: 550px;"
style="max-width: min(100%, 550px);"
>
<span
class="c3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ exports[`<ParaTimesPageInaccessible /> should render component 1`] = `
</h3>
<div
class="c2"
style="max-width: 550px;"
style="max-width: min(100%, 550px);"
>
<span
class="c3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ exports[`<TransactionAmount /> should render component 1`] = `
</h3>
<div
class="c2"
style="max-width: 550px;"
style="max-width: min(100%, 550px);"
>
<span
class="c3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ exports[`<TransactionConfirmation /> should render component 1`] = `
</h3>
<div
class="c2"
style="max-width: 550px;"
style="max-width: min(100%, 550px);"
>
<span
class="c3"
Expand Down Expand Up @@ -574,7 +574,7 @@ exports[`<TransactionConfirmation /> should render component 1`] = `
<form>
<div
class="c5"
style="max-width: 450px;"
style="max-width: min(100%, 450px);"
>
<div
class="c6"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const ConfirmationCheckbox = ({
const isMobile = useContext(ResponsiveContext) === 'small'

return (
<Box margin={{ bottom: 'medium' }} style={{ maxWidth: '450px' }}>
<Box margin={{ bottom: 'medium' }} style={{ maxWidth: 'min(100%, 450px)' }}>
<Box margin={{ bottom: 'small' }} responsive={false}>
<AlertBox status={warning ? 'warning' : 'error'}>
<Text textAlign="center" size={isMobile ? '16px' : 'medium'}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ exports[`<TransactionError /> should render component 1`] = `
</h3>
<div
class="c2"
style="max-width: 550px;"
style="max-width: min(100%, 550px);"
>
<span
class="c3"
Expand Down Expand Up @@ -473,7 +473,7 @@ exports[`<TransactionError /> should render component 1`] = `
>
<div
class="c5"
style="max-width: 550px;"
style="max-width: min(100%, 550px);"
>
<svg
aria-label="Status is critical"
Expand Down
7 changes: 6 additions & 1 deletion src/app/pages/ParaTimesPage/TransactionError/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ export const TransactionError = () => {
}
>
{transactionError && (
<Box margin={{ bottom: 'medium' }} align="center" gap="medium" style={{ maxWidth: '550px' }}>
<Box
margin={{ bottom: 'medium' }}
align="center"
gap="medium"
style={{ maxWidth: 'min(100%, 550px)' }}
>
<StatusCritical size="80px" color="status-error" />
<AlertBox status="error">
<ErrorFormatter code={transactionError.code} message={transactionError.message} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ exports[`<TransactionRecipient /> should render component 1`] = `
</h3>
<div
class="c2"
style="max-width: 550px;"
style="max-width: min(100%, 550px);"
>
<span
class="c3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ exports[`<TransactionSummary /> should render component 1`] = `
</h3>
<div
class="c2"
style="max-width: 550px;"
style="max-width: min(100%, 550px);"
>
<span
class="c3"
Expand Down

0 comments on commit 9fd6c69

Please sign in to comment.