Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #535 & #542 & #541 & #409 & #529 & #549 & #590 & #579 & #568 & #506 & #557 & #574 & #594 #592

Merged
merged 29 commits into from
Feb 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a89cb4e
Set min height for the editor
jonnetanninen Feb 8, 2018
2152a36
Replace rekisteröityneet with kirjautuneet
jonnetanninen Feb 8, 2018
58c49b2
Replace success and error messages with react-toastify
jonnetanninen Feb 12, 2018
a4b71a5
Fix navbar on IE
jonnetanninen Feb 12, 2018
7c73731
Update snapshots
jonnetanninen Feb 12, 2018
04f5699
Fix social buttons so they update the shared url when changing subsec…
jonnetanninen Feb 12, 2018
108554f
Add title for pages
jonnetanninen Feb 12, 2018
30de015
Add swedish translations
jonnetanninen Feb 12, 2018
013b20b
Update snapshots
jonnetanninen Feb 12, 2018
148fbc4
Show ContactList only in main section
jonnetanninen Feb 13, 2018
6aab46b
Add react-images Lightbox to open hearing image in fullscreen if clicked
jonnetanninen Feb 13, 2018
da68397
Update snapshots
jonnetanninen Feb 13, 2018
6138231
Dangerously set closure info as html to support old closure messages
jonnetanninen Feb 14, 2018
89b717f
Translate zoom control tooltips
jonnetanninen Feb 14, 2018
bbc39a1
Fix #557, show spinner when loading section comments
jonnetanninen Feb 14, 2018
d6aece9
Add custom prevButton to carousel to fix slick caused bug
jonnetanninen Feb 14, 2018
886ebe2
Update snapshots
jonnetanninen Feb 14, 2018
9f7b096
Merge branch 'master' into feature/small-improvements
jonnetanninen Feb 16, 2018
67ddccf
Add handling for specific errors
jonnetanninen Feb 19, 2018
5c16494
Merge branch 'feature/small-improvements' of https://github.com/City-…
jonnetanninen Feb 19, 2018
c9473e8
Update snapshots
jonnetanninen Feb 19, 2018
2e101f2
Style notifications
jonnetanninen Feb 20, 2018
afd8900
Change hearing page title to title of the hearing
jonnetanninen Feb 20, 2018
0fcfc41
Show spinner in same position as the list and update render logic of …
jonnetanninen Feb 20, 2018
1ffd35d
Hide form in hearing drafts
jonnetanninen Feb 20, 2018
0d28e96
Update test
jonnetanninen Feb 20, 2018
fef8e35
Update snapshots
jonnetanninen Feb 20, 2018
2c6e0ec
use n_comments instead of count
jonnetanninen Feb 22, 2018
6aaab97
Update snapshot
jonnetanninen Feb 22, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ exports[`HearingContainer component should render as expected 1`] = `
className="hearing-page"
>
<div>
<HelmetWrapper
title="Ideoi Isosaaren tulevaisuutta"
/>
<div
className="hearing-wrapper"
id="hearing-wrapper"
Expand Down Expand Up @@ -305,6 +308,7 @@ exports[`HearingContainer component should render as expected 1`] = `
"inLanguage-sv": "ruotsiksi",
"infoHeaderDescription": "Tämä on palvelun väliaikainen prototyyppi, josta toivomme käyttäjien kommentteja",
"infoHeaderText": "Tietoa palvelusta",
"infoPage": "Tietoa palvelusta",
"labelPlaceholder": "Anna asiasanan nimi...",
"lang-en": "English",
"lang-fi": "Suomi",
Expand All @@ -314,10 +318,13 @@ exports[`HearingContainer component should render as expected 1`] = `
"leastCommented": "Vähiten kommentoitu",
"list": "Lista",
"login": "Kirjaudu sisään",
"loginToComment": "Kirjaudu sisään kommentoidaksesi.",
"loginToContinue": "Kirjaudu sisään jatkaaksesi",
"loginToVoteComment": "Kirjaudu sisään äänestääksesi kommenttia.",
"logout": "Kirjaudu ulos",
"mainSection": "Pääosio",
"map": "Kartta",
"mapView": "Kaikki kuulemiset kartalla",
"mostCommented": "Eniten kommentoitu",
"moveDown": "Siirrä alas",
"moveUp": "Siirrä ylös",
Expand Down Expand Up @@ -349,7 +356,7 @@ exports[`HearingContainer component should render as expected 1`] = `
"publishingQueue": "Julkaisujono",
"register": "Rekisteröidy",
"registered": "rekisteröitynyt",
"registeredUsersOnly": "Vain rekisteröityneet käyttäjät",
"registeredUsersOnly": "Vain kirjautuneet käyttäjät",
"removeImage": "Poista kuva",
"revertPublishing": "Peru julkaisu",
"saveAndPreviewHearing": "Tallenna ja tarkastele luonnosta",
Expand Down Expand Up @@ -696,6 +703,7 @@ exports[`HearingContainer component should render as expected 1`] = `
"inLanguage-sv": "ruotsiksi",
"infoHeaderDescription": "Tämä on palvelun väliaikainen prototyyppi, josta toivomme käyttäjien kommentteja",
"infoHeaderText": "Tietoa palvelusta",
"infoPage": "Tietoa palvelusta",
"labelPlaceholder": "Anna asiasanan nimi...",
"lang-en": "English",
"lang-fi": "Suomi",
Expand All @@ -705,10 +713,13 @@ exports[`HearingContainer component should render as expected 1`] = `
"leastCommented": "Vähiten kommentoitu",
"list": "Lista",
"login": "Kirjaudu sisään",
"loginToComment": "Kirjaudu sisään kommentoidaksesi.",
"loginToContinue": "Kirjaudu sisään jatkaaksesi",
"loginToVoteComment": "Kirjaudu sisään äänestääksesi kommenttia.",
"logout": "Kirjaudu ulos",
"mainSection": "Pääosio",
"map": "Kartta",
"mapView": "Kaikki kuulemiset kartalla",
"mostCommented": "Eniten kommentoitu",
"moveDown": "Siirrä alas",
"moveUp": "Siirrä ylös",
Expand Down Expand Up @@ -740,7 +751,7 @@ exports[`HearingContainer component should render as expected 1`] = `
"publishingQueue": "Julkaisujono",
"register": "Rekisteröidy",
"registered": "rekisteröitynyt",
"registeredUsersOnly": "Vain rekisteröityneet käyttäjät",
"registeredUsersOnly": "Vain kirjautuneet käyttäjät",
"removeImage": "Poista kuva",
"revertPublishing": "Peru julkaisu",
"saveAndPreviewHearing": "Tallenna ja tarkastele luonnosta",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ exports[`SectionContainer component should render as expected 1`] = `
>
<SectionImageComponent
caption="A Wonderfull caption"
closeLightbox={[Function]}
image={
Object {
"caption": Object {
Expand All @@ -37,6 +38,8 @@ exports[`SectionContainer component should render as expected 1`] = `
"width": 893,
}
}
openLightbox={[Function]}
showLightbox={false}
/>
<div
className="section-abstract lead"
Expand Down Expand Up @@ -129,6 +132,7 @@ exports[`SectionContainer component should render as expected 1`] = `
onEditComment={[Function]}
onPostComment={[Function]}
onPostVote={[Function]}
published={true}
section={
Object {
"abstract": Object {
Expand Down
27 changes: 27 additions & 0 deletions __tests__/Hearing/__snapshots__/SectionImage.react-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

exports[`SectionImage component should render as expected 1`] = `
<div
className="section-image"
key="https://api.hel.fi/kerrokantasi-test/media/images/2017/10/LzqVMrMI.jpeg"
>
<img
Expand All @@ -10,6 +11,32 @@ exports[`SectionImage component should render as expected 1`] = `
src="https://api.hel.fi/kerrokantasi-test/media/images/2017/10/LzqVMrMI.jpeg"
title="Amazing Title"
/>
<Lightbox
closeButtonTitle="Close (Esc)"
currentImage={0}
enableKeyboardInput={true}
imageCountSeparator=" of "
images={
Array [
Object {
"src": "https://api.hel.fi/kerrokantasi-test/media/images/2017/10/LzqVMrMI.jpeg",
},
]
}
leftArrowTitle="Previous (Left arrow key)"
onClickShowNextImage={true}
preloadNextImage={true}
preventScroll={true}
rightArrowTitle="Next (Right arrow key)"
showCloseButton={true}
showImageCount={true}
spinner={[Function]}
spinnerColor="white"
spinnerSize={100}
theme={Object {}}
thumbnailOffset={2}
width={1024}
/>
<div
className="image-caption"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ exports[`HearingsList component should render as expected 1`] = `
"inLanguage-sv": "ruotsiksi",
"infoHeaderDescription": "Tämä on palvelun väliaikainen prototyyppi, josta toivomme käyttäjien kommentteja",
"infoHeaderText": "Tietoa palvelusta",
"infoPage": "Tietoa palvelusta",
"labelPlaceholder": "Anna asiasanan nimi...",
"lang-en": "English",
"lang-fi": "Suomi",
Expand All @@ -143,10 +144,13 @@ exports[`HearingsList component should render as expected 1`] = `
"leastCommented": "Vähiten kommentoitu",
"list": "Lista",
"login": "Kirjaudu sisään",
"loginToComment": "Kirjaudu sisään kommentoidaksesi.",
"loginToContinue": "Kirjaudu sisään jatkaaksesi",
"loginToVoteComment": "Kirjaudu sisään äänestääksesi kommenttia.",
"logout": "Kirjaudu ulos",
"mainSection": "Pääosio",
"map": "Kartta",
"mapView": "Kaikki kuulemiset kartalla",
"mostCommented": "Eniten kommentoitu",
"moveDown": "Siirrä alas",
"moveUp": "Siirrä ylös",
Expand Down Expand Up @@ -178,7 +182,7 @@ exports[`HearingsList component should render as expected 1`] = `
"publishingQueue": "Julkaisujono",
"register": "Rekisteröidy",
"registered": "rekisteröitynyt",
"registeredUsersOnly": "Vain rekisteröityneet käyttäjät",
"registeredUsersOnly": "Vain kirjautuneet käyttäjät",
"removeImage": "Poista kuva",
"revertPublishing": "Peru julkaisu",
"saveAndPreviewHearing": "Tallenna ja tarkastele luonnosta",
Expand Down
6 changes: 5 additions & 1 deletion __tests__/Hearings/__snapshots__/Hearings.react-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ exports[`Hearings component should render as expected 1`] = `
"inLanguage-sv": "ruotsiksi",
"infoHeaderDescription": "Tämä on palvelun väliaikainen prototyyppi, josta toivomme käyttäjien kommentteja",
"infoHeaderText": "Tietoa palvelusta",
"infoPage": "Tietoa palvelusta",
"labelPlaceholder": "Anna asiasanan nimi...",
"lang-en": "English",
"lang-fi": "Suomi",
Expand All @@ -201,10 +202,13 @@ exports[`Hearings component should render as expected 1`] = `
"leastCommented": "Vähiten kommentoitu",
"list": "Lista",
"login": "Kirjaudu sisään",
"loginToComment": "Kirjaudu sisään kommentoidaksesi.",
"loginToContinue": "Kirjaudu sisään jatkaaksesi",
"loginToVoteComment": "Kirjaudu sisään äänestääksesi kommenttia.",
"logout": "Kirjaudu ulos",
"mainSection": "Pääosio",
"map": "Kartta",
"mapView": "Kaikki kuulemiset kartalla",
"mostCommented": "Eniten kommentoitu",
"moveDown": "Siirrä alas",
"moveUp": "Siirrä ylös",
Expand Down Expand Up @@ -236,7 +240,7 @@ exports[`Hearings component should render as expected 1`] = `
"publishingQueue": "Julkaisujono",
"register": "Rekisteröidy",
"registered": "rekisteröitynyt",
"registeredUsersOnly": "Vain rekisteröityneet käyttäjät",
"registeredUsersOnly": "Vain kirjautuneet käyttäjät",
"removeImage": "Poista kuva",
"revertPublishing": "Peru julkaisu",
"saveAndPreviewHearing": "Tallenna ja tarkastele luonnosta",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ exports[`FullWidthHearing component should render as expected 1`] = `
"inLanguage-sv": "ruotsiksi",
"infoHeaderDescription": "Tämä on palvelun väliaikainen prototyyppi, josta toivomme käyttäjien kommentteja",
"infoHeaderText": "Tietoa palvelusta",
"infoPage": "Tietoa palvelusta",
"labelPlaceholder": "Anna asiasanan nimi...",
"lang-en": "English",
"lang-fi": "Suomi",
Expand All @@ -127,10 +128,13 @@ exports[`FullWidthHearing component should render as expected 1`] = `
"leastCommented": "Vähiten kommentoitu",
"list": "Lista",
"login": "Kirjaudu sisään",
"loginToComment": "Kirjaudu sisään kommentoidaksesi.",
"loginToContinue": "Kirjaudu sisään jatkaaksesi",
"loginToVoteComment": "Kirjaudu sisään äänestääksesi kommenttia.",
"logout": "Kirjaudu ulos",
"mainSection": "Pääosio",
"map": "Kartta",
"mapView": "Kaikki kuulemiset kartalla",
"mostCommented": "Eniten kommentoitu",
"moveDown": "Siirrä alas",
"moveUp": "Siirrä ylös",
Expand Down Expand Up @@ -162,7 +166,7 @@ exports[`FullWidthHearing component should render as expected 1`] = `
"publishingQueue": "Julkaisujono",
"register": "Rekisteröidy",
"registered": "rekisteröitynyt",
"registeredUsersOnly": "Vain rekisteröityneet käyttäjät",
"registeredUsersOnly": "Vain kirjautuneet käyttäjät",
"removeImage": "Poista kuva",
"revertPublishing": "Peru julkaisu",
"saveAndPreviewHearing": "Tallenna ja tarkastele luonnosta",
Expand Down
1 change: 1 addition & 0 deletions __tests__/SortableCommentList.react-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const setup = propOverrides => {
hearingId: mockHearingWithSections.data.id,
section: mockHearingWithSections.data.sections[1],
language: 'fi',
published: true,
fetchComments: () => {}
}, propOverrides);

Expand Down
6 changes: 6 additions & 0 deletions __tests__/__snapshots__/Carousel.react-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ exports[`Carousel component should render as expected 1`] = `
focusOnSelect={true}
infinite={false}
initialSlide={1}
prevArrow={
<PrevButton
currentSlide={undefined}
slidePrev={undefined}
/>
}
responsive={
Array [
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ exports[`SortableCommentList component should render as expected 1`] = `
name="comment-o"
/>

1
59
</div>
</h2>
<div
Expand Down Expand Up @@ -233,6 +233,7 @@ exports[`SortableCommentList component should render as expected 1`] = `
"inLanguage-sv": "ruotsiksi",
"infoHeaderDescription": "Tämä on palvelun väliaikainen prototyyppi, josta toivomme käyttäjien kommentteja",
"infoHeaderText": "Tietoa palvelusta",
"infoPage": "Tietoa palvelusta",
"labelPlaceholder": "Anna asiasanan nimi...",
"lang-en": "English",
"lang-fi": "Suomi",
Expand All @@ -242,10 +243,13 @@ exports[`SortableCommentList component should render as expected 1`] = `
"leastCommented": "Vähiten kommentoitu",
"list": "Lista",
"login": "Kirjaudu sisään",
"loginToComment": "Kirjaudu sisään kommentoidaksesi.",
"loginToContinue": "Kirjaudu sisään jatkaaksesi",
"loginToVoteComment": "Kirjaudu sisään äänestääksesi kommenttia.",
"logout": "Kirjaudu ulos",
"mainSection": "Pääosio",
"map": "Kartta",
"mapView": "Kaikki kuulemiset kartalla",
"mostCommented": "Eniten kommentoitu",
"moveDown": "Siirrä alas",
"moveUp": "Siirrä ylös",
Expand Down Expand Up @@ -277,7 +281,7 @@ exports[`SortableCommentList component should render as expected 1`] = `
"publishingQueue": "Julkaisujono",
"register": "Rekisteröidy",
"registered": "rekisteröitynyt",
"registeredUsersOnly": "Vain rekisteröityneet käyttäjät",
"registeredUsersOnly": "Vain kirjautuneet käyttäjät",
"removeImage": "Poista kuva",
"revertPublishing": "Peru julkaisu",
"saveAndPreviewHearing": "Tallenna ja tarkastele luonnosta",
Expand Down
8 changes: 5 additions & 3 deletions assets/sass/hel/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ html {
body {
position: relative;
min-height: 100%;
@media (min-width: $screen-md-min) {
/* @media (min-width: $screen-md-min) {
padding-bottom: $site-footer-height + ($line-height-computed * 3);
}
} */
}

p {
Expand Down Expand Up @@ -135,10 +135,12 @@ a.fullwidth {
}

.social-bar {
display: flex;
flex-direction: row;
margin: 12px 0;
}

// These styles could be eventually introduced to common Bootstrap theme
.btn.btn-default {
background-color: transparent;
}
}
2 changes: 1 addition & 1 deletion assets/sass/hel/footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

@media (min-width: $screen-md-min) {
height: $site-footer-height;
position: absolute;
// position: absolute;
bottom: 0;
left: 0;
right: 0;
Expand Down
1 change: 1 addition & 0 deletions assets/sass/hel/hearing-form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ $node_modules: "../../../node_modules";
.rich-text-editor {
.DraftEditor-editorContainer {
border: 2px solid $black;
min-height: 90px;
}
}

Expand Down
4 changes: 4 additions & 0 deletions assets/sass/hel/hearing-page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

.hearing-content-section {
padding-top: $line-height-computed * 2;

.section-image:hover {
cursor: pointer;
}
}

.hearing-header {
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"react-dropzone": "^3.13.3",
"react-helmet": "^2.2.0",
"react-hot-loader": "^3.0.0-beta.6",
"react-images": "^0.5.17",
"react-intl": "2.0.0-rc-1",
"react-leaflet": "^1.7.4",
"react-leaflet-draw": "^0.17.0",
Expand All @@ -105,6 +106,8 @@
"react-router-redux": "^5.0.0-alpha.6",
"react-select": "^1.0.0-rc.2",
"react-slick": "^0.15.4",
"react-toastify": "^3.3.2",
"react-twitter-widgets": "^1.7.1",
"react-waypoint": "^4.1.0",
"redux": "^3.0.4",
"redux-actions": "0.13.0",
Expand Down
9 changes: 9 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import config from './config';
import {getUser} from './selectors/user';
import Routes from './routes';
import {withRouter} from 'react-router-dom';
import {ToastContainer} from 'react-toastify';

class App extends React.Component {
getChildContext() {
Expand Down Expand Up @@ -58,6 +59,14 @@ class App extends React.Component {
<Routes />
</main>
<Footer />
<ToastContainer
bodyClassName={
{
padding: '7px 7px 7px 12px',
fontFamily: '"HelsinkiGrotesk", Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif'
}
}
/>
</div>
</IntlProvider>
);
Expand Down
Loading