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

Release/v1.1.0 #394

Merged
merged 24 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b100560
Merge branch 'main' into dev
nesnoj Nov 1, 2023
b0b8c5b
Update readme
nesnoj Nov 6, 2023
cab55c6
Update packages to latest versions in poetry lockfile
nesnoj Nov 9, 2023
21f7e28
Fix mapengine to v0.14.0
henhuy Feb 5, 2024
128c2ce
Reactivate choropleth on status quo or results page revisit
henhuy Feb 5, 2024
9e33eb9
Fix basemap for mapengine>v0.14.0
henhuy Feb 12, 2024
2f480d0
Update poetry to use mapengine=v0.16.0
henhuy Feb 12, 2024
56c9629
Update funding infos in onboarding modal and docs page
nesnoj May 8, 2024
34c3b31
Update changelog
nesnoj May 8, 2024
974c08b
Merge pull request #392 from rl-institut/fix/choropleth_on_revisit
nesnoj May 8, 2024
b6a2ac8
Merge branch 'dev' of github.com:rl-institut-private/digiplan into dev
nesnoj May 8, 2024
f85c0d0
Merge branch 'dev' into feature/fix_popup_on_dbclick
nesnoj May 8, 2024
f3231da
Update changelog
nesnoj May 8, 2024
1cf48c5
Merge pull request #393 from rl-institut/feature/fix_popup_on_dbclick
nesnoj May 8, 2024
0c9cea9
Update package dependencies
nesnoj May 14, 2024
a7f28df
Update poetry to use djanog-mapengine=v0.18.3
nesnoj May 14, 2024
fcc1c10
Adjust funding logo layout in onboarding
nesnoj May 14, 2024
65068f3
Keep settings detail panel open on main slider value change
nesnoj May 14, 2024
0b40cc9
Fix popup order to enable cluster popups
henhuy May 15, 2024
f7eee15
Update changelog
nesnoj May 15, 2024
2582920
Bump version to 1.1.0
nesnoj May 15, 2024
881215a
Change slider callback events to onFinish to reduce callbacks due to …
nesnoj May 15, 2024
bc737fc
Hide result choropleths on revisit
nesnoj May 15, 2024
ecfe67f
Merge branch 'dev' into release/v1.1.0
nesnoj May 15, 2024
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
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ and this project tries to adhere to [Semantic Versioning](https://semver.org/spe

### Fixed

## [1.1.0] - 2024-05-15
### Added

### Changed
- update packages to latest versions in poetry lockfile
- update funding information

### Fixed
- show choropleth on revisit of status quo
- fix empty popup on doubleclick
- keep detail panel open on slider value change
- change slider callback events to "onFinish" to reduce callbacks due to rapid
changing
- hide result choropleths on revisit

## [1.0.1] - 2023-11-01
### Added
- RES share charts and choropleth for user scenario
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
[![Built with Cookiecutter Django](https://img.shields.io/badge/built%20with-Cookiecutter%20Django-ff69b4.svg)](https://github.com/pydanny/cookiecutter-django/)
[![Black code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

App for Digiplan project. The data pipeline can be found here: [Digipipe](https://github.com/rl-institut/digipipe/)

# Getting started

First you have to decide, wether you want to run the application via Docker or simply
Expand Down
64 changes: 32 additions & 32 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,38 @@ def __getitem__(self, item): # noqa: D105, ANN001, ANN204
]

MAP_ENGINE_POPUPS = [
setup.Popup(
"wind",
popup_at_default_layer=True,
),
setup.Popup(
"pvground",
popup_at_default_layer=True,
),
setup.Popup(
"pvroof",
popup_at_default_layer=True,
),
setup.Popup(
"hydro",
popup_at_default_layer=True,
),
setup.Popup(
"biomass",
popup_at_default_layer=True,
),
setup.Popup(
"combustion",
popup_at_default_layer=True,
),
setup.Popup(
"gsgk",
popup_at_default_layer=True,
),
setup.Popup(
"storage",
popup_at_default_layer=True,
),
setup.Popup(
"municipality",
popup_at_default_layer=False,
Expand Down Expand Up @@ -530,36 +562,4 @@ def __getitem__(self, item): # noqa: D105, ANN001, ANN204
"batteries_capacity_statusquo",
],
),
setup.Popup(
"wind",
popup_at_default_layer=True,
),
setup.Popup(
"pvground",
popup_at_default_layer=True,
),
setup.Popup(
"pvroof",
popup_at_default_layer=True,
),
setup.Popup(
"hydro",
popup_at_default_layer=True,
),
setup.Popup(
"biomass",
popup_at_default_layer=True,
),
setup.Popup(
"combustion",
popup_at_default_layer=True,
),
setup.Popup(
"gsgk",
popup_at_default_layer=True,
),
setup.Popup(
"storage",
popup_at_default_layer=True,
),
]
2 changes: 1 addition & 1 deletion digiplan/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Digiplan init - holds current version."""

__version__ = "1.0.1"
__version__ = "1.1.0"
__version_info__ = tuple([int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".")])
644 changes: 0 additions & 644 deletions digiplan/static/images/logos/CDR_BMI_Fz_2021_WebSVG_de.svg

This file was deleted.

20 changes: 19 additions & 1 deletion digiplan/static/js/menu.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {resultsTabs, futureDropdown} from "./elements.js";
import {resultsTabs, statusquoDropdown, futureDropdown} from "./elements.js";

const menuNextBtn = document.getElementById("menu_next_btn");
const menuPreviousBtn = document.getElementById("menu_previous_btn");
Expand Down Expand Up @@ -26,6 +26,7 @@ chartTab.addEventListener("click", function () {
PubSub.subscribe(eventTopics.MENU_STATUS_QUO_SELECTED, setMapChartViewVisibility);
PubSub.subscribe(eventTopics.MENU_STATUS_QUO_SELECTED, showMapView);
PubSub.subscribe(eventTopics.MENU_STATUS_QUO_SELECTED, hidePotentialLayers);
PubSub.subscribe(eventTopics.MENU_STATUS_QUO_SELECTED, reactivateChoropleth);
PubSub.subscribe(eventTopics.MENU_SETTINGS_SELECTED, setMapChartViewVisibility);
PubSub.subscribe(eventTopics.MENU_SETTINGS_SELECTED, showMapView);
PubSub.subscribe(eventTopics.MENU_SETTINGS_SELECTED, deactivateChoropleth);
Expand Down Expand Up @@ -92,6 +93,23 @@ function setMapChartViewVisibility(msg) {
return logMessage(msg);
}

function reactivateChoropleth(msg) {
let choropleth = "";
let infoToolTip = "";
if (msg === eventTopics.MENU_STATUS_QUO_SELECTED) {
choropleth = statusquoDropdown.value;
infoToolTip = statusquoDropdown.options[statusquoDropdown.selectedIndex].title;
} else {
choropleth = futureDropdown.value;
infoToolTip = futureDropdown.options[futureDropdown.selectedIndex].title;
}
if (choropleth !== "") {
PubSub.publish(mapEvent.CHOROPLETH_SELECTED, choropleth);
}
document.getElementById("info_tooltip_results").title = statusquoDropdown.options[statusquoDropdown.selectedIndex].title;
return logMessage(msg);
}

function setResultsView(msg) {
if (msg === eventTopics.CHART_VIEW_SELECTED) {
futureDropdown.parentElement.setAttribute("style", "display: none !important");
Expand Down
50 changes: 30 additions & 20 deletions digiplan/static/js/sliders.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Array.from(Object.keys(SETTINGS_DEPENDENCY_MAP)).forEach(dependent_name => {
const dependency_names = SETTINGS_DEPENDENCY_MAP[dependent_name];
Array.from(dependency_names).forEach(dependency_name => {
$("#id_" + dependency_name).ionRangeSlider({
onChange: function (data) {
onFinish: function (data) {
const msg = eventTopics.DEPENDENCY_PANEL_SLIDER_CHANGE;
PubSub.publish(msg, {
dependent: dependent_name,
Expand All @@ -51,7 +51,7 @@ Array.from(Object.keys(SETTINGS_DEPENDENCY_MAP)).forEach(dependent_name => {
});
});
$(".js-slider.js-slider-panel.js-power-mix").ionRangeSlider({
onChange: function (data) {
onFinish: function (data) {
PubSub.publish(eventTopics.POWER_PANEL_SLIDER_CHANGE, data);
}
}
Expand All @@ -60,61 +60,54 @@ $(potentialWindSwitches).on("change", function () {
PubSub.publish(eventTopics.WIND_CONTROL_ACTIVATED);
});
$(".js-slider.js-slider-panel").ionRangeSlider({
onChange: function (data) {
onFinish: function (data) {
PubSub.publish(eventTopics.PANEL_SLIDER_CHANGE, data);
}
}
);
$(sectorSlider).ionRangeSlider({
onChange: function (data) {
onFinish: function (data) {
calculate_slider_value(data);
}
}
);

$(".js-slider.js-slider-panel").ionRangeSlider({
onChange: function (data) {
PubSub.publish(eventTopics.PANEL_SLIDER_CHANGE, data);
}
}
);
$(".form-check-input").on(
'click', function (data) {
toggleFormFields(data.target.id);
}
);
$("#id_s_w_5_1").ionRangeSlider({
onChange: function (data) {
onFinish: function (data) {
calculate_max_wind();
}
}
);
$("#id_s_w_5_2").ionRangeSlider({
onChange: function (data) {
onFinish: function (data) {
calculate_max_wind();
}
}
);
$("#id_s_pv_ff_3").ionRangeSlider({
onChange: function (data) {
onFinish: function (data) {
calculate_max_pv_ff();
}
}
);
$("#id_s_pv_ff_4").ionRangeSlider({
onChange: function (data) {
onFinish: function (data) {
calculate_max_pv_ff();
}
}
);
$("#id_s_pv_d_3").ionRangeSlider({
onChange: function (data) {
onFinish: function (data) {
calculate_max_pv_d();
}
}
);
$("#id_v_iv_3").ionRangeSlider({
onChange: function (data) {
onFinish: function (data) {
$(`#id_v_iv_1`).data("ionRangeSlider").update({from:data.from});
}
}
Expand Down Expand Up @@ -223,9 +216,26 @@ function showOrHideSidepanelsOnMoreLabelClick(msg, moreLabel) {
}

function showActivePanelSliderOnPanelSliderChange(msg, data) {
Array.from(panelSliders).forEach(item => item.parentNode.classList.remove("active", "active-sidepanel"));
const sliderLabel = data.input[0].parentNode;
sliderLabel.classList.add("active");
const changedSlider = data.input[0];
const changedSliderLabel = changedSlider.parentNode;

const sliderForm = changedSliderLabel.parentNode.parentNode.parentNode;
// Check if any sidepanel is open, by checking if any slider has an active element
if (sliderForm.getElementsByClassName("c-slider active").length === 0) {
return logMessage(msg);
}
const isActivePanel = changedSliderLabel.classList.contains("active");

if (!isActivePanel) {
Array.from(panelSliders).forEach((item) => {
const itemPanel = item.parentNode;
if (itemPanel !== changedSliderLabel) {
itemPanel.classList.remove("active", "active-sidepanel");
}
});

changedSliderLabel.classList.add("active", "active-sidepanel");
}
return logMessage(msg);
}

Expand Down
22 changes: 10 additions & 12 deletions digiplan/static/scss/components/_modals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,36 +118,34 @@
}
}

.carousel__bottomtext {
font-size: 0.875rem;
color: grey;
width: 50%;
padding-top: 2rem;
padding-left: 2rem;
padding-right: 2rem;
}

.carousel__logo {
@extend .col-4;
@extend .col-xl-2;
@extend .d-flex;
@extend .align-items-center;
@extend .justify-content-center;

&--rli img {
height: 4rem;
}

&--eaa img {
height: 5rem;
}

&--gestalten img {
height: 5rem;
}

&--bbsr img {
height: 9rem;
height: 8rem;
}

&--bmwsb img {
height: 9rem;
}

&--bmi img {
height: 9rem;
}
}
}

Expand Down
5 changes: 1 addition & 4 deletions digiplan/static/scss/components/_offcanvas.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ section.offcanvas {
@extend .flex-row;
@extend .justify-content-between;
@extend .pt-4;
@extend .pb-4;
}

.offcanvas-view__logo {
Expand All @@ -61,10 +62,6 @@ section.offcanvas {
&--bmwsb img {
width: 12.5rem;
}

&--bmi img {
width: 10rem;
}
}

.offcanvas-view__list {
Expand Down
18 changes: 6 additions & 12 deletions digiplan/templates/components/onboarding.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,17 @@
</div>
</div>
<div class="carousel__logos">
<div class="carousel__logo carousel__logo--rli">
<img src="{% static 'images/logos/RLI_logo_weiss.png' %}" alt="Logo RLI" title="Reiner Lemoine Institut">
<div class="carousel__bottomtext">
Das Vorhaben „DigiPlan Energiewandel Anhalt“ wird innerhalb des Programms <i>Region gestalten</i> des Bundesministeriums für Wohnen, Stadtentwicklung und Bauwesen in Zusammenarbeit mit dem Bundesinstitut für Bau-, Stadt- und Raumforschung gefördert.
</div>
<div class="carousel__logo carousel__logo--eaa">
<img src="{% static 'images/logos/EAA_logo.png' %}" alt="Logo EAA" title="Energieavantgarde Anhalt">
</div>
<div class="carousel__logo carousel__logo--gestalten">
<img src="{% static 'images/logos/VDI-VDE-BULE-BMI_Logo-4C.png' %}" alt="Logo Region Gestalten" title="Region Gestalten">
<div class="carousel__logo carousel__logo--bmwsb">
<img src="{% static 'images/logos/CDR_BMWSB_Fz_2021_WebSVG_de.svg' %}" alt="Logo Bundesministerium für Wohnen, Stadtentwicklung und Bauwesen" title="Bundesministerium für Wohnen, Stadtentwicklung und Bauwesen">
</div>
<div class="carousel__logo carousel__logo--bbsr">
<img src="{% static 'images/logos/BBSR_geschl_RGB.jpg' %}" alt="Logo Bundesinstitut für Bau-, Stadt- und Raumforschung" title="Bundesinstitut für Bau-, Stadt- und Raumforschung">
</div>
<div class="carousel__logo carousel__logo--bmwsb">
<img src="{% static 'images/logos/CDR_BMWSB_Fz_2021_WebSVG_de.svg' %}" alt="Logo Bundesministerium für Wohnen, Stadtentwicklung und Bauwesen" title="Bundesministerium für Wohnen, Stadtentwicklung und Bauwesen">
</div>
<div class="carousel__logo carousel__logo--bmi">
<img src="{% static 'images/logos/CDR_BMI_Fz_2021_WebSVG_de.svg' %}" alt="Logo Bundesministerium des Innern und für Heimat" title="Bundesministerium des Innern und für Heimat">
<div class="carousel__logo carousel__logo--gestalten">
<img src="{% static 'images/logos/VDI-VDE-BULE-BMI_Logo-4C.png' %}" alt="Logo Region Gestalten" title="Region Gestalten">
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions digiplan/templates/map.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@

{% compress js %}
{% include 'django_mapengine/map_js.html' %}
<script src="{% static 'django_mapengine/js/basemaps.js' %}" type="text/javascript"></script>
{% if not debug %}
<script src="{% static 'vendors/shepherd/shepherd.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/intro_tour.js' %}" type="text/javascript"></script>
Expand Down
Loading
Loading