Skip to content

Commit

Permalink
Merge pull request #592 from City-of-Helsinki/feature/small-improvements
Browse files Browse the repository at this point in the history
Fix #535 & #542 & #541 & #409 & #529 & #549 & #590 & #579 & #568 & #506 & #557 & #574 & #594
  • Loading branch information
Rikuoja authored Feb 23, 2018
2 parents d3d2fc8 + 6aaab97 commit ebd8ba2
Show file tree
Hide file tree
Showing 33 changed files with 394 additions and 112 deletions.
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 @@ -94,6 +94,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 @@ -106,6 +107,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

0 comments on commit ebd8ba2

Please sign in to comment.