Add Flipper logs to leftrail

Summary:
This adds support for flipper logs in Sandy, including some theme adjustments.

Did remove storage and showing of debug messages, as I noticed it tends to crash Flipper after a while since there are so many. Also added a fixed limit of only remembering last 1000

Also converted Toolbar and button with dropdown items to Sandy.

Reviewed By: cekkaewnumchai

Differential Revision: D23824528

fbshipit-source-id: b89d1182d4f14682251dbb482d93c2c009ddc7a4
This commit is contained in:
Michel Weststrate
2020-09-24 05:56:14 -07:00
committed by Facebook GitHub Bot
parent 191df465b7
commit aea04dd0cf
10 changed files with 275 additions and 46 deletions

View File

@@ -29,8 +29,10 @@ export function SandyApp({logger}: {logger: Logger}) {
}, []);
const mainMenuVisible = useStore(
(state) => state.application.leftSidebarVisible,
(state) =>
state.application.leftSidebarVisible && !state.connections.staticView,
);
const staticView = useStore((state) => state.connections.staticView);
return (
<SandyContext.Provider value={true}>
@@ -51,7 +53,13 @@ export function SandyApp({logger}: {logger: Logger}) {
<Layout.Right initialSize={300} minSize={200}>
<MainContentWrapper>
<ContentContainer>
<TemporarilyContent />
{staticView ? (
React.createElement(staticView, {
logger: logger,
})
) : (
<TemporarilyContent />
)}
</ContentContainer>
</MainContentWrapper>
<MainContentWrapper>