OpenEnergyDashboard / OED

Open Energy Dashboard (OED)
Mozilla Public License 2.0
75 stars 261 forks source link

blank map if opened as default graphic type with one map #667

Open huss opened 2 years ago

huss commented 2 years ago

Is your feature request related to a problem? Please describe.

PR #666 adds the ability of maps to be the default graphic type. If the user is starting OED for the first time in a web browser (seems to be since last time restarted the web browser) then the map page is displayed and the only map available is selected but no map is shownFurther, all meters/groups are shown without any being grayed out even if they cannot show on the one map available. Note this only happens when there is only one map that can be displayed. Note that if the user selects the map graphic manually then this does not happen. When the web page is first opened/refreshed, the map page is shown but no map is selected. Selecting the one map fixes this. Note if you first go to another graphic page and then go to the map page then the one map is selected and shown (as expected).

Describe the solution you'd like

It would be better if the one map is shown in the map area instead of seeing a blank map. Also, only the meters/groups that can be displayed are in regular shading with the others grayed out.

Describe alternatives you've considered

If you click on the map drop down menu and select the only map available (already selected before) then the map shows and meters/groups drop down menus are grayed out as expected. If you select any meter/group then the map shows. Note if you select a meter/group that cannot be displayed then that meter will not display and all meters/groups that cannot be displayed on the map are grayed out. Going to another page and coming back also fixes the issue. Thus, there are several ways the user can work around this issue.

Additional context

This issue has not been researched too much but it seems possible something is off in the state and/or when the action(s) should be triggered in this case. Thanks to @jina2k for finding this during work on the PR.

Strikethrough text was true before the conversion to Redux Toolkit. This has been updated as to the current situation.

huss commented 6 months ago

Maybe during issue #1145 this can be addressed as it is still present.