Skip to content

Commit

Permalink
Add back missing content
Browse files Browse the repository at this point in the history
  • Loading branch information
vocksel committed May 9, 2024
1 parent 3da080b commit c0340ff
Showing 1 changed file with 38 additions and 10 deletions.
48 changes: 38 additions & 10 deletions src/Plugin/PluginApp.luau
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ local ModalPortal = require("@root/Modal/ModalPortal")
local ModalRoot = require("@root/Modal/ModalRoot")
local NavigationContext = require("@root/Navigation/NavigationContext")
local React = require("@pkg/React")
local ResizablePanel = require("@root/Panels/ResizablePanel")
local Screen = require("@root/Navigation/Screen")
local Sidebar = require("@root/Panels/Sidebar")
local Topbar = require("@root/Panels/Topbar")
local constants = require("@root/constants")
local nextLayoutOrder = require("@root/Common/nextLayoutOrder")
Expand Down Expand Up @@ -61,23 +63,49 @@ local function App(props: Props)
Size = UDim2.fromScale(1, 1),
}, {
Layout = React.createElement("UIListLayout", {
FillDirection = Enum.FillDirection.Horizontal,
SortOrder = Enum.SortOrder.LayoutOrder,
VerticalAlignment = Enum.VerticalAlignment.Center,
}),

Topbar = React.createElement(Topbar, {
Size = UDim2.new(1, 0, 0, TOPBAR_HEIGHT_PX),
LayoutOrder = nextLayoutOrder(),
SidebarWrapper = React.createElement(ResizablePanel, {
layoutOrder = nextLayoutOrder(),
initialSize = UDim2.new(0, constants.SIDEBAR_INITIAL_WIDTH, 1, 0),
dragHandles = { "Right" },
minSize = Vector2.new(constants.SIDEBAR_MIN_WIDTH, 0),
maxSize = Vector2.new(constants.SIDEBAR_MAX_WIDTH, math.huge),
onResize = onSidebarResized,
}, {
Sidebar = React.createElement(Sidebar, {
selectStory = selectStory,
selectStorybook = selectStorybook,
storybooks = storybooks,
}),
}),

ScreenWrapper = React.createElement("Frame", {
MainWrapper = React.createElement("Frame", {
LayoutOrder = nextLayoutOrder(),
Size = UDim2.fromScale(1, 1) - UDim2.fromOffset(0, TOPBAR_HEIGHT_PX),
BackgroundTransparency = 1,
Size = UDim2.fromScale(1, 1) - UDim2.fromOffset(sidebarWidth, 0),
}, {
Screen = React.createElement(Screen, {
loader = props.loader,
story = story,
storybook = storybook,
Layout = React.createElement("UIListLayout", {
SortOrder = Enum.SortOrder.LayoutOrder,
}),

Topbar = React.createElement(Topbar, {
Size = UDim2.new(1, 0, 0, TOPBAR_HEIGHT_PX),
LayoutOrder = nextLayoutOrder(),
}),

ScreenWrapper = React.createElement("Frame", {
LayoutOrder = nextLayoutOrder(),
Size = UDim2.fromScale(1, 1) - UDim2.fromOffset(0, TOPBAR_HEIGHT_PX),
BackgroundTransparency = 1,
}, {
Screen = React.createElement(Screen, {
loader = props.loader,
story = story,
storybook = storybook,
}),
}),
}),
}),
Expand Down

0 comments on commit c0340ff

Please sign in to comment.