revamp UI + show oncall/group

Summary:
Redesigns the bug reporting dialog:
- show information from `package.json`'s `bugs` field, where we can link to support groups or name oncalls.
- adds show/hide animation
- uses new button style

Reviewed By: jknoxville

Differential Revision: D13417287

fbshipit-source-id: 2948794e9b1f42bbd895981d5e4b0578a9b8ee2e
This commit is contained in:
Daniel Büchele
2018-12-18 09:32:07 -08:00
committed by Facebook Github Bot
parent c540fe5529
commit c9b982b182
7 changed files with 276 additions and 79 deletions

View File

@@ -8,7 +8,6 @@
import React from 'react';
import {FlexColumn, FlexRow} from 'flipper';
import {connect} from 'react-redux';
import {toggleBugDialogVisible} from './reducers/application.js';
import WelcomeScreen from './chrome/WelcomeScreen.js';
import TitleBar from './chrome/TitleBar.js';
import MainSidebar from './chrome/MainSidebar.js';
@@ -25,11 +24,9 @@ type Props = {
logger: Logger,
bugReporter: BugReporter,
leftSidebarVisible: boolean,
bugDialogVisible: boolean,
pluginManagerVisible: boolean,
selectedDevice: ?BaseDevice,
error: ?string,
toggleBugDialogVisible: (visible?: boolean) => any,
};
export class App extends React.Component<Props> {
@@ -51,14 +48,7 @@ export class App extends React.Component<Props> {
return (
<FlexColumn grow={true}>
<TitleBar />
{this.props.bugDialogVisible && (
<BugReporterDialog
bugReporter={this.props.bugReporter}
close={() => {
this.props.toggleBugDialogVisible(false);
}}
/>
)}
<BugReporterDialog bugReporter={this.props.bugReporter} />
<FlexRow grow={true}>
{this.props.leftSidebarVisible && <MainSidebar />}
{this.props.selectedDevice ? (
@@ -78,16 +68,12 @@ export class App extends React.Component<Props> {
* run Flow. */
export default connect(
({
application: {pluginManagerVisible, bugDialogVisible, leftSidebarVisible},
application: {pluginManagerVisible, leftSidebarVisible},
connections: {selectedDevice, error},
}) => ({
pluginManagerVisible,
bugDialogVisible,
leftSidebarVisible,
selectedDevice,
error,
}),
{
toggleBugDialogVisible,
},
)(App);