UI for sharable URLs

Summary:
Uploading the Flipper data could take some while. With the current implementation the user didn't know what was happening. This is why this diff immediately shows a sheet with a spinner, until the upload is finished.

The URL is still copied to the clipboard and a notifications is displayed. Additionally the user can copy the URL from the sheet.

Reviewed By: priteshrnandgaonkar

Differential Revision: D14441759

fbshipit-source-id: c853526a7da76e2dea5e1aaf6b6eff21e4268789
This commit is contained in:
Daniel Büchele
2019-03-14 04:19:28 -07:00
committed by Facebook Github Bot
parent 50a1fa64d8
commit aad970defd
5 changed files with 173 additions and 4 deletions

View File

@@ -13,6 +13,7 @@ import TitleBar from './chrome/TitleBar.js';
import MainSidebar from './chrome/MainSidebar.js';
import BugReporterDialog from './chrome/BugReporterDialog.js';
import ErrorBar from './chrome/ErrorBar.js';
import ShareSheet from './chrome/ShareSheet.js';
import PluginContainer from './PluginContainer.js';
import Sheet from './chrome/Sheet.js';
import {ipcRenderer, remote} from 'electron';
@@ -20,6 +21,7 @@ import PluginDebugger from './chrome/PluginDebugger.js';
import {
ACTIVE_SHEET_BUG_REPORTER,
ACTIVE_SHEET_PLUGIN_DEBUGGER,
ACTIVE_SHEET_SHARE_DATA,
} from './reducers/application.js';
import type {Logger} from './fb-interfaces/Logger.js';
@@ -68,6 +70,8 @@ export class App extends React.Component<Props> {
);
} else if (this.props.activeSheet === ACTIVE_SHEET_PLUGIN_DEBUGGER) {
return <PluginDebugger onHide={onHide} />;
} else if (this.props.activeSheet === ACTIVE_SHEET_SHARE_DATA) {
return <ShareSheet onHide={onHide} />;
} else {
// contents are added via React.Portal
return null;