-
Notifications
You must be signed in to change notification settings - Fork 14
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
Port deprecated Wizard component to new PF5 implementation #53
Port deprecated Wizard component to new PF5 implementation #53
Conversation
b9f9a6a
to
2966fa0
Compare
@adamkankovsky is the PR ready for review or should I rather wait for tests passing? |
I dont have time to test is, so its draft. I look at this tomorow. |
754e3bc
to
7bae548
Compare
7bae548
to
84dd2b1
Compare
|
74b8c7c
to
9c7cd19
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we don't allow moving forward (to a later step - we disable them) on the sidebar (for example from Welcome to Installation Destination). This does not hold with the PR. Seems that what canJumpToStep
assured was not ported fully.
We should also create a test for this contidion - I'll do it.
The test PR: #66 |
The test #66 is passing for me locally.
9c7cd19
to
6c58d4a
Compare
It seems to me that the whole can jump thing was actually about not being able to jump to a step that is hidden, but in the current implementation it is handled a bit differently, so this situation shouldn't arise anyway. Because in the previous implementation of patternfly it was a bit wrong and as a next step the isHidden step was returned |
Ok, so apparently I have problems building updates image for local tests run. Either obsolete image is built using some old .tar.xz or if I remove it I am getting errors with
. I guess I must clear something, I'll play with it more, just @KKoukiou FYI. |
Hm, maybe try starting from a clean repo? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's obvious now from the new test (thansk @rvykydal) that this regressed the following:
Future steps should be disabled in the sidebar.
@KKoukiou this works, thank you! |
db5b14e
to
581ce4d
Compare
581ce4d
to
5d3c1c0
Compare
5d3c1c0
to
9d91f3d
Compare
src/components/AnacondaWizard.jsx
Outdated
window.sessionStorage.setItem("storage-scenario-id", scenarioId); | ||
setStorageScenarioId(scenarioId); | ||
} | ||
const stepsOrder = useMemo(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if stepsOrder is not memoized? Did you try without?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is from the part where I tried to disable the next steps. I'm going to go through the code again to see if there's anything like that somewhere.
9d91f3d
to
502583c
Compare
src/components/AnacondaWizard.jsx
Outdated
|
||
const canJumpToStep = (stepId, currentStepId) => { | ||
return stepId === currentStepId || isStepFollowedBy(stepId, currentStepId); | ||
if (laterStepIdx === -1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand it right: "any step is followed by a step which is not found" it seems a bit counterintuitive to me for the function name (and original purpose).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a solution where we don't have to change the isStepFollowedBy function.
eaf9a20
to
c852276
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you!
cf537a7
to
9af1c46
Compare
9af1c46
to
e8ad6f1
Compare
3524bd0
to
ddaf543
Compare
No description provided.