-
Notifications
You must be signed in to change notification settings - Fork 1
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
Upgrade React Native Paper and Fix Warnings #518
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,7 +111,6 @@ export const SearchRecipientsModal = ({ | |
mode="contained" | ||
style={styles.doneButton} | ||
labelStyle={styles.doneButtonLabel} | ||
compact={true} | ||
onPress={() => hideSelf()} | ||
> | ||
{t('next-button', 'Done')} | ||
|
@@ -125,8 +124,6 @@ const defaultStyles = createStyles('SearchRecipientsModal', (theme) => { | |
rootView: { | ||
backgroundColor: theme.colors.elevation.level1, | ||
height: Platform.select({ android: '90%', default: '100%' }), | ||
width: '90%', | ||
marginHorizontal: '5%', | ||
Comment on lines
-128
to
-129
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spacing is now handled by the modal. Spacing on the modal was necessary to achieve the same style while also setting a background to avoid the RTCView warning. |
||
}, | ||
scrollView: { minHeight: '80%' }, | ||
listItem: { | ||
|
@@ -152,7 +149,6 @@ const defaultStyles = createStyles('SearchRecipientsModal', (theme) => { | |
marginVertical: 16, | ||
marginRight: 16, | ||
height: 35, | ||
width: 55, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After the upgrade this was causing the text to be truncated. |
||
alignSelf: 'center', | ||
}, | ||
doneButtonLabel: { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ export const TraceLine = (props: Props) => { | |
const yDomain = [domainMin, domainMax] as [number, number]; | ||
|
||
const trend = useMemo(() => { | ||
if (showTrend) { | ||
if (showTrend && data.length > 1) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should only show the trend if it has 2+ points. A single point produces a flat trend which isn't meaningful and 0 points causes a NaN error because of division by zero. |
||
const xAvg = sumBy(data, 'x') / data.length; | ||
const yAvg = sumBy(data, 'y') / data.length; | ||
const sumOfProducts = sumBy(data, (d) => (d.x - xAvg) * (d.y - yAvg)); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ export function ScreenSurface({ | |
const defaultStyles = createStyles('ScreenSurface', (theme) => ({ | ||
surfaceView: { | ||
flex: 1, | ||
height: '100%', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After the upgrade a react native paper surface must have a height set to flex properly. |
||
backgroundColor: theme.colors.elevation.level1, | ||
}, | ||
scrollView: {}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ export const BottomNavigationBar = ({ | |
? options.tabBarLabel | ||
: options.title !== undefined | ||
? options.title | ||
: route.title; | ||
: route.name; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After the upgrade the title property was removed. We now default to name, however, in practice this should never happen. |
||
|
||
return label; | ||
}} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,8 +122,7 @@ export function MessageScreen<ParamList extends ParamListBase>({ | |
<View | ||
style={{ | ||
flexDirection: 'row', | ||
flex: 1, | ||
maxWidth: 60, | ||
width: 60, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After the upgrade the message avatars did not display correctly. Setting a static width solved this problem. |
||
}} | ||
> | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the upgrade this was causing the button text to be truncated