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

Historical view v1 #4353

Merged
merged 46 commits into from
Jul 19, 2022
Merged

Historical view v1 #4353

merged 46 commits into from
Jul 19, 2022

Conversation

Kongkille
Copy link
Contributor

First version of historical view addressing #3938.

This PR introduces 4 different time ranges that users can use to explore past data. This also contains large infrastructure changes including large changes to our redux setup as well as changes to the zonemap allowing it to change on every hour.

Preview

image

Markus Killendahl and others added 30 commits June 21, 2022 09:49
* Update mock data

* Add jest

* Add initial test

* [historical view] Info (and FAQ) Modals (#4232)

* Lints scss file

* Fixes button colors

* Creates new fancy pill button

* Adds usage examples as JSDocs

* Adds new info modal

* Hides legal links from FAQ on mobile

* Adds new FAQ modal

* Adds the modals

* Updates icons and changes FAQ button back

* Adds a dash of padding

* Updates buttons to avoid style-props

* drop `electricitymap.contrib` from import (#4256)

* Comment out test

* Add middleware

* fix UI

* Fix timeslider disappearing

* Remove old datareducer

* Update redux

* Update fetch

* Remove unused grid property

* Add new reducer

* add yarn lock

* Enable tests

* Fix some bugs

* Move things around

* Improve ELEXON parser for historical refetch (#4266)

* Improve ELEXON parser for historical refetch

* Enable historical wind refetching

* fix zoneList

* Fix enterzone from ranking

* Update nl.json (#4231)

Co-authored-by: Viktor Andersson <30777521+VIKTORVAV99@users.noreply.github.com>

* Fix bug

* add hasData

* remove hasParser

* Added tests for validators (#4268)

* Add pytest

* Invert so 1=valid and 0=invalid

* Added tests for validators

* format

* Rename fixture file

* Replaces middleware

* Kills nightime feature

* Fixes "no-parser" message

* Fixes styling on Firefox

* Fixes polling

* Fixes bug in ranking panel

* Removes customDatetime

* Makes createStore simpler

* Removes firefox styling as it broke Chrome styling

* Makes eslint happy again

* Adds comments and deletes a few unused things

* Simplifies grid-success-state-changes

* Fixes hasData bug

* Removes old isNonClickable code from zonemap

Co-authored-by: Mads Nedergaard <nedergaardmads@gmail.com>
Co-authored-by: Viktor Andersson <30777521+VIKTORVAV99@users.noreply.github.com>
Co-authored-by: Pierre Segonne <32778266+pierresegonne@users.noreply.github.com>
Co-authored-by: Rodeobe <43032396+Rodeobe@users.noreply.github.com>
Co-authored-by: Felix Qvist <felix.qvist@gmail.com>
* Remove all related to feature flag

* add lockfile
* Adds new history files

* Adds new state files

* Changes mockserver to use new files

* Fixes exchange refactor bug to make test pass

* Fixes api test

* Lints file
Co-authored-by: Mads Nedergaard <nedergaardmads@gmail.com>
* [historical view] Implements a Settings modal (#4233)

* Lints scss file

* Fixes button colors

* Lints scss file

* Fixes button colors

* Adds styling for disabled and makes button more flexible for other languages

* Adds new settings modal

* Makes toggle tooltip placement flexible

* Adds setting to reducer

* Moves logic to button cmp and simplifies usage

* [E2E] Tests map, country panel and ranking panel (#4267)

* [historical view] Map buttons for info and settings modal (#4250)

* Update to new dataReducer (#4265)

* Update mock data

* Add jest

* Add initial test

* [historical view] Info (and FAQ) Modals (#4232)

* Lints scss file

* Fixes button colors

* Creates new fancy pill button

* Adds usage examples as JSDocs

* Adds new info modal

* Hides legal links from FAQ on mobile

* Adds new FAQ modal

* Adds the modals

* Updates icons and changes FAQ button back

* Adds a dash of padding

* Updates buttons to avoid style-props

* drop `electricitymap.contrib` from import (#4256)

* Comment out test

* Add middleware

* fix UI

* Fix timeslider disappearing

* Remove old datareducer

* Update redux

* Update fetch

* Remove unused grid property

* Add new reducer

* add yarn lock

* Enable tests

* Fix some bugs

* Move things around

* Improve ELEXON parser for historical refetch (#4266)

* Improve ELEXON parser for historical refetch

* Enable historical wind refetching

* fix zoneList

* Fix enterzone from ranking

* Update nl.json (#4231)

Co-authored-by: Viktor Andersson <30777521+VIKTORVAV99@users.noreply.github.com>

* Fix bug

* add hasData

* remove hasParser

* Added tests for validators (#4268)

* Add pytest

* Invert so 1=valid and 0=invalid

* Added tests for validators

* format

* Rename fixture file

* Replaces middleware

* Kills nightime feature

* Fixes "no-parser" message

* Fixes styling on Firefox

* Fixes polling

* Fixes bug in ranking panel

* Removes customDatetime

* Makes createStore simpler

* Removes firefox styling as it broke Chrome styling

* Makes eslint happy again

* Adds comments and deletes a few unused things

* Simplifies grid-success-state-changes

* Fixes hasData bug

* Removes old isNonClickable code from zonemap

Co-authored-by: Mads Nedergaard <nedergaardmads@gmail.com>
Co-authored-by: Viktor Andersson <30777521+VIKTORVAV99@users.noreply.github.com>
Co-authored-by: Pierre Segonne <32778266+pierresegonne@users.noreply.github.com>
Co-authored-by: Rodeobe <43032396+Rodeobe@users.noreply.github.com>
Co-authored-by: Felix Qvist <felix.qvist@gmail.com>

* [historical-view] use history as default (#4264)

* Remove all related to feature flag

* add lockfile

* Removes feature-toggle-checks

* renames component to hidden

* Updates countrypanel test after his-view changes

* Fixes test in ranking

Co-authored-by: Markus Killendahl <markus.killendahl@tmrow.com>
Co-authored-by: Viktor Andersson <30777521+VIKTORVAV99@users.noreply.github.com>
Co-authored-by: Pierre Segonne <32778266+pierresegonne@users.noreply.github.com>
Co-authored-by: Rodeobe <43032396+Rodeobe@users.noreply.github.com>
Co-authored-by: Felix Qvist <felix.qvist@gmail.com>
* disable datedisplay on load

* install react-spinner lib

* add loading and refactor timeaxis

* remove testing selector

* change color of pulseloader
Co-authored-by: Mads Nedergaard <nedergaardmads@gmail.com>
* Moves styling to SC

* Updates styling for timeslider input.
This add the icon back and fixes bugs on Firefox
* Adds start script that uses nodemon

* Updates dependencies
* Allows ingestion of details with empty array

* Add changes back. git is hard

* Add estimation_method flag in zones

* Add script to update mock data

* Update mock data

* allow estimation method in pydantic

* pass test

* pass test hopefully

* Update web/cypress/integration/ranking.spec.js

Co-authored-by: Mads Nedergaard <nedergaardmads@gmail.com>

* Update web/src/helpers/redux.js

Co-authored-by: Mads Nedergaard <nedergaardmads@gmail.com>

* Remove unused package in mockserver

* format

Co-authored-by: Mads Nedergaard <nedergaardmads@gmail.com>
* Makes it possible to hover and interact with graphs...
without affecting the timeslider component and globally selected time

* Applies same changes to emissions graph

* Adds a test id so we can setup e2e tests

* Adds e2e testing of graph hover

* Moves hover index handling inside AreaGraph

* Moves data start and end date measurement inside areagraph

* Shows marker based on selected time on TimeSlider.
As a fallback if graph is not hovered
* Adds new social share image

* Removes eslint-disable comments

* Changes link to button

* Adds labels, types and a few minor things

* Changes links to buttons

* Makes circulargauge tooltips aria hidden for now

* Replaces Twitter JS widget with a styled button
* Moves styling to SC

* Updates styling for timeslider input.
This add the icon back and fixes bugs on Firefox
* displays exchanges for all hours

* Generate new mock data

* fix timeslider test

* Uses fixture data directly in cypress test

* Update web/cypress/integration/timeslider.spec.js

Co-authored-by: Mads Nedergaard <nedergaardmads@gmail.com>
* Fix formatting

* Fix loading jumping
* Add date to map tooltip

* zonemap colors correctly updates

* Add aggregate label

* Disable wind and solar data
Markus Killendahl and others added 6 commits July 5, 2022 10:27
* Fix graph bin width

* Fix rendering errors

* Minor changes

Co-authored-by: Markus Killendahl <markus.killendahl@tmrow.com>
* Unrelated bug fix

* Ensure aggregate label appears
@github-actions github-actions bot added dependencies Pull requests that update a dependency file frontend 🎨 infrastructure translations 🗣 labels Jul 18, 2022
Copy link
Member

@VIKTORVAV99 VIKTORVAV99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just took a quick look at the code changes and didn't find anything major but I left 2 suggestions for the ci (workflow) files.

.github/workflows/CI.yml Outdated Show resolved Hide resolved
.github/workflows/jest.yml Outdated Show resolved Hide resolved
Markus Killendahl and others added 5 commits July 18, 2022 17:35
Co-authored-by: Viktor Andersson <30777521+VIKTORVAV99@users.noreply.github.com>
Co-authored-by: Viktor Andersson <30777521+VIKTORVAV99@users.noreply.github.com>
@Kongkille
Copy link
Contributor Author

Just took a quick look at the code changes and didn't find anything major but I left 2 suggestions for the ci (workflow) files.

Thanks! Most of this code should also have been reviewed throughout so hopefully, it all works.

In either case, we'll probably run into a few issues since the infrastructure and UI has been changed so drastically but i'll be monitoring a lot over the next couple of weeks :-)

@VIKTORVAV99
Copy link
Member

VIKTORVAV99 commented Jul 18, 2022

Just took a quick look at the code changes and didn't find anything major but I left 2 suggestions for the ci (workflow) files.

Thanks! Most of this code should also have been reviewed throughout so hopefully, it all works.

In either case, we'll probably run into a few issues since the infrastructure and UI has been changed so drastically but i'll be monitoring a lot over the next couple of weeks :-)

Yeah I expect we'll find some small UI issues (missing translations mainly) and such as well but it's expected. Should be no major issues though since like you said it has been reviewed throughout (I've been keeping an eye on some of the PRs as well 😉).

@Kongkille Kongkille enabled auto-merge (squash) July 19, 2022 07:29
@VIKTORVAV99 VIKTORVAV99 linked an issue Jul 19, 2022 that may be closed by this pull request
@VIKTORVAV99 VIKTORVAV99 linked an issue Jul 19, 2022 that may be closed by this pull request
@VIKTORVAV99
Copy link
Member

@Kongkille let me know if you need a Approving review, I haven't had time to test it all locally yet but like you said before it should already have passed several reviews.

@Kongkille Kongkille disabled auto-merge July 19, 2022 07:36
@Kongkille Kongkille merged commit 1b287d9 into master Jul 19, 2022
@Kongkille Kongkille deleted the mk/historical-view-merge branch July 19, 2022 07:36
@Kongkille
Copy link
Contributor Author

@Kongkille let me know if you need a Approving review, I haven't had time to test it all locally yet but like you said before it should already have passed several reviews.

All good merging now. There are some internal deploy processes i need to run but hopefully it's up in a few hours! :)

@VIKTORVAV99
Copy link
Member

@Kongkille let me know if you need a Approving review, I haven't had time to test it all locally yet but like you said before it should already have passed several reviews.

All good merging now. There are some internal deploy processes i need to run but hopefully it's up in a few hours! :)

Great! Looking forward to seeing it all in action! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature=history has new accessibility issues Simplify state and history files object structure
4 participants