-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement a single-column UI for smaller screens (#3024)
* Move third column under the middle column * Add Entities list toggle * Animate switching between the editor and the string list * When hovering over strings in the string list, show indicator to open the editor * Hide main navigation * For easier development, move all @media max-width to App.css temporarily Also: * Remove unused flex properties * Drop 700px transition on the header
- Loading branch information
Showing
10 changed files
with
141 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { createContext, useState } from 'react'; | ||
|
||
type EntitiesList = Readonly<{ | ||
visible: boolean; | ||
show(visible: boolean): void; | ||
}>; | ||
|
||
const initEntitiesList: EntitiesList = { | ||
visible: false, | ||
show: () => {}, | ||
}; | ||
|
||
export const EntitiesList = createContext(initEntitiesList); | ||
|
||
export function EntitiesListProvider({ | ||
children, | ||
}: { | ||
children: React.ReactElement; | ||
}) { | ||
const [state, setState] = useState<EntitiesList>(() => ({ | ||
...initEntitiesList, | ||
show: (visible: boolean) => setState((prev) => ({ ...prev, visible })), | ||
})); | ||
return ( | ||
<EntitiesList.Provider value={state}>{children}</EntitiesList.Provider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters