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

webui: replacing Tooltip for HelperText in Storage devices step #4875

Merged
merged 1 commit into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions ui/webui/src/components/AnacondaWizard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ import React, { useState, useMemo } from "react";
import {
ActionList,
Button,
HelperText,
HelperTextItem,
Modal,
ModalVariant,
PageSection,
PageSectionTypes,
PageSectionVariants,
Stack,
Tooltip,
Wizard,
WizardFooter,
WizardContextConsumer,
Expand Down Expand Up @@ -359,6 +360,13 @@ const Footer = ({
setQuitWaitsConfirmation={setQuitWaitsConfirmation}
isBootIso={isBootIso}
/>}
{activeStep.id === "storage-devices" && !isFormValid &&
<HelperText id="next-helper-text">
<HelperTextItem
variant="indeterminate">
{_("To continue, select the devices to install to.")}
</HelperTextItem>
</HelperText>}
<ActionList>
<Button
variant="secondary"
Expand All @@ -368,7 +376,6 @@ const Footer = ({
</Button>
<Button
id="installation-next-btn"
aria-describedby="next-tooltip-ref"
variant={nextButtonVariant}
isDisabled={
!isFormValid ||
Expand All @@ -377,21 +384,6 @@ const Footer = ({
onClick={() => goToNextStep(activeStep, onNext)}>
{nextButtonText}
</Button>
{activeStep.id === "storage-devices" &&
<Tooltip
id="next-tooltip-ref"
content={
<div>
{_("To continue, select the devices to install to.")}
</div>
}
// Only show the tooltip on installation destination spoke that is not valid (no disks selected).
// NOTE: As PatternFly Button with isDisabled set apprently does not get any mouse events anymore,
// we need to manually trigger the tooltip.
reference={() => document.getElementById("installation-next-btn")}
trigger="manual"
isVisible={!isFormValid}
/>}
<Button
id="installation-quit-btn"
style={{ marginLeft: "var(--pf-c-wizard__footer-cancel--MarginLeft)" }}
Expand Down
2 changes: 1 addition & 1 deletion ui/webui/test/helpers/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def check_disk_selected(self, disk, selected=True):

@log_step()
def wait_no_disks(self):
self.browser.wait_in_text("#next-tooltip-ref",
self.browser.wait_in_text("#next-helper-text",
"To continue, select the devices to install to.")

@log_step()
Expand Down