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

Port deprecated Wizard component to new PF5 implementation #53

Merged

Conversation

adamkankovsky
Copy link
Contributor

No description provided.

@adamkankovsky adamkankovsky force-pushed the webui-porting-deprecated-wizard branch 2 times, most recently from b9f9a6a to 2966fa0 Compare November 20, 2023 16:57
@adamkankovsky adamkankovsky changed the title webui: port deprecated Wizard component to new PF5 implementation Port deprecated Wizard component to new PF5 implementation Nov 21, 2023
@rvykydal
Copy link
Contributor

@adamkankovsky is the PR ready for review or should I rather wait for tests passing?

@adamkankovsky
Copy link
Contributor Author

@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.

@adamkankovsky adamkankovsky force-pushed the webui-porting-deprecated-wizard branch 4 times, most recently from 754e3bc to 7bae548 Compare November 23, 2023 14:38
@rvykydal
Copy link
Contributor

rvykydal commented Nov 23, 2023

Seems like #48 got merged into the commit accidentally somehow.

@adamkankovsky adamkankovsky force-pushed the webui-porting-deprecated-wizard branch 7 times, most recently from 74b8c7c to 9c7cd19 Compare November 23, 2023 21:46
Copy link
Contributor

@rvykydal rvykydal left a 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.

@rvykydal
Copy link
Contributor

rvykydal commented Nov 24, 2023

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
Strangely the test passes for me locally on this PR. I can see the issue only when running your PR locally with test/webui_testvm.py fedora-rawhide-boot --rsync
@adamkankovsky can you please rebase the PR on top of the merged test? I'd expect it to pass but let's see :)

@rvykydal rvykydal self-requested a review November 24, 2023 10:01
@rvykydal rvykydal dismissed their stale review November 24, 2023 10:02

The test #66 is passing for me locally.

@adamkankovsky
Copy link
Contributor Author

adamkankovsky commented Nov 24, 2023

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.

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

@rvykydal
Copy link
Contributor

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 Strangely the test passes for me locally on this PR. I can see the issue only when running your PR locally with test/webui_testvm.py fedora-rawhide-boot --rsync @adamkankovsky can you please rebase the PR on top of the merged test? I'd expect it to pass but let's see :)

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

error: Bad file: /home/rvykydal/work/git/rvykydal/anaconda-webui.1/anaconda-webui-1.20.g3305a966b.tar.xz: No such file or directory

. I guess I must clear something, I'll play with it more, just @KKoukiou FYI.

@KKoukiou
Copy link
Contributor

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 Strangely the test passes for me locally on this PR. I can see the issue only when running your PR locally with test/webui_testvm.py fedora-rawhide-boot --rsync @adamkankovsky can you please rebase the PR on top of the merged test? I'd expect it to pass but let's see :)

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

error: Bad file: /home/rvykydal/work/git/rvykydal/anaconda-webui.1/anaconda-webui-1.20.g3305a966b.tar.xz: No such file or directory

. I guess I must clear something, I'll play with it more, just @KKoukiou FYI.

Hm, maybe try starting from a clean repo? git clean -fdx and re-create the updates.img?

Copy link
Contributor

@KKoukiou KKoukiou left a 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.

@rvykydal
Copy link
Contributor

git clean -fdx

@KKoukiou this works, thank you!

@adamkankovsky adamkankovsky force-pushed the webui-porting-deprecated-wizard branch 2 times, most recently from db5b14e to 581ce4d Compare November 29, 2023 15:37
@KKoukiou KKoukiou force-pushed the webui-porting-deprecated-wizard branch from 581ce4d to 5d3c1c0 Compare December 5, 2023 14:29
window.sessionStorage.setItem("storage-scenario-id", scenarioId);
setStorageScenarioId(scenarioId);
}
const stepsOrder = useMemo(() => {
Copy link
Contributor

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?

Copy link
Contributor Author

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.


const canJumpToStep = (stepId, currentStepId) => {
return stepId === currentStepId || isStepFollowedBy(stepId, currentStepId);
if (laterStepIdx === -1) {
Copy link
Contributor

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).

Copy link
Contributor Author

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.

@adamkankovsky adamkankovsky force-pushed the webui-porting-deprecated-wizard branch 3 times, most recently from eaf9a20 to c852276 Compare December 12, 2023 12:54
Copy link
Contributor

@rvykydal rvykydal left a 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!

@adamkankovsky adamkankovsky force-pushed the webui-porting-deprecated-wizard branch 2 times, most recently from cf537a7 to 9af1c46 Compare December 12, 2023 14:17
@KKoukiou KKoukiou merged commit 755ead3 into rhinstaller:main Dec 12, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants