npm install
;npm run dev
to start the local server and navigate to http://localhost:3000/ to browse.Additionally, other scripts are available:
npm run eslint
and npm run eslint:fix
to run ESLint to check code conventions, and have ESLint attempt to fix issues that can be automatically fixed;npm run typecheck
to run TSC to compile ts code and report errors;npm run format
and npm run format:fix
to run Prettier to check formatting conventions, and have Prettier attempt to format it when possible;npm run build
to have Remix package the app.Application built using TypeScript, Remix and Tailwind, and its conventions:
Side panels are implemented in the app. They are fixed, may be placed on either side of the main content area, and currently only one side panel may exist in either side. Each side panel may have a title, and will render its children.
Improve the side panels:
One or more side panels may be specified on either side. Only one panel may be shown at a time, and to switch between them a dropdown should be rendered in its title, listing the available panels for that side.
They may be closed, in which case only a small button rotated 90 degrees will be shown to reopen the last panel used in that side, and should allow the main content area to expand. While open, a 'X' button should appear aligned to the right side of the title to close them.
Content in the main area may contain links or buttons that cause a specific panel to be programatically opened when clicked.
Create a PanelGroup
component to maintain panels for either side.
side
prop to specify which in which side they will be shown, and an active
prop to specify which panel is currently active in that group.children
, and should keep track of its state (which panel is active, and whether the group is open or not);Improve the existing Panel
component to implement those requirements.
Implement a mechanism to allow a button or link in the main content area to set the current active panel for either side.
Feel free to ask questions!
Panel
component may be modified so as to remove something from it. Given that there will be a PanelGroup
, does each Panel
need to render its title?
Would it be possible to store the current active panel of each group so that it remains active across page reloads?
Would it be possible to specify in which side a panel should be rendered in, so that a panel may be moved from one side to the other? How would you implement it?
Would it be possible to let the user resize each group? How would you implement it?
Would you do anything differently?