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

sap.m.Wizard / WizardStep does not correctly hide / block steps when setting visible=false #4181

Open
qualiture opened this issue Jan 14, 2025 · 3 comments

Comments

@qualiture
Copy link

OpenUI5 version: 1.131.0

Browser/version (+device/version): Chrome / Edge

URL (minimal example if possible): https://plnkr.co/edit/sKTifP5PX1Tt1TPX?open=lib%2Fscript.js&preview

Steps to reproduce the problem:

  • Run the example, and navigate to wizard step 2.

What is the expected result?

  • It should be invisible, also in the navigation bar. It should also not possible to navigate to the hidden wizard step

What happens instead?

  • While the page is indeed invisible, it is still visible as 'Step 2' in the navigation pane. It is also possible to navigate to the (hidden) wizard step.
  • In addition, I have added a customData object to the wizard step; I figured, I may be able to hide it then via a custom data-mykey attribute. However, this data attribute is also only availablke on the wizard step content, not on the navigation pane where I would expect it.

I believe this to be a bug. However, if you may have other pointers to achieve hiding a wizard step from both the navigation pane as well as blocking navigating to an invisible wizards step is highly apprecieted

@IlianaB IlianaB added the bug label Jan 15, 2025
@IlianaB
Copy link
Member

IlianaB commented Jan 15, 2025

Hello @qualiture ,
Thank you for sharing your finding. I've created an internal Incident DINC0382195. The status of the issue will be updated here in GitHub.

Regards,
Iliana

@MapTo0
Copy link
Member

MapTo0 commented Jan 20, 2025

Hey @qualiture

As documented, visible property of the WizardStep is not supported.

https://github.com/SAP/openui5/blob/master/src/sap.m/src/sap/m/WizardStep.js#L237-L243

Did you give a try to the branching mode? Would it be an option for your case?
Hiding steps means that you have no clear path for your wizard, therefore the branching feature should be the way to go.
Would that work for you?

Best Regards!
Martin

@qualiture
Copy link
Author

Hi @MapTo0 ,

I was contemplating the branching mode, but our use case doesn't seem supported as well

For instance, A -> B -> C -> D as well as A -> C -> D should be possible; i.e. skipping step B based on the input in step A.

With branching, that would mean we should have A -> B -> C -> D and A -> C' -> D' where C' and D' are copies of C and D, which is not really maintainable (since our wizard has more than 4 steps...)

As a workaround, based on the input in step A, I now remove the title of step B and perform a 'double step' to go from A to C (or from C to A). That just leaves the wizard header step B being clickable, but here I then show a 'content unavailable' message with the remark to use the navigation buttons to go to step A or C

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants