Which tool versions are you using?
SDK: v13.7.0
Platform: v23.02.2
Python: v3.10
Isolation mode: venv
Current Behavior
When having multiple views in a step, the order of these views is determined based on the order they are implemented in the controller class. For example, the following code:
visualization = Step(
"Visualization",
views=["first_tab", "second_tab", "third_tab"],
previous_label="Previous step",
next_label="Next step",
)
will result in the following order of views:
just because āthird_tabā is implemented first in the controller class, āsecond_tabā next and āfirst_tabā last like this:
@GeoJSONView("Third tab", duration_guess=3)
def third_tab(self, params, **kwargs) -> GeoJSONResult:
...
@PlotlyView("Second tab", duration_guess=10)
def second_tab(self, params, **kwargs) -> PlotlyResult:
...
@PlotlyView("First tab", duration_guess=3)
def first_tab(self, params, **kwargs) -> PlotlyResult:
...
If I change the order in the controller class, I can get the order I want to show in the application. This might work for one step, but imagine having multiple steps with multiple views. At some point it would become impossible to get the desired order for every step.
P.S. I havenāt checked this for a āPageā. I guess the behaviour would be simillar.
Expected Behavior
It seems more logical to me to actually see the order as given in the parametrization, so that:
views=["first_tab", "second_tab", "third_tab"],
would result in: