Skip to content

Commit

Permalink
Feature/242 changelog (#269)
Browse files Browse the repository at this point in the history
* add changelog;
* add basic changelog page; add auto-changelog;
* v1.0.1
* changelog page styling;
* remove double hyphen; remove second h1 for changelog page;
* remove double version;
  • Loading branch information
benjamineac authored Oct 26, 2022
1 parent 5380073 commit 6948a0d
Show file tree
Hide file tree
Showing 7 changed files with 245 additions and 4 deletions.
1 change: 1 addition & 0 deletions decs.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
declare module '@gns-science/toshi-nest';
declare module 'react-csv';
declare module 'html-to-image';
declare module '*.md';
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kororaa",
"version": "0.2.0",
"version": "1.0.1",
"private": true,
"dependencies": {
"@emotion/react": "^11.9.0",
Expand Down Expand Up @@ -35,7 +35,8 @@
"eject": "react-scripts eject",
"lint": "eslint ./src/**/*.{ts,tsx} --quiet --fix",
"prepush": "yarn test",
"prepare": "husky install"
"prepare": "husky install",
"version": "auto-changelog -p -o src/CHANGELOG.md --template keepachangelog && git add src/CHANGELOG.md"
},
"lint-staged": {
"./src/**/*.{ts,tsx}": [
Expand Down Expand Up @@ -81,6 +82,7 @@
"@types/yup": "^0.29.14",
"@typescript-eslint/eslint-plugin": "^5.22.0",
"@typescript-eslint/parser": "^5.22.0",
"auto-changelog": "^2.4.0",
"babel-plugin-relay": "^13.2.0",
"cypress": "^10.1.0",
"cypress-localstorage-commands": "^2.1.0",
Expand Down
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import DisaggregationsPage from './views/disaggregations/DisaggregationsPage';
import ContactPage from './views/contact/ContactPage';
import AboutPage from './views/about/AboutPage';
import TechInfoPage from './views/techinfo/TechInfoPage';
import ChangelogPage from './views/changelog/ChangelogPage';

// The Home component needs to know how to access the Relay environment, and we
// need to specify a fallback in case it suspends:
Expand Down Expand Up @@ -64,6 +65,7 @@ function App(props: { environment?: Environment }) {
<Route path="/About" element={<AboutPage />} />
<Route path="/TechInfo" element={<TechInfoPage />} />
<Route path="/Contacts" element={<ContactPage />} />
<Route path="/Releases" element={<ChangelogPage />} />
<Route path="/Resources/ScienceReports" element={<ScienceReportsPage />} />
<Route path="/" element={<Home />} />
</Routes>
Expand Down
144 changes: 144 additions & 0 deletions src/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

## [v1.0.1](https://github.com/GNS-Science/kororaa/compare/v1.0.0...1.0.1) - 2022-10-20

### Merged

- Fix/120 webpack warnings (#257) [`#266`](https://github.com/GNS-Science/kororaa/pull/266)
- new GA4 code for GNS Science org; [`#265`](https://github.com/GNS-Science/kororaa/pull/265)

### Commits

- revert release changes; [`4ffe479`](https://github.com/GNS-Science/kororaa/commit/4ffe4792a9562a9e6112e1744733fd9d678a02ae)
- changelog page styling; [`5c1141c`](https://github.com/GNS-Science/kororaa/commit/5c1141c22a49fa0aa670f4cbdf162396f9ab5612)
- alter version path in package.json; [`7002af9`](https://github.com/GNS-Science/kororaa/commit/7002af9d4d86c14a62c2763cf68d69dfb7083592)
- add release workflow; change changelog template; [`adddb15`](https://github.com/GNS-Science/kororaa/commit/adddb1532ff1a0286d3990ac53c16449a13cb155)

## v1.0.0 - 2022-10-17

### Merged

- Feature/241 ga tracking [`#263`](https://github.com/GNS-Science/kororaa/pull/263)
- Feature/241_ga_tracking [`#262`](https://github.com/GNS-Science/kororaa/pull/262)
- fix cypress; [`#261`](https://github.com/GNS-Science/kororaa/pull/261)
- Feature/256 sorted legends [`#260`](https://github.com/GNS-Science/kororaa/pull/260)
- Fix/255 cypress catchup [`#258`](https://github.com/GNS-Science/kororaa/pull/258)
- Fix/120 webpack warnings [`#257`](https://github.com/GNS-Science/kororaa/pull/257)
- set vs30 configuration for next deployment [`#254`](https://github.com/GNS-Science/kororaa/pull/254)
- city name in hazard legend, changed order of legend string (#248) [`#251`](https://github.com/GNS-Science/kororaa/pull/251)
- Fix/eqc logo (#244) [`#247`](https://github.com/GNS-Science/kororaa/pull/247)
- Promote to PROD [`#235`](https://github.com/GNS-Science/kororaa/pull/235)
- remove unwanted fields from publications list; (#229) [`#230`](https://github.com/GNS-Science/kororaa/pull/230)
- promote latest to PROD [`#228`](https://github.com/GNS-Science/kororaa/pull/228)
- squash NZ-NSHM; adjust header padding; [`#223`](https://github.com/GNS-Science/kororaa/pull/223)
- update vs30 info in tooltips [`#224`](https://github.com/GNS-Science/kororaa/pull/224)
- Feature/home page tweaks [`#222`](https://github.com/GNS-Science/kororaa/pull/222)
- update contacts and fix up alignments [`#219`](https://github.com/GNS-Science/kororaa/pull/219)
- Feature/169-image-not-found [`#218`](https://github.com/GNS-Science/kororaa/pull/218)
- Feature/197 r and m 5 squash rebase [`#216`](https://github.com/GNS-Science/kororaa/pull/216)
- disclaiming footer & links [`#205`](https://github.com/GNS-Science/kororaa/pull/205)
- forget DRY with layerd SECRETS for now; [`#212`](https://github.com/GNS-Science/kororaa/pull/212)
- add missing env secrets [`#211`](https://github.com/GNS-Science/kororaa/pull/211)
- refactor secrets setup; [`#210`](https://github.com/GNS-Science/kororaa/pull/210)
- refactor deployment scripts for DRY [`#209`](https://github.com/GNS-Science/kororaa/pull/209)
- Feature/201 science report downloads [`#204`](https://github.com/GNS-Science/kororaa/pull/204)
- Feature/61 about and help [`#200`](https://github.com/GNS-Science/kororaa/pull/200)
- Feature/197 rats and mice 5 [`#202`](https://github.com/GNS-Science/kororaa/pull/202)
- Feature/181 fab button [`#199`](https://github.com/GNS-Science/kororaa/pull/199)
- first draft [`#198`](https://github.com/GNS-Science/kororaa/pull/198)
- Feature/149 contact email [`#196`](https://github.com/GNS-Science/kororaa/pull/196)
- Feature/190 info tile [`#194`](https://github.com/GNS-Science/kororaa/pull/194)
- make iframe reports use https; [`#195`](https://github.com/GNS-Science/kororaa/pull/195)
- added new SimpleBackdrop common component; added to API query views; [`#192`](https://github.com/GNS-Science/kororaa/pull/192)
- hazard map has new map options; [`#193`](https://github.com/GNS-Science/kororaa/pull/193)
- Feature/coming features updates [`#189`](https://github.com/GNS-Science/kororaa/pull/189)
- Feature/tooltip placement [`#188`](https://github.com/GNS-Science/kororaa/pull/188)
- Feature/161 r and m 4 [`#185`](https://github.com/GNS-Science/kororaa/pull/185)
- Fix/147 missing location codes [`#184`](https://github.com/GNS-Science/kororaa/pull/184)
- Feature/176 Uncertainty Bounds [`#183`](https://github.com/GNS-Science/kororaa/pull/183)
- feature/162 Spectral periods [`#175`](https://github.com/GNS-Science/kororaa/pull/175)
- Feature/167 collab logos update [`#174`](https://github.com/GNS-Science/kororaa/pull/174)
- Feature/CSV formatting [`#173`](https://github.com/GNS-Science/kororaa/pull/173)
- Feature/home titles rats n mice [`#163`](https://github.com/GNS-Science/kororaa/pull/163)
- Feature/150 download [`#160`](https://github.com/GNS-Science/kororaa/pull/160)
- Feature/home page revisions rebase [`#159`](https://github.com/GNS-Science/kororaa/pull/159)
- Fix/157 faster gridded hazard [`#158`](https://github.com/GNS-Science/kororaa/pull/158)
- Feature/146 Missing spectra plots [`#155`](https://github.com/GNS-Science/kororaa/pull/155)
- add colourScaleNormalise to hazard maps query; [`#154`](https://github.com/GNS-Science/kororaa/pull/154)
- Feature/140 hazard map title [`#152`](https://github.com/GNS-Science/kororaa/pull/152)
- Feature/116 Help content Markdown [`#151`](https://github.com/GNS-Science/kororaa/pull/151)
- Feature/137 spectral pga [`#145`](https://github.com/GNS-Science/kororaa/pull/145)
- make pageContainer styles more consistent; stop Title jittering; [`#141`](https://github.com/GNS-Science/kororaa/pull/141)
- solve merge conflicts; [`#139`](https://github.com/GNS-Science/kororaa/pull/139)
- Fix/133 linear spectra xscale [`#138`](https://github.com/GNS-Science/kororaa/pull/138)
- fix styling; [`#135`](https://github.com/GNS-Science/kororaa/pull/135)
- Feature/31 disagg rebase [`#134`](https://github.com/GNS-Science/kororaa/pull/134)
- Feature/117 science reports [`#130`](https://github.com/GNS-Science/kororaa/pull/130)
- Feature/rats and mice [`#129`](https://github.com/GNS-Science/kororaa/pull/129)
- updated colobar with heading and background [`#127`](https://github.com/GNS-Science/kororaa/pull/127)
- Feature/52 dynamic y scale [`#111`](https://github.com/GNS-Science/kororaa/pull/111)
- disable close on select [`#124`](https://github.com/GNS-Science/kororaa/pull/124)
- Feature/104 navbar improvements part1 [`#126`](https://github.com/GNS-Science/kororaa/pull/126)
- Feature/105 help markdown [`#121`](https://github.com/GNS-Science/kororaa/pull/121)
- add suspense and delete unused log [`#123`](https://github.com/GNS-Science/kororaa/pull/123)
- log/linear toggle for spectra [`#122`](https://github.com/GNS-Science/kororaa/pull/122)
- Feature/54 download img [`#118`](https://github.com/GNS-Science/kororaa/pull/118)
- move to MUI Grid for card layout; make styling similar to /Previews; [`#114`](https://github.com/GNS-Science/kororaa/pull/114)
- Feature/107 feature preview page [`#112`](https://github.com/GNS-Science/kororaa/pull/112)
- Fix/97 jitter [`#109`](https://github.com/GNS-Science/kororaa/pull/109)
- Headings are now GNS_BLUE [`#110`](https://github.com/GNS-Science/kororaa/pull/110)
- Fix/96 dynamic colormap [`#102`](https://github.com/GNS-Science/kororaa/pull/102)
- Feature/80 revise theme colours 2 [`#108`](https://github.com/GNS-Science/kororaa/pull/108)
- fix spectral legend for arbitrary latlons; [`#101`](https://github.com/GNS-Science/kororaa/pull/101)
- Fix/86 spectral named legend [`#100`](https://github.com/GNS-Science/kororaa/pull/100)
- fix scrambled spectral [`#99`](https://github.com/GNS-Science/kororaa/pull/99)
- Colobar feature on Hazard Map - big squash-rebase [`#98`](https://github.com/GNS-Science/kororaa/pull/98)
- feature/53 Page Description [`#93`](https://github.com/GNS-Science/kororaa/pull/93)
- Feature/83 download in drawer [`#91`](https://github.com/GNS-Science/kororaa/pull/91)
- Fix/68 curve colors [`#92`](https://github.com/GNS-Science/kororaa/pull/92)
- change favicon and title; [`#84`](https://github.com/GNS-Science/kororaa/pull/84)
- Feature/64 move hazard controls v2 [`#77`](https://github.com/GNS-Science/kororaa/pull/77)
- Feature/51 map colorbar v2 [`#79`](https://github.com/GNS-Science/kororaa/pull/79)
- Feature/60 info page - WIP [`#76`](https://github.com/GNS-Science/kororaa/pull/76)
- Feature/55 map data download [`#74`](https://github.com/GNS-Science/kororaa/pull/74)
- fix cypress test for latlon; [`#73`](https://github.com/GNS-Science/kororaa/pull/73)
- fix fussy latlon; [`#72`](https://github.com/GNS-Science/kororaa/pull/72)
- add download csv function; [`#70`](https://github.com/GNS-Science/kororaa/pull/70)
- Feature/59 hazard map properties [`#69`](https://github.com/GNS-Science/kororaa/pull/69)
- Feature/58 Named Legend [`#66`](https://github.com/GNS-Science/kororaa/pull/66)
- update toshi nest to 3.1.1 [`#65`](https://github.com/GNS-Science/kororaa/pull/65)
- fix input bug; fix cypress tests; [`#56`](https://github.com/GNS-Science/kororaa/pull/56)
- Feature/40 gridded hazard map [`#48`](https://github.com/GNS-Science/kororaa/pull/48)
- Fix/latlon format [`#51`](https://github.com/GNS-Science/kororaa/pull/51)
- remove resolution; [`#50`](https://github.com/GNS-Science/kororaa/pull/50)
- change autoprefixer; [`#49`](https://github.com/GNS-Science/kororaa/pull/49)
- fix cypress tests; [`#47`](https://github.com/GNS-Science/kororaa/pull/47)
- Fix/latlon format [`#45`](https://github.com/GNS-Science/kororaa/pull/45)
- add new test deployment script; [`#46`](https://github.com/GNS-Science/kororaa/pull/46)
- Feature/23 hazard curve latlon [`#42`](https://github.com/GNS-Science/kororaa/pull/42)
- Feature/uncertainty spectra [`#38`](https://github.com/GNS-Science/kororaa/pull/38)
- Fix/cypress test update [`#37`](https://github.com/GNS-Science/kororaa/pull/37)
- Feature/hazard uncertainty [`#36`](https://github.com/GNS-Science/kororaa/pull/36)
- fix github actions; [`#35`](https://github.com/GNS-Science/kororaa/pull/35)
- Feature/cypress rebase [`#34`](https://github.com/GNS-Science/kororaa/pull/34)
- Feature/26 any poe [`#33`](https://github.com/GNS-Science/kororaa/pull/33)
- Feature/hazard curve improvements [`#28`](https://github.com/GNS-Science/kororaa/pull/28)
- Feature/hazard curves with api [`#22`](https://github.com/GNS-Science/kororaa/pull/22)
- add border to footer; grammar changes; [`#21`](https://github.com/GNS-Science/kororaa/pull/21)
- rupture sets page [`#20`](https://github.com/GNS-Science/kororaa/pull/20)
- Feature/13 hazard page improvements [`#15`](https://github.com/GNS-Science/kororaa/pull/15)
- Feature/9 hazard curves [`#12`](https://github.com/GNS-Science/kororaa/pull/12)
- Feature/3 landing page [`#6`](https://github.com/GNS-Science/kororaa/pull/6)

### Commits

- create react app [`7503457`](https://github.com/GNS-Science/kororaa/commit/7503457296c34bc74b9a3fd4354d548b66a1ef34)
- add named legend; update schema; add hazard model and resolution env; update msw data; fix cypress tests; [`8661b0a`](https://github.com/GNS-Science/kororaa/commit/8661b0a73d5de523c32173459a0548dce3dd2957)
- add hazard curves view [`f1c7af5`](https://github.com/GNS-Science/kororaa/commit/f1c7af5b484195e5bd57c786a6c6b1a46c6c2704)
2 changes: 2 additions & 0 deletions src/components/common/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ const NavBar: React.FC = () => {
{ name: 'About', path: '/About' },
{ name: 'Technical Info', path: '/TechInfo' },
{ name: 'Contacts', path: '/Contacts' },
{ name: 'Releases', path: '/Releases' },
],
},
];
Expand All @@ -195,6 +196,7 @@ const NavBar: React.FC = () => {
{ name: 'About', path: '/About' },
{ name: 'Technical Info', path: '/TechInfo' },
{ name: 'Contacts', path: '/Contacts' },
{ name: 'Releases', path: '/Releases' },
];

return (
Expand Down
52 changes: 52 additions & 0 deletions src/views/changelog/ChangelogPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import React, { useState, useEffect } from 'react';
import { Typography, Grid } from '@mui/material';
import { styled } from '@mui/material/styles';
import CHANGELOG from '../../CHANGELOG.md';
import ReactMarkdown from 'react-markdown';

const PageContainer = styled('div')({
justifyContent: 'center',
alignItems: 'center',
padding: '2rem',
marginBottom: '2rem',
});

const TitleContainer = styled('div')({
justifyContent: 'left',
textAlign: 'left',
width: '100%',
paddingBottom: '1rem',
});

const ChangelogPage: React.FC = () => {
const [markdown, setMarkdown] = useState('');

useEffect(() => {
fetch(CHANGELOG)
.then((res) => res.text())
.then((text) => setMarkdown(text.replace('# Changelog', '')));
}, []);

return (
<PageContainer>
<Grid container columns={{ sm: 6, md: 8, lg: 12 }}>
<Grid item xs={2} />
<Grid item xs={8}>
<Grid container spacing={2} columns={{ sm: 6, md: 8, lg: 12 }}>
<Grid item xs={12}>
<TitleContainer>
<Typography variant="h2">Releases</Typography>
</TitleContainer>
</Grid>
<Grid item>
<ReactMarkdown>{markdown}</ReactMarkdown>
</Grid>
</Grid>
</Grid>
<Grid item xs={2} />
</Grid>
</PageContainer>
);
};

export default ChangelogPage;
Loading

0 comments on commit 6948a0d

Please sign in to comment.