From 57efa4ac61f1345fd2a4c69af1a7904336dd36f7 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Mon, 29 Jun 2020 17:26:11 +1000 Subject: [PATCH 01/36] Added accordion component --- src/components/Accordion.js | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/components/Accordion.js diff --git a/src/components/Accordion.js b/src/components/Accordion.js new file mode 100644 index 0000000..5f12bfd --- /dev/null +++ b/src/components/Accordion.js @@ -0,0 +1,36 @@ +import React, { useState } from "react"; +import { Box, Flex, Text, IconButton, Divider } from "theme-ui"; + +import ExpandMoreIcon from "../icons/ExpandMoreIcon"; + +function Accordion({ heading, children, defaultOpen }) { + const [open, setOpen] = useState(defaultOpen); + + return ( + + setOpen(!open)} + > + + {heading} + + + + + + {open && children} + + + ); +} + +Accordion.defaultProps = { + defaultOpen: false, +}; + +export default Accordion; From 828b8c06d7109b18bf18da7086e04019b1fd1ff2 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Mon, 29 Jun 2020 17:26:39 +1000 Subject: [PATCH 02/36] Updated release notes with accordion --- src/docs/releaseNotes/v1.1.0.md | 2 -- src/docs/releaseNotes/v1.2.0.md | 2 -- src/docs/releaseNotes/v1.2.1.md | 2 -- src/docs/releaseNotes/v1.3.0.md | 2 -- src/docs/releaseNotes/v1.3.1.md | 2 -- src/docs/releaseNotes/v1.3.2.md | 2 -- src/docs/releaseNotes/v1.3.3.md | 2 -- src/docs/releaseNotes/v1.4.0.md | 2 -- src/routes/ReleaseNotes.js | 38 ++++++++++++++++++++++++--------- 9 files changed, 28 insertions(+), 26 deletions(-) diff --git a/src/docs/releaseNotes/v1.1.0.md b/src/docs/releaseNotes/v1.1.0.md index 318e5a3..e68a7ed 100644 --- a/src/docs/releaseNotes/v1.1.0.md +++ b/src/docs/releaseNotes/v1.1.0.md @@ -1,5 +1,3 @@ -# v1.1.0 - ## Major Changes ### Drawing diff --git a/src/docs/releaseNotes/v1.2.0.md b/src/docs/releaseNotes/v1.2.0.md index 86c7f1f..a43a317 100644 --- a/src/docs/releaseNotes/v1.2.0.md +++ b/src/docs/releaseNotes/v1.2.0.md @@ -1,5 +1,3 @@ -# v1.2.0 - ## Major Changes ### Saved Maps diff --git a/src/docs/releaseNotes/v1.2.1.md b/src/docs/releaseNotes/v1.2.1.md index fd55366..d461e88 100644 --- a/src/docs/releaseNotes/v1.2.1.md +++ b/src/docs/releaseNotes/v1.2.1.md @@ -1,5 +1,3 @@ -# v1.2.1 - ## Minor Changes - Changed the way maps are stored and sent to other players which should fix a few of the issues with maps not sending properly. diff --git a/src/docs/releaseNotes/v1.3.0.md b/src/docs/releaseNotes/v1.3.0.md index 08e1e26..7baf771 100644 --- a/src/docs/releaseNotes/v1.3.0.md +++ b/src/docs/releaseNotes/v1.3.0.md @@ -1,5 +1,3 @@ -# v1.3.0 - ## Major Changes ### Dice Rolling diff --git a/src/docs/releaseNotes/v1.3.1.md b/src/docs/releaseNotes/v1.3.1.md index 096dec8..1a88308 100644 --- a/src/docs/releaseNotes/v1.3.1.md +++ b/src/docs/releaseNotes/v1.3.1.md @@ -1,5 +1,3 @@ -# v1.3.1 - ## Minor Changes - Fixed a bug where tokens that were placed on the map then removed from the token select screen could no longer be deleted from the map. diff --git a/src/docs/releaseNotes/v1.3.2.md b/src/docs/releaseNotes/v1.3.2.md index ddc1464..d6ad469 100644 --- a/src/docs/releaseNotes/v1.3.2.md +++ b/src/docs/releaseNotes/v1.3.2.md @@ -1,5 +1,3 @@ -# v1.3.2 - ## Minor Changes - Fixed a bug when loading a large amount of stored maps. diff --git a/src/docs/releaseNotes/v1.3.3.md b/src/docs/releaseNotes/v1.3.3.md index b4bd7ee..dca587e 100644 --- a/src/docs/releaseNotes/v1.3.3.md +++ b/src/docs/releaseNotes/v1.3.3.md @@ -1,5 +1,3 @@ -# v1.3.3 - ## Minor Changes - Fixed a bug that would cause the game to crash when a player would lose internet connection. diff --git a/src/docs/releaseNotes/v1.4.0.md b/src/docs/releaseNotes/v1.4.0.md index d909b80..64ce08c 100644 --- a/src/docs/releaseNotes/v1.4.0.md +++ b/src/docs/releaseNotes/v1.4.0.md @@ -1,5 +1,3 @@ -# v1.4.0 - ## Major Changes ### Reworked Fog Tools diff --git a/src/routes/ReleaseNotes.js b/src/routes/ReleaseNotes.js index 9e198d1..a8cffda 100644 --- a/src/routes/ReleaseNotes.js +++ b/src/routes/ReleaseNotes.js @@ -4,6 +4,7 @@ import raw from "raw.macro"; import Footer from "../components/Footer"; import Markdown from "../components/Markdown"; +import Accordion from "../components/Accordion"; const v110 = raw("../docs/releaseNotes/v1.1.0.md"); const v120 = raw("../docs/releaseNotes/v1.2.0.md"); @@ -27,37 +28,54 @@ function ReleaseNotes() { Release Notes
- + + +
- + + +
- + + +
- + + +
- + + +
- + + +
- + + +
- + + +