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

Allow switching between internal and OSS DevTools #3139

Closed
wants to merge 3 commits into from

Conversation

jstejada
Copy link
Contributor

@jstejada jstejada commented Dec 6, 2021

Summary:
This commit adds new UI in the top level toolbar to allow internal FB users to switch between the internal build of devtools and the OSS one.

Scenarios

Internal (when client.isFB)

  • DevTools version will default to the internal version, and will render a Select component with option to switch to the OSS version.
  • If a global install of DevTools is present, the selection menu will also offer the option to switch to the global DevTools version.

External (when !client.isFB)
Will preserve previous behavior:

  • Uses the OSS version by default, and doesn't provide option to switch to internal version.
  • If a global installation is present, will render a Switch component that allows switching between OSS and global installation.

Implementation

This commit refactors some parts of the DevTools plugin to provide a bit more clarity in the loading sequence by renaming and modifying some of the messaging, and fixing lint warnings.

A change introduced here is that when switching or loading devtools, when we attempt to reload the device via Metro, don't immediately show a "Retry" button, since at that point nothing has gone wrong, and the Retry button will only occur if the Metro reload doesn't occur after a few seconds.

In a future commit, this PR in Devtools will allow us to clear any loading messages once DevTools has successfully connected.

Differential Revision: D32773200

@facebook-github-bot facebook-github-bot added CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported labels Dec 6, 2021
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D32773200

@coveralls
Copy link

coveralls commented Dec 6, 2021

Pull Request Test Coverage Report for Build 1546345489

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 14 unchanged lines in 3 files lost coverage.
  • Overall coverage remained the same at 48.034%

Files with Coverage Reduction New Missed Lines %
desktop/flipper-server-core/src/devices/ios/iOSContainerUtility.tsx 2 26.15%
desktop/flipper-ui-core/src/sandy-chrome/appinspect/LaunchEmulator.tsx 2 59.42%
desktop/flipper-server-core/src/devices/ios/IOSBridge.tsx 10 68.33%
Totals Coverage Status
Change from base Build 1537052172: 0.0%
Covered Lines: 7470
Relevant Lines: 14117

💛 - Coveralls

jstejada pushed a commit to jstejada/flipper that referenced this pull request Dec 6, 2021
Summary:
Pull Request resolved: facebook#3139

This commit adds new UI in the top level toolbar to allow internal FB users to switch between the internal build of devtools and the OSS one.

## Scenarios

**Internal (when `client.isFB`)**

- DevTools version will default to the internal version, and will render a `Select` component with option to switch to the OSS version.
- If a global install of DevTools is present, the selection menu will also offer the option to switch to the global DevTools version.

**External (when `!client.isFB`)**
Will preserve previous behavior:

- Uses the OSS version by default, and doesn't provide option to switch to internal version.
- If a global installation is present, will render a `Switch` component that allows switching between OSS and global installation.

### Implementation

This commit refactors some parts of the DevTools plugin to provide a bit more clarity in the loading sequence by renaming and modifying some of the messaging, and fixing lint warnings.

A change introduced here is that when switching or loading devtools, when we attempt to reload the device via Metro, don't immediately show a "Retry" button, since at that point nothing has gone wrong, and the Retry button will only occur if the Metro reload doesn't occur after a few seconds.

In a future commit, this [PR in Devtools](facebook/react#22848) will allow us to clear any loading messages once DevTools has successfully connected.

Differential Revision: D32773200

fbshipit-source-id: bafa1bb7165f47fa6b4171c893f3ab94d253804d
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D32773200

jstejada pushed a commit to jstejada/flipper that referenced this pull request Dec 6, 2021
Summary:
Pull Request resolved: facebook#3139

This commit adds new UI in the top level toolbar to allow internal FB users to switch between the internal build of devtools and the OSS one.

## Scenarios

**Internal (when `client.isFB`)**

- DevTools version will default to the internal version, and will render a `Select` component with option to switch to the OSS version.
- If a global install of DevTools is present, the selection menu will also offer the option to switch to the global DevTools version.

**External (when `!client.isFB`)**
Will preserve previous behavior:

- Uses the OSS version by default, and doesn't provide option to switch to internal version.
- If a global installation is present, will render a `Switch` component that allows switching between OSS and global installation.

### Implementation

This commit refactors some parts of the DevTools plugin to provide a bit more clarity in the loading sequence by renaming and modifying some of the messaging, and fixing lint warnings.

A change introduced here is that when switching or loading devtools, when we attempt to reload the device via Metro, don't immediately show a "Retry" button, since at that point nothing has gone wrong, and the Retry button will only occur if the Metro reload doesn't occur after a few seconds.

In a future commit, this [PR in Devtools](facebook/react#22848) will allow us to clear any loading messages once DevTools has successfully connected.

Differential Revision: D32773200

fbshipit-source-id: aff10c1f93581154bb499d3162b7a5f613d4a16a
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D32773200

jstejada pushed a commit to jstejada/flipper that referenced this pull request Dec 6, 2021
Summary:
Pull Request resolved: facebook#3139

This commit adds new UI in the top level toolbar to allow internal FB users to switch between the internal build of devtools and the OSS one.

## Scenarios

**Internal (when `client.isFB`)**

- DevTools version will default to the internal version, and will render a `Select` component with option to switch to the OSS version.
- If a global install of DevTools is present, the selection menu will also offer the option to switch to the global DevTools version.

**External (when `!client.isFB`)**
Will preserve previous behavior:

- Uses the OSS version by default, and doesn't provide option to switch to internal version.
- If a global installation is present, will render a `Switch` component that allows switching between OSS and global installation.

### Implementation

This commit refactors some parts of the DevTools plugin to provide a bit more clarity in the loading sequence by renaming and modifying some of the messaging, and fixing lint warnings.

A change introduced here is that when switching or loading devtools, when we attempt to reload the device via Metro, don't immediately show a "Retry" button, since at that point nothing has gone wrong, and the Retry button will only occur if the Metro reload doesn't occur after a few seconds.

In a future commit, this [PR in Devtools](facebook/react#22848) will allow us to clear any loading messages once DevTools has successfully connected.

Differential Revision: D32773200

fbshipit-source-id: b09b8b03347e12eb55c3f390f284feffead79044
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D32773200

jstejada pushed a commit to jstejada/flipper that referenced this pull request Dec 6, 2021
Summary:
Pull Request resolved: facebook#3139

This commit adds new UI in the top level toolbar to allow internal FB users to switch between the internal build of devtools and the OSS one.

## Scenarios

**Internal (when `client.isFB`)**

- DevTools version will default to the internal version, and will render a `Select` component with option to switch to the OSS version.
- If a global install of DevTools is present, the selection menu will also offer the option to switch to the global DevTools version.

**External (when `!client.isFB`)**
Will preserve previous behavior:

- Uses the OSS version by default, and doesn't provide option to switch to internal version.
- If a global installation is present, will render a `Switch` component that allows switching between OSS and global installation.

### Implementation

This commit refactors some parts of the DevTools plugin to provide a bit more clarity in the loading sequence by renaming and modifying some of the messaging, and fixing lint warnings.

A change introduced here is that when switching or loading devtools, when we attempt to reload the device via Metro, don't immediately show a "Retry" button, since at that point nothing has gone wrong, and the Retry button will only occur if the Metro reload doesn't occur after a few seconds.

In a future commit, this [PR in Devtools](facebook/react#22848) will allow us to clear any loading messages once DevTools has successfully connected.

Reviewed By: lunaruan, mweststrate

Differential Revision: D32773200

fbshipit-source-id: 7f681dfe05d8bf5b2071ada695f4c38ddcf8538e
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D32773200

Juan Tejada added 3 commits December 6, 2021 11:53
Summary: This build was created from git revision 90e5d3638844414e1b9df0fe66c3fc46b211d210.

Differential Revision: D31866508

fbshipit-source-id: bf0165404eb3932e0c2b62215b6a11d404531279
Summary:
This commit update the React DevTools Flipper plugin to use the internal build of `react-devtools-core/standalone`.

The internal build of `react-devtools-core/standalone` is generated by the new sync script: `js1 upgrade react-devtools-core`, which places the build under  `xplat/sonar/desktop/plugins/public/reactdevtools/fb`.

As a follow up, we can add a dropdown to allow users to select which version of React DevTools they'd like to use.

Differential Revision: D31904288

fbshipit-source-id: 483b5f531486ed4f266834f90764776f26693b1d
Summary:
Pull Request resolved: facebook#3139

This commit adds new UI in the top level toolbar to allow internal FB users to switch between the internal build of devtools and the OSS one.

## Scenarios

**Internal (when `client.isFB`)**

- DevTools version will default to the internal version, and will render a `Select` component with option to switch to the OSS version.
- If a global install of DevTools is present, the selection menu will also offer the option to switch to the global DevTools version.

**External (when `!client.isFB`)**
Will preserve previous behavior:

- Uses the OSS version by default, and doesn't provide option to switch to internal version.
- If a global installation is present, will render a `Switch` component that allows switching between OSS and global installation.

### Implementation

This commit refactors some parts of the DevTools plugin to provide a bit more clarity in the loading sequence by renaming and modifying some of the messaging, and fixing lint warnings.

A change introduced here is that when switching or loading devtools, when we attempt to reload the device via Metro, don't immediately show a "Retry" button, since at that point nothing has gone wrong, and the Retry button will only occur if the Metro reload doesn't occur after a few seconds.

In a future commit, this [PR in Devtools](facebook/react#22848) will allow us to clear any loading messages once DevTools has successfully connected.

Reviewed By: lunaruan, mweststrate

Differential Revision: D32773200

fbshipit-source-id: 0abf1923349e99e927e94eacc49353b724a57fd3
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D32773200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants