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

Showing and changing presets outside the study group context #134

Closed
DenoBeno opened this issue Oct 3, 2019 · 15 comments
Closed

Showing and changing presets outside the study group context #134

DenoBeno opened this issue Oct 3, 2019 · 15 comments
Assignees
Labels
BB: Scenario Management Scenario Management Building Block enhancement New feature or request

Comments

@DenoBeno
Copy link

DenoBeno commented Oct 3, 2019

Somewhat related to clarity-h2020/map-component#59

I have implemented a simple view that shows presets and allows the users to edit them while in the GL-step context and not in the group context. This allows users to quickly change the presets and take screenshots of various preset combinations whenever they feel like it.

Result:
grafik

grafik

Currently this is defined as a block and attached to all "map pages" and a "global: view area" header to this view: https://csis.myclimateservice.eu/admin/structure/views/view/view_mode_for_gl_step/edit/page_3

The view providing the data is called "View presets and edit": https://csis.myclimateservice.eu/admin/structure/views/view/view_presets_and_edit/edit/block_1

@DenoBeno
Copy link
Author

DenoBeno commented Oct 3, 2019

I have also added this to table views now.

This is OK for a start. If we want to decide more granularly where to show it and where not, we would have to add this view to the "application" nodes instead. Then one could easily define a map or a table with and without the presets and use the one that's appropriate in the template.

Good enough for now - putting this on hold.

@p-a-s-c-a-l

This comment has been minimized.

@DenoBeno
Copy link
Author

Hm. The expert study has a "study calculation set to "none", so this can be used to filter.

This view lets the users set the study presets on various places in the study:

https://csis.myclimateservice.eu/admin/structure/views/view/view_presets_and_edit?destination=/admin/structure/views

So basically, this view needs a filter by study calculation method. I have added this filter now. And also added a "Study presets currently aren't used in expert studies." message where the presets would be shown normally.

Now, as for the study presets in context, (e.g. https://csis.myclimateservice.eu/study/21/view/context), I don't know how to hide them when not needed there. The easiest way would be to completely remove them from the context edit form. I just did this, see https://csis.myclimateservice.eu/admin/group/types/manage/study/form-display

Now, the question is what happens if the table or map application don't find a preset in the study where they need one? Ideally, they users should simply be instructed to add a preset.

@DenoBeno
Copy link
Author

In https://csis.myclimateservice.eu/study/30/step/1613/view/maps, I can still choose local effect temperatures, even though no preset is defined. This is not good, since it's not clear what gets shown if no preset is defined.

image

@p-a-s-c-a-l
Copy link
Member

Now, the question is what happens if the table or map application don't find a preset in the study where they need one?

Expert Data Packages don't include EMIKAT screening resources. At least they shouldn't. Using the European Data Package which contains several EMIKAT resources in Expert Studies is a wrong choice.

The table will simply show nothing because there is no data from EMIKAT available. But Expert Templates don't include table views anyway, so this should never happen.

The map will show the layers from the data package and apply a default preset. But this shouldn't be necessary because expert data packages usually don't include local effect data because local effect are just relevant in screening mode.

@DenoBeno
Copy link
Author

@p-a-s-c-a-l :

Presets should also be used for other resources, not just EMIKAT. OK, this is not implemented now, so I've disabled it for the studies that don't use EMIKAT for the time being.

However, my question was for those that do use EMIKAT. Since I had to remove the presets from the "context edit", it's possible to come to a table or map where EMIKAT data is shown without setting the preset now. In such cases, nothing should be shown - but something is shown. No idea what.

@DenoBeno
Copy link
Author

Changed the message to "no preset defined, showing the historical data". Guess this can be closed now.

grafik

grafik

@p-a-s-c-a-l
Copy link
Member

p-a-s-c-a-l commented Dec 12, 2019

So basically, this view needs a filter by study calculation method. I have added this filter now. And also added a "Study presets currently aren't used in expert studies." message where the presets would be shown normally.

I've remove the filter in the view, because Study Scenarios (presets) are a prerequisite for Template Resources. So each study regardless of its type and calculation method now needs at least one Study Scenario!

However, that did not work, I still cannot select a study scenario in context although this study isn't an expert study:

grafik

Anyway, at least I can edit the scenarios in map and table display, so ATM this is enough for testing template resources.

@p-a-s-c-a-l p-a-s-c-a-l transferred this issue from clarity-h2020/csis Jan 8, 2020
@p-a-s-c-a-l p-a-s-c-a-l added enhancement New feature or request BB: Scenario Management Scenario Management Building Block labels Jan 8, 2020
@p-a-s-c-a-l p-a-s-c-a-l added this to the D1.4 CLARITY CSIS v2 milestone Jan 8, 2020
@patrickkaleta
Copy link
Contributor

See comment #1 and #2 for recent updates relevant to this issue.

@p-a-s-c-a-l
Copy link
Member

Hm, when visiting https://csis.myclimateservice.eu/study/30/step/1613/view/maps I get now:

grafik

@patrickkaleta
Copy link
Contributor

The real problem is, that Study 30 has been removed. The error message is just very misleading.

@p-a-s-c-a-l
Copy link
Member

OK, what we would need here is to select one of the named scenario presets created by the user in the study/context tab, but not to edit existing scenario presets or adding new ones.

@patrickkaleta
Copy link
Contributor

OK, what we would need here is to select one of the named scenario presets created by the user in the study/context tab, but not to edit existing scenario presets or adding new ones.

I agree, that would be a much better solution.

Unfortunately, the Scenario presets are Paragraphs (basically a special kind of content similar to Nodes), that don't offer any type of selection, so implementing this will be tricky.

I think this could work:

  • new field "Active scenario" or "Selected scenario" of type text_list, which will store the ID of the selected Scenario. (Allowed values initially empty, filled later dynamically by our csis_helpers module)
  • raise cardinality of current field "Study presets" from just 1 to 5-10. Owner will then define a couple of presets in study/context tab
  • in HC/maps tab user will only be able to select between one of the defined scenarios
  • the selected/active scenario will be stored and available in the studyInfo object just like it is right now, so the map component doesn't need to be adjusted

(@fgeyer16 do you see any potential on how to get this done easier?)

Quickly tested this locally and it seems to work. That's how it could look like:
currently selected Scenario shown to user in e.g. HC/maps tab
select-available-scenario
that's what the user would get when clicking on "edit scenario" (probably should change that to "change scenario" or something)
select-available-scenario-form

@patrickkaleta
Copy link
Contributor

Proposed changes in my previous comment are now implemented.

Study owners can now define up to 5 scenarios (rather start low, since raising the limit is no problem, but reducing it can be problematic), which then appear in the select lists of the individual GL-steps.

Involved elements in this new feature:

@patrickkaleta
Copy link
Contributor

IMO this issue can now be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BB: Scenario Management Scenario Management Building Block enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants