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

[HOLD for payment 2024-06-11] MEDIUM: [$500] Add button to console log to four finger tap menu #40208

Open
m-natarajan opened this issue Apr 13, 2024 · 33 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production External Added to denote the issue can be worked on by a contributor High Priority NewFeature Something to build that is a new item. Weekly KSv2

Comments

@m-natarajan
Copy link

m-natarajan commented Apr 13, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Problem:

No option in the the four-finger tap menu, which allows you to enable client side logging, to also access the realtime console logs.

Solution:

Please add a button on the four-finger tap menu, which allows you to enable client side logging, to also access the realtime console logs. I find when I want to enable it, I'm often deep in some specific context that I don't want to leave.

Context/Examples/Screenshots/Notes:

Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @quinthar
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1712979436331499

Add any screenshot/video evidence

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01bb0c76728a550068
  • Upwork Job ID: 1780036099620753408
  • Last Price Increase: 2024-05-17
  • Automatic offers:
    • ShridharGoel | Contributor | 0
Issue OwnerCurrent Issue Owner: @adelekennedy
@m-natarajan m-natarajan added Daily KSv2 NewFeature Something to build that is a new item. labels Apr 13, 2024
Copy link

melvin-bot bot commented Apr 13, 2024

Triggered auto assignment to @adelekennedy (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Apr 13, 2024
@ShridharGoel
Copy link
Contributor

ShridharGoel commented Apr 13, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

We need to add a button to view debug console logs via the four finger tap menu.

What is the root cause of that problem?

New feature.

What changes do you think we should make in order to solve the problem?

In the test tools modal (four finger tap menu), when client side logging is enabled, we can show an extra option to "View debug console". Clicking on this option would open another modal where we can display the existing ConsolePage.

Add the option after this:

<TestToolRow title={translate('initialSettingsPage.troubleshoot.clientSideLogging')}>
<Switch
accessibilityLabel={translate('initialSettingsPage.troubleshoot.clientSideLogging')}
isOn={!!shouldStoreLogs}
onToggle={onToggle}
/>
</TestToolRow>

This new option will be visible only if SHOULD_STORE_LOGS in Onyx has true value.

Sample code for the new option:

{!!shouldStoreLogs &&
  <TestToolRow title={translate('initialSettingsPage.troubleshoot.debugLogs')}>
        <Button
            small
            text={translate('common.viewConsole')}
            onPress={() => setIsConsoleModalVisible(true)}
        />
    </TestToolRow>
}

Create a new ConsoleModal. We will extract the components of ConsolePage at a common place (called ConsoleComponents), and use them in both ConsoleModal and ConsolePage (so no duplication of code).

I can share the test branch or detailed code which I have already tested.

Debug.console.logs.modal.mov

If we don't want options like save logs, share logs and command then we can skip them and simplify the UI to have just the logs.

Bonus functionality (A suggestion)

We can also add a new functionality of 5-finger tap. If 5-finger tap is done, we can:

  • Open the debug console logs directly if client side logging is enabled.
  • Open the test tools modal if client side logging is not enabled.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Apr 13, 2024
@quinthar quinthar changed the title [Feature Request] - HIGH: [Reliability] Add button to console log to four finger tap menu HIGH: [Reliability] Add button to console log to four finger tap menu Apr 13, 2024
@nkdengineer
Copy link
Contributor

nkdengineer commented Apr 14, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

  • New feature: Add button to console log to four finger tap menu

What is the root cause of that problem?

What changes do you think we should make in order to solve the problem?

  • In this, we can navigate user to settings/troubleshoot/console if the client side logging is toggled "on" and it is four tap menu.
    const onToggle = () => {
        if (!shouldStoreLogs) {
            Console.setShouldStoreLogs(true);

            if (onEnableLogging) {
                onEnableLogging();
            }
+          if (isInTestToolModal) {
+              toggleTestToolsModal();
+              Navigation.navigate(ROUTES.SETTINGS_CONSOLE);
+          }
            return;
        }
        ...
    };
  • In the above, isInTestToolModal is the prop we use to check if it is in test tool modal or not and we can pass it down to ClientSideLoggingToolMenu in TestToolsModal

What alternative solutions did you explore? (Optional)

  • In the main solution, after we open settings/troubleshoot/console, and then press on "back" button, we can display the test tool modal again rather than the settings/troubleshoot. We can do it by using isTestToolModal param in url, similar to the backTo param - that is used in a lot of logic in our app. For example, after we toggle "on" the client-side logging, we will navigate the user to settings/troubleshoot/console?isTestToolModal=true.
  • Then update update this to:
              onBackButtonPress={() => {
+                  if (isTestToolModal) {
+                      Navigation.goBack();
+                      toggleTestToolsModal();
+                      return;
+                  }
                    Navigation.goBack(ROUTES.SETTINGS_TROUBLESHOOT);
                }}

Result

Screen.Recording.2024-04-14.at.11.10.34.mov

@ShridharGoel
Copy link
Contributor

Proposal

Updated with video and bonus functionality.

@melvin-bot melvin-bot bot added the Overdue label Apr 15, 2024
@quinthar
Copy link

What are the next steps here; who is this waiting on, and what will they do? Is this waiting on @adelekennedy ?

@adelekennedy adelekennedy added the External Added to denote the issue can be worked on by a contributor label Apr 16, 2024
@melvin-bot melvin-bot bot changed the title HIGH: [Reliability] Add button to console log to four finger tap menu [$250] HIGH: [Reliability] Add button to console log to four finger tap menu Apr 16, 2024
Copy link

melvin-bot bot commented Apr 16, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01bb0c76728a550068

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 16, 2024
Copy link

melvin-bot bot commented Apr 16, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External)

@adelekennedy
Copy link

External label added for proposal reviews

@adelekennedy
Copy link

@eVoloshchak will you review the proposals above?

@eVoloshchak
Copy link
Contributor

@ShridharGoel's proposal looks good to me!
I think we can skip the bonus functionality (5-finger tap), a button in the menu would be sufficient

🎀👀🎀 C+ reviewed!

Copy link

melvin-bot bot commented Apr 17, 2024

Triggered auto assignment to @Beamanator, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@nkdengineer
Copy link
Contributor

nkdengineer commented Apr 17, 2024

@eVoloshchak @Beamanator The issue's requirement mentioned that:

add a button on the four-finger tap menu, which allows you to enable client side logging, to also access the realtime console logs

Can you help confirm the expected behavior once we enable "client side logging"? Should we navigate user to "console" screen right after that? If yes, the selected proposal does not cover it. cc @quinthar as you are the reporter

@ShridharGoel
Copy link
Contributor

ShridharGoel commented Apr 17, 2024

Please add a button on the four-finger tap menu, which allows you to enable client side logging, to also access the realtime console logs.

This clearly mentions that a button has to be added. Which means the console will show on clicking this new button (and the old button to enable logging would be as it is).

@quinthar
Copy link

hi all, what are the next steps, and the ETA?

@adelekennedy
Copy link

@Beamanator I think the issue is in your court to approve the proposal @eVoloshchak approved (considering @nkdengineer point here

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Apr 22, 2024
@ShridharGoel
Copy link
Contributor

PR can be reviewed now: #40656

@adelekennedy
Copy link

@eVoloshchak @Beamanator flagging that the PR is ready!

@quinthar
Copy link

Hi all, what's the next step and ETA on this?

@quinthar quinthar changed the title [$250] HIGH: [Reliability] Add button to console log to four finger tap menu HIGH: [Reliability] [$250] Add button to console log to four finger tap menu Apr 27, 2024
@quinthar quinthar changed the title HIGH: [Reliability] [$250] Add button to console log to four finger tap menu HIGH: [Debugability] [$250] Add button to console log to four finger tap menu Apr 27, 2024
@Beamanator
Copy link
Contributor

Next step = @ShridharGoel is implementing a few changes that were requested in the PR - here: #40656 (comment)

Not sure of ETA

@ShridharGoel
Copy link
Contributor

PR has been updated.

@ShridharGoel
Copy link
Contributor

@adelekennedy This is marked as HIGH but it is missing the High Priority label. Can you check it?

@quinthar
Copy link

quinthar commented May 3, 2024

What is the next step, who is doing it,and when?

@Beamanator
Copy link
Contributor

Bumped C+ & Contrib in the PR - there was some concern about a crash on iOS & conflicts need to be resolved, hopefully quickly since this is a HIGH priority issue 🙏

@ShridharGoel
Copy link
Contributor

@quinthar The last update on the PR was done a week back and it was waiting for final review. Today, some new comments have been added which I'll check.

@Beamanator It was not a crash due to the new code changes. It seemed to be because of using "Shake" option on simulator.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels May 7, 2024
@quinthar quinthar changed the title HIGH: [Debugability] [$250] Add button to console log to four finger tap menu MEDIUM: [$250] Add button to console log to four finger tap menu May 12, 2024
@adelekennedy adelekennedy changed the title MEDIUM: [$250] Add button to console log to four finger tap menu MEDIUM: [$500] Add button to console log to four finger tap menu May 17, 2024
Copy link

melvin-bot bot commented May 17, 2024

Upwork job price has been updated to $500

@adelekennedy
Copy link

looks like this will be merged soon

@eVoloshchak
Copy link
Contributor

PR is ready, will be merged after the merge freeze is over

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 4, 2024
@melvin-bot melvin-bot bot changed the title MEDIUM: [$500] Add button to console log to four finger tap menu [HOLD for payment 2024-06-11] MEDIUM: [$500] Add button to console log to four finger tap menu Jun 4, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 4, 2024
Copy link

melvin-bot bot commented Jun 4, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Jun 4, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.78-5 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-06-11. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jun 4, 2024

BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@eVoloshchak] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
  • [@adelekennedy] Link the GH issue for creating/updating the regression test once above steps have been agreed upon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production External Added to denote the issue can be worked on by a contributor High Priority NewFeature Something to build that is a new item. Weekly KSv2
Projects
Status: MEDIUM
Development

No branches or pull requests

7 participants