-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2024-10-14] [$100] Migrate DeeplinkRedirectLoadingIndicator from withOnyx to useOnyx #49104
Comments
Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha ( |
Triggered auto assignment to @lschurr ( |
seems like upwork automation didn't work 😞 |
Dibs |
Job added to Upwork: https://www.upwork.com/jobs/~021834282172274819617 |
Current assignee @getusha is eligible for the External assigner, not assigning anyone new. |
Upwork job price has been updated to $100 |
This comment was marked as resolved.
This comment was marked as resolved.
@Nodebrute Your proposal will be dismissed because you did not follow the proposal template. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Migrate DeeplinkRedirectLoadingIndicator from withOnyx to useOnyx What is the root cause of that problem?Feature request What changes do you think we should make in order to solve the problem?We can remove this withOnyx
and then we can use
Optional: we can also remove type props What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Migrate src/components/DeeplinkWrapper/DeeplinkRedirectLoadingIndicator.tsx to use useOnyx instead of withOnyx. What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
import React from 'react';
import {View} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import {useOnyx} from 'react-native-onyx';
import Icon from '@components/Icon';
import * as Expensicons from '@components/Icon/Expensicons';
import * as Illustrations from '@components/Icon/Illustrations';
import Text from '@components/Text';
import TextLink from '@components/TextLink';
import useLocalize from '@hooks/useLocalize';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import Navigation from '@libs/Navigation/Navigation';
import ONYXKEYS from '@src/ONYXKEYS';
import type * as OnyxTypes from '@src/types/onyx';
type DeeplinkRedirectLoadingIndicatorOnyxProps = {
/** Current user session */
session: OnyxEntry<OnyxTypes.Session>;
};
type DeeplinkRedirectLoadingIndicatorProps = DeeplinkRedirectLoadingIndicatorOnyxProps & {
/** Opens the link in the browser */
openLinkInBrowser: (value: boolean) => void;
};
function DeeplinkRedirectLoadingIndicator({openLinkInBrowser}: DeeplinkRedirectLoadingIndicatorProps) {
const {translate} = useLocalize();
const theme = useTheme();
const styles = useThemeStyles();
const [session] = useOnyx(ONYXKEYS.SESSION);
return (
<View style={styles.deeplinkWrapperContainer}>
<View style={styles.deeplinkWrapperMessage}>
<View style={styles.mb2}>
<Icon
width={200}
height={164}
src={Illustrations.RocketBlue}
/>
</View>
<Text style={[styles.textHeadline, styles.textXXLarge]}>{translate('deeplinkWrapper.launching')}</Text>
<View style={[styles.mt2, styles.textAlignCenter]}>
<Text>{translate('deeplinkWrapper.loggedInAs', {email: session?.email ?? ''})}</Text>
<Text style={[styles.textAlignCenter]}>
{translate('deeplinkWrapper.doNotSeePrompt')} <TextLink onPress={() => openLinkInBrowser(true)}>{translate('deeplinkWrapper.tryAgain')}</TextLink>
{translate('deeplinkWrapper.or')} <TextLink onPress={() => Navigation.goBack()}>{translate('deeplinkWrapper.continueInWeb')}</TextLink>.
</Text>
</View>
</View>
<View style={styles.deeplinkWrapperFooter}>
<Icon
width={154}
height={34}
fill={theme.success}
src={Expensicons.ExpensifyWordmark}
/>
</View>
</View>
);
}
DeeplinkRedirectLoadingIndicator.displayName = 'DeeplinkRedirectLoadingIndicator';
export default DeeplinkRedirectLoadingIndicator; What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
📣 @Nodebrute 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Assigning to @Nodebrute on a first-come-first-serve basis. @BhuvaneshPatil is assigned to two other migrations already |
PR is on staging. @puneetlath choosing you at random to assign here just in case the PR is reverted and further internal engineering help is needed. |
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.45-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-10-14. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Payment summary:
|
This was a migration issue, i don't think we need a checklist. |
$100 approved for @getusha |
Coming from https://expensify.slack.com/archives/C01GTK53T8Q/p1725973460005309?thread_ts=1725905735.105989&cid=C01GTK53T8Q
Migrate
src/components/DeeplinkWrapper/DeeplinkRedirectLoadingIndicator.tsx
to useuseOnyx
instead ofwithOnyx
.Issue Owner
Current Issue Owner: @Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @lschurr / @lschurrThe text was updated successfully, but these errors were encountered: