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

Upgrade to React 18 #1246

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
994 changes: 203 additions & 791 deletions __tests__/components/__snapshots__/date-time-options.js.snap

Large diffs are not rendered by default.

71,954 changes: 5,957 additions & 65,997 deletions __tests__/components/viewers/__snapshots__/nearby-view.js.snap

Large diffs are not rendered by default.

348 changes: 50 additions & 298 deletions __tests__/components/viewers/__snapshots__/stop-schedule-viewer.ts.snap
Original file line number Diff line number Diff line change
@@ -1,309 +1,61 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`components > viewers > stop viewer should render with initial stop id and no stop times 1`] = `
<IntlProvider
defaultFormats={Object {}}
defaultLocale="en-US"
formats={Object {}}
locale="en-US"
messages={Object {}}
onError={[Function]}
textComponent={Symbol(react.fragment)}
>
<Provider
store={
Object {
"clearActions": [Function],
"dispatch": [Function],
"getActions": [Function],
"getState": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
}
}
<div>
<div
class="stop-viewer base-color-bg"
>
<injectIntl(WrappedComponent)>
<WrappedComponent
intl={
Object {
"defaultFormats": Object {},
"defaultLocale": "en-US",
"defaultRichTextElements": undefined,
"formatDate": [Function],
"formatDateTimeRange": [Function],
"formatDateToParts": [Function],
"formatDisplayName": [Function],
"formatList": [Function],
"formatListToParts": [Function],
"formatMessage": [Function],
"formatNumber": [Function],
"formatNumberToParts": [Function],
"formatPlural": [Function],
"formatRelativeTime": [Function],
"formatTime": [Function],
"formatTimeToParts": [Function],
"formats": Object {},
"formatters": Object {
"getDateTimeFormat": [Function],
"getDisplayNames": [Function],
"getListFormat": [Function],
"getMessageFormat": [Function],
"getNumberFormat": [Function],
"getPluralRules": [Function],
"getRelativeTimeFormat": [Function],
},
"locale": "en-US",
"messages": Object {},
"onError": [Function],
"textComponent": Symbol(react.fragment),
"timeZone": undefined,
"wrapRichTextChunksInFragment": undefined,
}
}
<div
class="stop-viewer-header"
>
<div
class="back-button-container"
>
<Connect(StopScheduleViewer)
intl={
Object {
"defaultFormats": Object {},
"defaultLocale": "en-US",
"defaultRichTextElements": undefined,
"formatDate": [Function],
"formatDateTimeRange": [Function],
"formatDateToParts": [Function],
"formatDisplayName": [Function],
"formatList": [Function],
"formatListToParts": [Function],
"formatMessage": [Function],
"formatNumber": [Function],
"formatNumberToParts": [Function],
"formatPlural": [Function],
"formatRelativeTime": [Function],
"formatTime": [Function],
"formatTimeToParts": [Function],
"formats": Object {},
"formatters": Object {
"getDateTimeFormat": [Function],
"getDisplayNames": [Function],
"getListFormat": [Function],
"getMessageFormat": [Function],
"getNumberFormat": [Function],
"getPluralRules": [Function],
"getRelativeTimeFormat": [Function],
},
"locale": "en-US",
"messages": Object {},
"onError": [Function],
"textComponent": Symbol(react.fragment),
"timeZone": undefined,
"wrapRichTextChunksInFragment": undefined,
}
}
<button
class="btn btn-sm btn-default"
type="button"
>
<StopScheduleViewer
calendarMax="2025-12-31"
calendarMin="2024-01-01"
findStopTimesForStop={[Function]}
homeTimezone="America/Los_Angeles"
intl={
Object {
"defaultFormats": Object {},
"defaultLocale": "en-US",
"defaultRichTextElements": undefined,
"formatDate": [Function],
"formatDateTimeRange": [Function],
"formatDateToParts": [Function],
"formatDisplayName": [Function],
"formatList": [Function],
"formatListToParts": [Function],
"formatMessage": [Function],
"formatNumber": [Function],
"formatNumberToParts": [Function],
"formatPlural": [Function],
"formatRelativeTime": [Function],
"formatTime": [Function],
"formatTimeToParts": [Function],
"formats": Object {},
"formatters": Object {
"getDateTimeFormat": [Function],
"getDisplayNames": [Function],
"getListFormat": [Function],
"getMessageFormat": [Function],
"getNumberFormat": [Function],
"getPluralRules": [Function],
"getRelativeTimeFormat": [Function],
},
"locale": "en-US",
"messages": Object {},
"onError": [Function],
"textComponent": Symbol(react.fragment),
"timeZone": undefined,
"wrapRichTextChunksInFragment": undefined,
}
}
showBlockIds={false}
stopId="TriMet:13170"
transitOperators={Array []}
zoomToPlace={[Function]}
<div
style="display: contents;"
>
<div
className="stop-viewer base-color-bg"
<span
class="sc-jifHHV sc-hkwmXC frJUIW gWGcte"
>
<Connect(PageTitle)
title={
Array [
"components.StopViewer.titleBarStopId",
"components.StopViewer.schedule",
]
}
<svg
aria-hidden="true"
class="StyledIconBase-sc-ea9ulj-0 fqiNOa"
fill="currentColor"
focusable="false"
viewBox="0 0 448 512"
xmlns="http://www.w3.org/2000/svg"
>
<PageTitle
appTitle=""
dispatch={[Function]}
title={
Array [
"components.StopViewer.titleBarStopId",
"components.StopViewer.schedule",
]
}
<path
d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H109.3l105.3-105.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"
fill="currentColor"
/>
</Connect(PageTitle)>
<Connect(ServiceTimeRangeRetriever)>
<ServiceTimeRangeRetriever
retrieveServiceTimeRangeIfNeeded={[Function]}
/>
</Connect(ServiceTimeRangeRetriever)>
<div
className="stop-viewer-header"
>
<div
className="back-button-container"
>
<Button
active={false}
block={false}
bsClass="btn"
bsSize="small"
bsStyle="default"
disabled={false}
onClick={[Function]}
>
<button
className="btn btn-sm btn-default"
disabled={false}
onClick={[Function]}
type="button"
>
<IconWithText
Icon={
Object {
"$$typeof": Symbol(react.forward_ref),
"displayName": "ArrowLeft",
"render": [Function],
}
}
>
<div
style={
Object {
"display": "contents",
}
}
>
<Styled(styled.span)>
<span
className="sc-jifHHV sc-hkwmXC frJUIW gWGcte"
>
<ArrowLeft>
<StyledIconBase
iconAttrs={
Object {
"fill": "currentColor",
"xmlns": "http://www.w3.org/2000/svg",
}
}
iconVerticalAlign="middle"
iconViewBox="0 0 448 512"
>
<ForwardRef
className="StyledIconBase-sc-ea9ulj-0 fqiNOa"
iconAttrs={
Object {
"fill": "currentColor",
"xmlns": "http://www.w3.org/2000/svg",
}
}
iconVerticalAlign="middle"
iconViewBox="0 0 448 512"
>
<svg
aria-hidden="true"
className="StyledIconBase-sc-ea9ulj-0 fqiNOa"
fill="currentColor"
focusable="false"
viewBox="0 0 448 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H109.3l105.3-105.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"
fill="currentColor"
/>
</svg>
</ForwardRef>
</StyledIconBase>
</ArrowLeft>
</span>
</Styled(styled.span)>
<span>
<FormattedMessage
id="common.forms.back"
>
common.forms.back
</FormattedMessage>
</span>
</div>
</IconWithText>
</button>
</Button>
</div>
<styled.div>
<div
className="sc-hJxDiT dbjOgr"
>
<styled.div>
<div
className="sc-jlIlqL sdJoA"
>
<h1>
<FormattedMessage
id="components.StopViewer.loadingText"
>
components.StopViewer.loadingText
</FormattedMessage>
</h1>
</div>
</styled.div>
</div>
</styled.div>
<Connect(FavoriteStopToggle)>
<FavoriteStopToggle
forgetStop={[Function]}
isFavoriteStop={false}
rememberStop={[Function]}
/>
</Connect(FavoriteStopToggle)>
<div
style={
Object {
"clear": "both",
}
}
/>
</div>
</div>
</StopScheduleViewer>
</Connect(StopScheduleViewer)>
</WrappedComponent>
</injectIntl(WrappedComponent)>
</Provider>
</IntlProvider>
</svg>
</span>
<span>
common.forms.back
</span>
</div>
</button>
</div>
<div
class="sc-hJxDiT dbjOgr"
>
<div
class="sc-jlIlqL sdJoA"
>
<h1>
components.StopViewer.loadingText
</h1>
</div>
</div>
<div
style="clear: both;"
/>
</div>
</div>
</div>
`;
Loading
Loading