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

[Design] 500 page #53

Open
gsambrotta opened this issue Apr 16, 2021 · 0 comments
Open

[Design] 500 page #53

gsambrotta opened this issue Apr 16, 2021 · 0 comments
Labels
design Ui mockup is required

Comments

@gsambrotta
Copy link
Collaborator

We would like to have a custom 500 page.
Please create a mock-up so we can discuss it together.

We would like to keep the same style of our 400 page:
https://elliotforwater.com/lalala

@gsambrotta gsambrotta added the design Ui mockup is required label Apr 16, 2021
gsambrotta added a commit that referenced this issue Apr 20, 2021
fix header, mobile layout, related search counted

* fix header, mobile layout, related search counted
gsambrotta added a commit that referenced this issue Apr 20, 2021
* env development, clean up search page

* Merged in update-api-url (pull request #37)

update staging api url

* update staging api url

* Add to browser btn

* start to make search counter a react component

* usercontext set up

* show/hide add to btn, searches count with cookies, fix getInitialProps warning

* change Postcss extend plugin, previous plugin was old and with false warning

* delete SearchCount component and web component

* fix storybook

* fix all tests

* add types for chrome

* fix mismatch cookie, fix autocapitalize searchbar

* Merged in fix-search-page (pull request #41)

Fix: SearchBar search functionality, Add Microsoft Results Link, Remove "0" from Sidebar

* clean up

* fetch suggested words just no arrow down/up are pressed

* translation, fix url

* add microsoft results link

* Merged in related-search-mobile (pull request #42)

Related search mobile

* add refined searches on mobile

* fix grid children overflowing

* clean up

* Merged in load-more-fix (pull request #43)

Load more fix

* fix empty state bc results array wasn't rerender to children

* fix load more

* adjust stories and tests

* fix merge conflicts

* clean up

* * header not sticky to top anymore

* fix searchbar, logo, refined search and grid layout

* fix footer line and results by microsoft style

* fix layout homepage

* fix tests

* fix stories

* * translation and link for index, header, footer, nav. Close nav menu properly

* translation forms, search

* translation for privacy

* translation for terms

* fix close menu on click outside

* fix mismatch on browser button

* Merged in AddStagingConfigFile (pull request #39)

Add staging config

* Add staging config

Approved-by: giorgia

* Odometer new

* odometer for react

* remove old odometerjs, fix small stuff

* keep odometer without slider functionality

* package json

* fix slider odometer, hide typescript error

* Search small fixes

* fix ads icons, loading state

* not show resNumber on empty results

* hide result numbers and load more button on no results screen

* fix tests

* clean up

* Merged in organic-results-empty-state (pull request #49)

empty state based on organic results, not sponsored

* empty state based on organic results, not sponsored

* add metatag to all pages

* ModalForSettings

* Update url links and add basic modal example.

* Add modal component

* Fix linting issues

* Code tidy

* Add settings to User Context

* Add style

* fix merge conflicts, better buttons

* open in new tab, add adult filter to search request

* add global context for stories

* test for modal and settings form

* Testing environment files

* Testing API issues

* Update gitignore file

* Merged in whywater-fixes (pull request #52)

Why water fixes

* fix why water

* fix subscribe form and add error messages

* Merged in ui-fixes (pull request #53)

fix header, mobile layout, related search counted

* fix header, mobile layout, related search counted

* Merged in fix-modal (pull request #54)

Better Modal

* new modal working, better contexts

* modal style

* fix stories and tests

* Merged in fix-footerlink-chrome (pull request #55)

remove transition from link

* remove transition from link

* fix adultFilter param from searchbar

* clean

* Merged in fix-cookies-firstrender (pull request #56)

Fix cookies firstrender

* correct cookies at first render

* pageDescription search

* clean up

* Merged in space-footer-speachbar (pull request #57)

FIX: footer long white space, video grid, load more on web results

* fix footer long white space, fix video grid, fix load more on web results

* Merged in searchbar-input (pull request #58)

Search-bar input with react form hooks

* start

* query with +, searchbar with react-form-hooks

* Merged in fix-news (pull request #59)

fix news no results

* fix news no results

* CI Test

* CI Test

* CI Test

* Merged in prefetch-api (pull request #60)

Prefetch api

* getInitialProps and redirect - half way

* ssr

* make load more works

* finish search with SSR, add isLoading

* * fix counter, use cookies package

* Merged in fix-counter (pull request #62)

Fix counter

* fix counter, use cookies package

* fix tests and stories

* Merged in chrome-error (pull request #63)

fix chrome mobile bug

* fix chrome mobile bug

* Merged in dropdown-fixes (pull request #64)

Dropdown fixes

* fix update search value on mousedown

* add 400 handling

* Merged in fix-typescript-err (pull request #65)

fix error

* fix error

* Merged in mobile-desktop-searchvalue (pull request #66)

Mobile desktop searchvalue

* fix double header mobile/desktop

* mock test mediaQuery

* Merged in clean-up-deps (pull request #70)

Clean up deps

* move dependencies to devDependencies

* update next-translate

* clearn dependencies, remove old site.js, use jquery cdn, add 500 codestate to search

* fix tooltip, settings checkbox

* Merged in fix-test (pull request #72)

fix test and update API env var

* fix test and update API env var

* Merged in fix-api (pull request #73)

fix api url, fix typo in npm run dev

* fix api url, fix typo in npm run dev

* testing prduction env in staging

* revert test api production/staging

* Merged in staging-env (pull request #74)

add command to set env variables

* add command to set env variables

* Merged in improve-performance (pull request #75)

Improve performance

* open dropdown on homepage, add page desctiotion to search page

* update font and colors in search page

* add google tab

* add google tab. add video, add bg homepage

* video chrome conditional

* add dropdown icons

* fix typescrypt error

* fix hover on dropdown more

* Merged in small-fixes (pull request #76)

Small fixes

* fix search bar value from refined search

* fix update query from homepage

* tabs align to searchbar, no adultfilter url

* clean up

* Merged in ssr (pull request #78)

add loading on router changes

* add loading on router changes

* Merged in PagingFix (pull request #79)

Fix paging

* Fix paging

Approved-by: Theophilus Boateng

* Merged in analyze (pull request #80)

Analyze plugin + new video

* add analyze plugin

* add vdeo

* Merged in video-safari (pull request #82)

video with better compression, fix mediaquery addListner for older browsers

* video with better compression, fix mediaquery addListner for older browsers

* Merged in setup-opensource (pull request #81)

Setup opensource

* update readme, API env url

* code of conduct, readme

* update readme, production api url

* Merged in api-mock (pull request #84)

Api mock

* add json-server to mock api

* add custom server with nocors

* add video and news endpoint

* clean up

* add azure deployment config (#10)

* remove NODE_TLS_REJECT_UNAUTHORIZED='0', better homepage background image (#7)

* remove NODE_TLS_REJECT_UNAUTHORIZED=0, imporve background image hp

* clean up

* fix: prevent unnecessarily setting search value state to undefined (#8)

In case of query being undefined and search value being an empty string
we'd be calling `setSearchValue` with `undefined` because `('' && undefined)`
evaluates to an empty string that would be unequal to undefined.

This leads to an extra render and a warning in the Header test:
"A component is changing a controlled input to be uncontrolled.
This is likely caused by the value changing from a defined to undefined,
which should not happen. Decide between using a controlled or uncontrolled
input element for the lifetime of the component."

* fix: improve code handling search input change (#9)

* fix: improve code handling search input change

* Make sure to use the actual input value from the event instead of
  the state because the state will be updated asynchronously.

* Don't activate suggestion functionality if we only have white space
  as input. Trim the string before checking.

Note:
The old code `('' || undefined)` will always result in `undefined`.
Seems as if the intended code is `(searchValue !== '' || searchValue !== undefined) && setIsSuggestionOpen(true)`
but probably `searchValue && setIsSuggestionOpen(true)` would be sufficient
because other falsy values such as `null` and `0` are not to be expected.

* fix: adjust input type handling radio or checkbox (#13)

* fix build and start scripts for deployment (#16)

* fix: prevent water counter to be increased on empty search submission (#15)

* Only increase number of searches if search input is not empty

* Refactor search function to require search input argument for better
  code readability (clearer composition of concerns)

* Explicitly deal with types of the query params

* Update README.md (#17)

Add status badges for branches main and develop

* Fix add to browser button (#19)

* fix show/hide addToBrowser for chrome

* fix hide/show button for firefox

* clean up

* declare window

* retrieve user cookies in user context, not layout (#21)

* fix: hide gmail tab on mobile (#18)

* hide gmail tab on mobile

* clean up console log

* fix dropdown position on tablet, hide gmail on Mobile device and on window resize

* fix test mocking mediaQuery

* fix: set initital cookies on _app.tsx (#22)

* set init cookie on _app

* add cookies value to user state

* fix: set cookie init value to user state (#23)

* fix open in a new tab string to boolean

* clean up

* add License to develop (#25)

* Test Update issue templates

* same template as main

* Create bug report issue template

* Create PR template

* add codeowners file (#24)

* hotfix: hardcoded adultcontentfilter 1

* fix grab adultContentFilter on search page server side, add NODE_TLS_REJECT_UNAUTHORIZED to env.development instead of package.json (#26)

* fix: assign adult content filter value starting counting form 0 (#28)

* Add: google analytics tracking (#30)

* add ga tracking number and page view

* clean up

* clean up again

* Fix mock api cors errors (#20)

* Add allow any headers on local host

* Add allow origin to fix CORS issue

* Update mockapiServer.js

Removed the middleware as no longer used

* Update mockapiServer.js

Remove custom headers as working with just the defaults

* fix: set user state cookie expiration to 1 year (#27)

Default is session, so until user closes browser which is not what we want.

Additionally refactor and clean up user state hook and context:
* Improve naming things according to what they do/are
* Move everything cookie-related to the hook
* Add tests

Relates to my comments on #22

* chore: remove unused code (#31)

* fix: add check if chrome runtime is defined (#32)

* chore: Update npm modules and recreate package-lock.json (#35)

* regenerate package-lock

* add versions to readme

* trying something to fix merge conflict (#36)

* fix chrome add to browser (#37)

* feature: Add Open search tags  (#39)

* add opensearch xml and link

* add parameters

* move opensearch.xml in public folder

* add param in the param tag (#40)

* feature: server-side rendering with user state from cookies (#33)

* feature: server-side rendering with user state from cookies

* chore: fix depency issue

* Refactor: move cookie related code to cookies helper (#41)

* refactor: move cookie-related code to cookies helper

* refactor: move type conversion of cookie values to cookies helper

* fix: update url if we have just a q param from search url (#42)

* fix: add redirect from old why water to new one (#43)

* fix: update input search field name (#44)

* add title, location and proper url to ga pageview (#45)

* add contentful with graphql

* add hero, fetchContenfulGrapqh helper

* refactor contact form, button and team section

* import carousel component and adapt to our code

* fix contentful model and rmeove Carousel

* import and use slick sliders

* slide styles

* contentful, start css mobile, slide resize width, useWindowResize hook

* resize slide

* style for mobile

* finish style mobile

* improve buttons implementation

* add person component

* fix build

* add graphql url env

* Update azure-pipelines.yml for Azure Pipelines

Co-authored-by: Conrad Parker <[email protected]>
Co-authored-by: Conrad <[email protected]>
Co-authored-by: xMartin <[email protected]>
gsambrotta added a commit that referenced this issue Apr 21, 2021
* env development, clean up search page

* Merged in update-api-url (pull request #37)

update staging api url

* update staging api url

* Add to browser btn

* start to make search counter a react component

* usercontext set up

* show/hide add to btn, searches count with cookies, fix getInitialProps warning

* change Postcss extend plugin, previous plugin was old and with false warning

* delete SearchCount component and web component

* fix storybook

* fix all tests

* add types for chrome

* fix mismatch cookie, fix autocapitalize searchbar

* Merged in fix-search-page (pull request #41)

Fix: SearchBar search functionality, Add Microsoft Results Link, Remove "0" from Sidebar

* clean up

* fetch suggested words just no arrow down/up are pressed

* translation, fix url

* add microsoft results link

* Merged in related-search-mobile (pull request #42)

Related search mobile

* add refined searches on mobile

* fix grid children overflowing

* clean up

* Merged in load-more-fix (pull request #43)

Load more fix

* fix empty state bc results array wasn't rerender to children

* fix load more

* adjust stories and tests

* fix merge conflicts

* clean up

* * header not sticky to top anymore

* fix searchbar, logo, refined search and grid layout

* fix footer line and results by microsoft style

* fix layout homepage

* fix tests

* fix stories

* * translation and link for index, header, footer, nav. Close nav menu properly

* translation forms, search

* translation for privacy

* translation for terms

* fix close menu on click outside

* fix mismatch on browser button

* Merged in AddStagingConfigFile (pull request #39)

Add staging config

* Add staging config

Approved-by: giorgia

* Odometer new

* odometer for react

* remove old odometerjs, fix small stuff

* keep odometer without slider functionality

* package json

* fix slider odometer, hide typescript error

* Search small fixes

* fix ads icons, loading state

* not show resNumber on empty results

* hide result numbers and load more button on no results screen

* fix tests

* clean up

* Merged in organic-results-empty-state (pull request #49)

empty state based on organic results, not sponsored

* empty state based on organic results, not sponsored

* add metatag to all pages

* ModalForSettings

* Update url links and add basic modal example.

* Add modal component

* Fix linting issues

* Code tidy

* Add settings to User Context

* Add style

* fix merge conflicts, better buttons

* open in new tab, add adult filter to search request

* add global context for stories

* test for modal and settings form

* Testing environment files

* Testing API issues

* Update gitignore file

* Merged in whywater-fixes (pull request #52)

Why water fixes

* fix why water

* fix subscribe form and add error messages

* Merged in ui-fixes (pull request #53)

fix header, mobile layout, related search counted

* fix header, mobile layout, related search counted

* Merged in fix-modal (pull request #54)

Better Modal

* new modal working, better contexts

* modal style

* fix stories and tests

* Merged in fix-footerlink-chrome (pull request #55)

remove transition from link

* remove transition from link

* fix adultFilter param from searchbar

* clean

* Merged in fix-cookies-firstrender (pull request #56)

Fix cookies firstrender

* correct cookies at first render

* pageDescription search

* clean up

* Merged in space-footer-speachbar (pull request #57)

FIX: footer long white space, video grid, load more on web results

* fix footer long white space, fix video grid, fix load more on web results

* Merged in searchbar-input (pull request #58)

Search-bar input with react form hooks

* start

* query with +, searchbar with react-form-hooks

* Merged in fix-news (pull request #59)

fix news no results

* fix news no results

* CI Test

* CI Test

* CI Test

* Merged in prefetch-api (pull request #60)

Prefetch api

* getInitialProps and redirect - half way

* ssr

* make load more works

* finish search with SSR, add isLoading

* * fix counter, use cookies package

* Merged in fix-counter (pull request #62)

Fix counter

* fix counter, use cookies package

* fix tests and stories

* Merged in chrome-error (pull request #63)

fix chrome mobile bug

* fix chrome mobile bug

* Merged in dropdown-fixes (pull request #64)

Dropdown fixes

* fix update search value on mousedown

* add 400 handling

* Merged in fix-typescript-err (pull request #65)

fix error

* fix error

* Merged in mobile-desktop-searchvalue (pull request #66)

Mobile desktop searchvalue

* fix double header mobile/desktop

* mock test mediaQuery

* Merged in clean-up-deps (pull request #70)

Clean up deps

* move dependencies to devDependencies

* update next-translate

* clearn dependencies, remove old site.js, use jquery cdn, add 500 codestate to search

* fix tooltip, settings checkbox

* Merged in fix-test (pull request #72)

fix test and update API env var

* fix test and update API env var

* Merged in fix-api (pull request #73)

fix api url, fix typo in npm run dev

* fix api url, fix typo in npm run dev

* testing prduction env in staging

* revert test api production/staging

* Merged in staging-env (pull request #74)

add command to set env variables

* add command to set env variables

* Merged in improve-performance (pull request #75)

Improve performance

* open dropdown on homepage, add page desctiotion to search page

* update font and colors in search page

* add google tab

* add google tab. add video, add bg homepage

* video chrome conditional

* add dropdown icons

* fix typescrypt error

* fix hover on dropdown more

* Merged in small-fixes (pull request #76)

Small fixes

* fix search bar value from refined search

* fix update query from homepage

* tabs align to searchbar, no adultfilter url

* clean up

* Merged in ssr (pull request #78)

add loading on router changes

* add loading on router changes

* Merged in PagingFix (pull request #79)

Fix paging

* Fix paging

Approved-by: Theophilus Boateng

* Merged in analyze (pull request #80)

Analyze plugin + new video

* add analyze plugin

* add vdeo

* Merged in video-safari (pull request #82)

video with better compression, fix mediaquery addListner for older browsers

* video with better compression, fix mediaquery addListner for older browsers

* Merged in setup-opensource (pull request #81)

Setup opensource

* update readme, API env url

* code of conduct, readme

* update readme, production api url

* Merged in api-mock (pull request #84)

Api mock

* add json-server to mock api

* add custom server with nocors

* add video and news endpoint

* clean up

* add azure deployment config (#10)

* remove NODE_TLS_REJECT_UNAUTHORIZED='0', better homepage background image (#7)

* remove NODE_TLS_REJECT_UNAUTHORIZED=0, imporve background image hp

* clean up

* fix: prevent unnecessarily setting search value state to undefined (#8)

In case of query being undefined and search value being an empty string
we'd be calling `setSearchValue` with `undefined` because `('' && undefined)`
evaluates to an empty string that would be unequal to undefined.

This leads to an extra render and a warning in the Header test:
"A component is changing a controlled input to be uncontrolled.
This is likely caused by the value changing from a defined to undefined,
which should not happen. Decide between using a controlled or uncontrolled
input element for the lifetime of the component."

* fix: improve code handling search input change (#9)

* fix: improve code handling search input change

* Make sure to use the actual input value from the event instead of
  the state because the state will be updated asynchronously.

* Don't activate suggestion functionality if we only have white space
  as input. Trim the string before checking.

Note:
The old code `('' || undefined)` will always result in `undefined`.
Seems as if the intended code is `(searchValue !== '' || searchValue !== undefined) && setIsSuggestionOpen(true)`
but probably `searchValue && setIsSuggestionOpen(true)` would be sufficient
because other falsy values such as `null` and `0` are not to be expected.

* fix: adjust input type handling radio or checkbox (#13)

* fix build and start scripts for deployment (#16)

* fix: prevent water counter to be increased on empty search submission (#15)

* Only increase number of searches if search input is not empty

* Refactor search function to require search input argument for better
  code readability (clearer composition of concerns)

* Explicitly deal with types of the query params

* Update README.md (#17)

Add status badges for branches main and develop

* Fix add to browser button (#19)

* fix show/hide addToBrowser for chrome

* fix hide/show button for firefox

* clean up

* declare window

* retrieve user cookies in user context, not layout (#21)

* fix: hide gmail tab on mobile (#18)

* hide gmail tab on mobile

* clean up console log

* fix dropdown position on tablet, hide gmail on Mobile device and on window resize

* fix test mocking mediaQuery

* fix: set initital cookies on _app.tsx (#22)

* set init cookie on _app

* add cookies value to user state

* fix: set cookie init value to user state (#23)

* fix open in a new tab string to boolean

* clean up

* add License to develop (#25)

* Test Update issue templates

* same template as main

* Create bug report issue template

* Create PR template

* add codeowners file (#24)

* hotfix: hardcoded adultcontentfilter 1

* fix grab adultContentFilter on search page server side, add NODE_TLS_REJECT_UNAUTHORIZED to env.development instead of package.json (#26)

* fix: assign adult content filter value starting counting form 0 (#28)

* Add: google analytics tracking (#30)

* add ga tracking number and page view

* clean up

* clean up again

* Fix mock api cors errors (#20)

* Add allow any headers on local host

* Add allow origin to fix CORS issue

* Update mockapiServer.js

Removed the middleware as no longer used

* Update mockapiServer.js

Remove custom headers as working with just the defaults

* fix: set user state cookie expiration to 1 year (#27)

Default is session, so until user closes browser which is not what we want.

Additionally refactor and clean up user state hook and context:
* Improve naming things according to what they do/are
* Move everything cookie-related to the hook
* Add tests

Relates to my comments on #22

* chore: remove unused code (#31)

* fix: add check if chrome runtime is defined (#32)

* chore: Update npm modules and recreate package-lock.json (#35)

* regenerate package-lock

* add versions to readme

* trying something to fix merge conflict (#36)

* fix chrome add to browser (#37)

* feature: Add Open search tags  (#39)

* add opensearch xml and link

* add parameters

* move opensearch.xml in public folder

* add param in the param tag (#40)

* feature: server-side rendering with user state from cookies (#33)

* feature: server-side rendering with user state from cookies

* chore: fix depency issue

* Refactor: move cookie related code to cookies helper (#41)

* refactor: move cookie-related code to cookies helper

* refactor: move type conversion of cookie values to cookies helper

* fix: update url if we have just a q param from search url (#42)

* fix: add redirect from old why water to new one (#43)

* fix: update input search field name (#44)

* add title, location and proper url to ga pageview (#45)

* add desktop style

Co-authored-by: Conrad Parker <[email protected]>
Co-authored-by: Conrad <[email protected]>
Co-authored-by: xMartin <[email protected]>