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

[UI] Update the URL start and end of the asset page when the time period is updated #1046

Merged
merged 2 commits into from Apr 29, 2024

Conversation

victorgarcia98
Copy link
Contributor

@victorgarcia98 victorgarcia98 commented Apr 24, 2024

Description

For some reason I don't understand yet, when I refreshed the asset page, the period moved to the latest data instead of keeping the view on the same period. This is why I thought of updating the URL with the start and end dates when an event on the date-picker was caught.

To test this feature, you can go to any asset page and select a time range. The URL should take the values that you selected but the page shouldn't refresh. Following that, you can refresh the page manually to check if the parameters are passed properly.


  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on code under GPL or other license that is incompatible with FlexMeasures

…e datepicker.

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
@nhoening nhoening added this to the 0.21.0 milestone Apr 29, 2024
@nhoening nhoening merged commit 71ecbcf into main Apr 29, 2024
7 of 9 checks passed
@nhoening nhoening deleted the feature/ui/update-url-datepicker branch April 29, 2024 22:55
Comment on lines +173 to +175
// add 1 day to end date as datepicker does not include the end date day
endDate = endDate.toJSDate();
endDate.setDate(endDate.getDate() + 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Possible source of a bug. I just tested this, but when I select 2 days and then refresh, the url indicates a period of 3 days. And when I refresh, it selects those 3 days. (When I refresh again, it does remain at 3 days.)

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.

None yet

4 participants