-
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 #26538][$500] Web - Date/Merchant is disabled for split, but still accessible with deeplink #27565
Comments
Triggered auto assignment to @bfitzexpensify ( |
Job added to Upwork: https://www.upwork.com/jobs/~01c67f584444b66580 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to @puneetlath ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.The Merchant and Date pages within the "Split Bill" flow are accessible via deeplinks, even though they should only be accessible in the "Request Money (IOU)" flow. Here in MoneyRequestConfirmationList component:
We disable the Date and the Merchant fields if the IOU type is not a Request:
However, when accessing the Merchant and Date pages via deeplinks, there isn't any condition to check the What is the root cause of that problem?The MoneyRequestMerchantPage and MoneyRequestDatePage components do not have a condition to check the What changes do you think we should make in order to solve the problem?To address this issue, we should wrap the content of both the MoneyRequestMerchantPage and MoneyRequestDatePage components in the FullPageNotFoundView component when the import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; function MoneyRequestMerchantPage({iou, route}) {
const iouType = lodashGet(route, 'params.iouType', '');
return (
<FullPageNotFoundView shouldShow={iouType !== CONST.IOU.MONEY_REQUEST_TYPE.REQUEST}>
{/* Rest of the component's content */}
</FullPageNotFoundView>
);
} function MoneyRequestDatePage({iou, route}) {
const iouType = lodashGet(route, 'params.iouType', '');
return (
<FullPageNotFoundView shouldShow={iouType !== CONST.IOU.MONEY_REQUEST_TYPE.REQUEST}>
{/* Rest of the component's content */}
</FullPageNotFoundView>
);
} Reference from CONST: Lines 1048 to 1052 in 76c1559
By making these changes, when a user tries to access the Merchant or Date pages with the Result: 28.New.Expensify.-.Google.Chrome.2023-09-16.00-57-52.mp4What alternative solutions did you explore? (Optional)An alternative solution would be to conditionally navigate the user back to the previous page or the main page of the application. useEffect(() => {
// Add this condition to check if iouType is 'split' and navigate back
if (iouType !== CONST.IOU.MONEY_REQUEST_TYPE.REQUEST) {
Navigation.goBack();
return;
} However, displaying a "Not Found" page provides a clearer indication to the user that the page they are trying to access is not available. |
@ntdiary could you please review my proposal, thank you! |
Seems @kbecciv forgot to post my proposal where I'm the reporter: ProposalPlease re-state the problem that we are trying to solve in this issue.Date/Merchant is disabled for split, but still accessible with deeplink What is the root cause of that problem?We only disabled the
What changes do you think we should make in order to solve the problem?Create a new variable const isTypeRequest = iouType === CONST.IOU.MONEY_REQUEST_TYPE.REQUEST; Update our if (!isDistanceRequest && (_.isEmpty(iou.participants) || (iou.amount === 0 && !iou.receiptPath) || shouldReset || !isTypeRequest)) {
Navigation.goBack(ROUTES.getMoneyRequestRoute(iouType, reportID), true);
} We can do it similar to other pages like merchant, distance. We can also wrap our view with FullScreenNotFound when the request is not money request. What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.Date/Merchant is disabled for split, but still accessible with deeplink What is the root cause of that problem?We don't have the disable logic on the merchant and date page. What changes do you think we should make in order to solve the problem?
These changes will result in us showing the default and uneditable values for deeplinked merchant and date pages. What alternative solutions did you explore? (Optional)xx |
Proposal by: @hungvu193 ProposalPlease re-state the problem that we are trying to solve in this issue.Date/Merchant is disabled for split, but still accessible with deeplink What is the root cause of that problem?We only disabled the
What changes do you think we should make in order to solve the problem?Create a new variable const isTypeRequest = iouType === CONST.IOU.MONEY_REQUEST_TYPE.REQUEST; Update our if (!isDistanceRequest && (_.isEmpty(iou.participants) || (iou.amount === 0 && !iou.receiptPath) || shouldReset || !isTypeRequest)) {
Navigation.goBack(ROUTES.getMoneyRequestRoute(iouType, reportID), true);
} We can do it similar to other pages like merchant, distance. We can also wrap our view with FullScreenNotFound when the request is not money request. What alternative solutions did you explore? (Optional)N/A |
A couple of proposals for you to review when you get a chance @ntdiary |
will review soon. : ) |
@bfitzexpensify, personally, I think it's okay to display "it's not here" if the page is not accessible (i.e., @rayane-djouah's proposal). Do we need to confirm this expected result with the design team again? |
@ntdiary yes, I think we have a well-established principle of using the "it's not here" page when a link is incorrect, so that should be fine here too |
We're having a bit of a discussion in this thread about a broader solution to the issue of using a direct link to go to a specific page on a form that you shouldn't be able to access without filling in prior info: https://expensify.slack.com/archives/C049HHMV9SM/p1695064187785649?thread_ts=1694439235.983099&cid=C049HHMV9SM |
Nice. Looks like that thread ended without a solid conclusion, so bumped Tienifr to move their proposal forward to get a consensus. Once that's reached, I'll come back here to clarify the expected behaviour for this issue |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
We're still figuring out in https://expensify.slack.com/archives/C01GTK53T8Q/p1695209109095579 if we can standardize on a single form of UX |
This has not been fully confirmed in Slack yet |
@ntdiary, @bfitzexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@ntdiary just seeing your latest comment in that Slack thread - do you feel we have enough of a consensus to move forward with a particular approach? |
@bfitzexpensify, wow, I just realized we are also planning to refactor the money request flow (the PR #28618 @tgolen mentioned in that slack thread). And I don't think this issue is very critical and urgent, so it should also be fine to put this on hold for issue #26538. 🙂 |
Cool - updating title. I agree this isn't an urgent issue. Going to move this to weekly to match that holding issue |
Still holding on #26538 - though that itself has been taken off hold now, which is good |
PR being reviewed in the holding issue, we're closing to testing this again |
Testing about to start on that PR in the holding issue |
still held |
Still on hold, that issue is moving |
With the refactor, this is no longer happening. Closing this out. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
/split/new/confirmation/
to/split/new/date/
or/split/new/merchant/
Expected Result:
Merchant and Date shouldn't be accessible through deeplink
Actual Result:
Merchant and Date are accessible through deeplink
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.70.5
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Screen.Recording.2023-09-15.at.10.41.25.mov
Recording.4516.mp4
Expensify/Expensify Issue URL:
Issue reported by: @hungvu193
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694749185834509
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: