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

general: Place dialog form labels on top of their fields #1804

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion src/components/create-vm-dialog/createVmDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ class CreateVmModal extends React.Component {
);

const dialogBody = (
<Form isHorizontal>
<Form>
<NameRow
vmName={this.state.vmName}
suggestedVmName={this.state.suggestedVmName}
Expand Down
2 changes: 1 addition & 1 deletion src/components/networks/createNetworkDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ class CreateNetworkModal extends React.Component {
const validationFailed = this.state.validate && validateParams(this.state);

const body = (
<Form isHorizontal>
<Form>
<ConnectionRow connectionName={LIBVIRT_SYSTEM_CONNECTION} />

<NetworkNameRow dialogValues={this.state}
Expand Down
2 changes: 1 addition & 1 deletion src/components/networks/networkOverviewTab.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ const NetworkAddStaticHostEntries = ({ network, parentIndex, setIsOpen }) => {
}>
<Form onSubmit={e => {
e.preventDefault();
}} isHorizontal>
}}>
{error && <ModalError dialogError={_("Failed to save network settings")} dialogErrorDetail={error} />}
<FormGroup label={_("MAC address")} fieldId="add-new-static-entry-mac-address">
<TextInput id="add-new-static-entry-mac-address"
Expand Down
2 changes: 1 addition & 1 deletion src/components/storagePools/createStoragePoolDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ class CreateStoragePoolModal extends React.Component {
const Dialogs = this.context;

const defaultBody = (
<Form isHorizontal>
<Form>
{this.state.dialogError && <ModalError dialogError={this.state.dialogError} dialogErrorDetail={this.state.dialogErrorDetail} />}
<MachinesConnectionSelector id='storage-pool-dialog-connection'
connectionName={this.state.connectionName}
Expand Down
2 changes: 1 addition & 1 deletion src/components/storagePools/storageVolumeCreate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class CreateStorageVolumeModal extends React.Component {
</Button>
</>
}>
<Form isHorizontal>
<Form>
{this.state.dialogError && <ModalError dialogError={this.state.dialogError} dialogErrorDetail={this.state.dialogErrorDetail} />}
<VolumeCreateBody format={this.state.format}
idPrefix={idPrefix}
Expand Down
6 changes: 3 additions & 3 deletions src/components/vm/disks/diskAdd.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ const AdditionalOptions = ({ cacheMode, device, idPrefix, onValueChanged, busTyp
return (
<ExpandableSection toggleText={ expanded ? _("Hide additional options") : _("Show additional options")}
onToggle={() => setExpanded(!expanded)} isExpanded={expanded} className="pf-v5-u-pt-lg">
<Form onSubmit={e => e.preventDefault()} isHorizontal>
<Form onSubmit={e => e.preventDefault()}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This added line is not executed by any test.

<Grid hasGutter md={6}>
<FormGroup fieldId='cache-mode' label={_("Cache")}>
<FormSelect id='cache-mode'
Expand Down Expand Up @@ -584,7 +584,7 @@ export const AddDiskModalBody = ({ disk, idPrefix, isMediaInsertion, vm, vms, su
);
} else if (isMediaInsertion) {
defaultBody = (
<Form onSubmit={e => e.preventDefault()} isHorizontal>
<Form onSubmit={e => e.preventDefault()}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This added line is not executed by any test.

<FormGroup fieldId={`${idPrefix}-source`}
id={`${idPrefix}-source-group`}
label={_("Source")} isInline hasNoPaddingTop>
Expand Down Expand Up @@ -620,7 +620,7 @@ export const AddDiskModalBody = ({ disk, idPrefix, isMediaInsertion, vm, vms, su
} else {
defaultBody = (
<>
<Form onSubmit={e => e.preventDefault()} isHorizontal>
<Form onSubmit={e => e.preventDefault()}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This added line is not executed by any test.

<FormGroup fieldId={`${idPrefix}-source`}
id={`${idPrefix}-source-group`}
label={_("Source")} isInline hasNoPaddingTop>
Expand Down
2 changes: 1 addition & 1 deletion src/components/vm/disks/diskEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export class EditDiskModal extends React.Component {
const { vm, disk, idPrefix, supportedDiskBusTypes } = this.props;

const defaultBody = (
<Form isHorizontal>
<Form>
<NameRow idPrefix={idPrefix}
diskType={vm.disks[disk.target].type}
name={getDiskFullName(vm.disks[disk.target])} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/vm/filesystems/vmFilesystemsCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ const VmFilesystemAddModal = ({ connectionName, vmName }) => {
</Popover>
</>
}>
<Form isHorizontal>
<Form>
{dialogError && <ModalError dialogError={_("Failed to add shared directory")} dialogErrorDetail={dialogError} />}
<FormGroup fieldId={`${idPrefix}-modal-source`}
id={`${idPrefix}-modal-source-group`}
Expand Down
2 changes: 1 addition & 1 deletion src/components/vm/hostdevs/hostDevAdd.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ const AddHostDev = ({ idPrefix, vm }) => {
};

const body = (
<Form isHorizontal>
<Form>
<TypeRow type={type} setType={setTypeWrapper} />
<DevRow idPrefix={idPrefix} selectableDevices={selectableDevices} setSelectableDevices={setSelectableDevices} />
</Form>
Expand Down
2 changes: 1 addition & 1 deletion src/components/vm/nics/nicAdd.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class AddNIC extends React.Component {
const { idPrefix, vm } = this.props;

const defaultBody = (
<Form onSubmit={e => e.preventDefault()} isHorizontal>
<Form onSubmit={e => e.preventDefault()}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This added line is not executed by any test.

<NetworkTypeAndSourceRow idPrefix={idPrefix}
dialogValues={{ ...this.state, availableSources: this.props.availableSources }}
onValueChanged={this.onValueChanged}
Expand Down
2 changes: 1 addition & 1 deletion src/components/vm/nics/nicEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export class EditNICModal extends React.Component {
const { idPrefix, vm, network } = this.props;

const defaultBody = (
<Form onSubmit={e => e.preventDefault()} isHorizontal>
<Form onSubmit={e => e.preventDefault()}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This added line is not executed by any test.

<NetworkTypeAndSourceRow idPrefix={idPrefix}
dialogValues={{ ...this.state, availableSources: this.props.availableSources }}
onValueChanged={this.onValueChanged}
Expand Down
2 changes: 1 addition & 1 deletion src/components/vm/overview/cpuModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export const CPUModal = ({ vm, maxVcpu, models }) => {
caution = <NeedsShutdownAlert idPrefix="cpu-modal" />;

const defaultBody = (
<Form isHorizontal className="cpu-modal">
<Form className="cpu-modal">
{ caution }
{ error && error.dialogError && <ModalError dialogError={error.dialogError} dialogErrorDetail={error.dialogErrorDetail} /> }
<FormGroup fieldId="machines-vcpu-max-field" label={_("vCPU maximum")}
Expand Down
2 changes: 1 addition & 1 deletion src/components/vm/overview/firmware.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class FirmwareModal extends React.Component {
</Button>
</>
}>
<Form isHorizontal>
<Form>
{this.state.dialogError && <ModalError dialogError={this.state.dialogError} dialogErrorDetail={this.state.dialogErrorDetail} />}
<FormGroup label={_("Firmware")} fieldId="firmware-dialog-select">
<FormSelect onChange={(_event, value) => this.setState({ firmware: value })}
Expand Down
2 changes: 1 addition & 1 deletion src/components/vm/overview/memoryModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class MemoryModal extends React.Component {
const vm = this.props.vm;
const idPrefix = vmId(vm.name) + '-memory-modal';
const defaultBody = (
<Form isHorizontal id='memory-config-dialog'>
<Form id='memory-config-dialog'>
<MemorySelectRow id={`${idPrefix}-memory`}
label={_("Current allocation")}
value={Math.floor(convertToUnit(this.state.memory, 'KiB', this.state.memoryUnit))}
Expand Down
2 changes: 1 addition & 1 deletion src/components/vm/overview/vmOverviewCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class VmOverviewCard extends React.Component {
return (
<Flex className="overview-tab" direction={{ default: "column", "2xl": "row" }}>
<FlexItem>
<DescriptionList isHorizontal>
<DescriptionList>
<Text component={TextVariants.h4}>
{_("General")}
</Text>
Expand Down
2 changes: 1 addition & 1 deletion src/components/vm/overview/vsock.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export const VsockModal = ({ vm, vms, vmVsockNormalized, isVsockAttached, idPref
const vsockUsage = getVsockUsageMessage(vm.name, vm.connectionName, vms, auto, address);

const body = (
<Form onSubmit={e => e.preventDefault()} isHorizontal>
<Form onSubmit={e => e.preventDefault()}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This added line is not executed by any test.

<FormGroup fieldId="vsock-cid"
label={_("Custom identifier")}
isInline>
Expand Down
2 changes: 1 addition & 1 deletion src/components/vm/overview/watchdog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export const WatchdogModal = ({ vm, isWatchdogAttached, isRemovable, idPrefix })
}>
{needsShutdown()}
<WatchdogModalAlert dialogError={dialogError} />
<Form onSubmit={e => e.preventDefault()} isHorizontal>
<Form onSubmit={e => e.preventDefault()}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This added line is not executed by any test.

<FormGroup role="radiogroup"
label={_("Action")}
fieldId="watchdog-action"
Expand Down
2 changes: 1 addition & 1 deletion src/components/vm/snapshots/vmSnapshotsCreateModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export class CreateSnapshotModal extends React.Component {
const validationError = this.onValidate();

const body = (
<Form onSubmit={e => e.preventDefault()} isHorizontal>
<Form onSubmit={e => e.preventDefault()}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This added line is not executed by any test.

<NameRow name={name} validationError={validationError.name} onValueChanged={this.onValueChanged} />
<DescriptionRow description={description} onValueChanged={this.onValueChanged} />
{isExternal && vm.state === 'running' &&
Expand Down
3 changes: 1 addition & 2 deletions src/components/vm/vmCloneDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ export const CloneDialog = ({ name, connectionName }) => {
<Form onSubmit={e => {
e.preventDefault();
onClone();
}}
isHorizontal>
}}>
{!isObjectEmpty(error) && <ModalError dialogError={error.dialogError} dialogErrorDetail={virtCloneOutput} />}
<FormGroup label={_("Name")} fieldId="vm-name"
id="vm-name-group">
Expand Down
2 changes: 1 addition & 1 deletion src/components/vm/vmMigrateDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export const MigrateDialog = ({ vm, connectionName }) => {
}

const body = (
<Form onSubmit={e => e.preventDefault()} isHorizontal>
<Form onSubmit={e => e.preventDefault()}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This added line is not executed by any test.

<DestUriRow destUri={destUri}
setDestUri={setDestUri}
validationFailed={validationFailed} />
Expand Down
3 changes: 1 addition & 2 deletions src/components/vm/vmRenameDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ export const RenameDialog = ({ vmName, vmId, connectionName }) => {
<Form onSubmit={e => {
e.preventDefault();
onRename();
}}
isHorizontal>
}}>
{!isObjectEmpty(error) && <ModalError dialogError={error.dialogError} dialogErrorDetail={error.dialogErrorDetail} />}
<FormGroup label={_("New name")}
fieldId="rename-dialog-new-name">
Expand Down
2 changes: 1 addition & 1 deletion test/reference
Submodule reference updated 54 files
+ TestMachinesCreate-testCreateBasicValidation-auto-dark-pixels.png
+ TestMachinesCreate-testCreateBasicValidation-auto-medium-pixels.png
+ TestMachinesCreate-testCreateBasicValidation-auto-pixels.png
+ TestMachinesCreate-testCreateBasicValidation-filter-dark-pixels.png
+ TestMachinesCreate-testCreateBasicValidation-filter-medium-pixels.png
+ TestMachinesCreate-testCreateBasicValidation-filter-pixels.png
+ TestMachinesCreate-testCreateBasicValidation-iso-dark-pixels.png
+ TestMachinesCreate-testCreateBasicValidation-iso-medium-pixels.png
+ TestMachinesCreate-testCreateBasicValidation-iso-pixels.png
+ TestMachinesCreate-testCreateBasicValidation-url-dark-pixels.png
+ TestMachinesCreate-testCreateBasicValidation-url-medium-pixels.png
+ TestMachinesCreate-testCreateBasicValidation-url-pixels.png
+ TestMachinesDisks-testAddDiskAdditionalOptions-vm-add-disk-modal-additional-options-dark-pixels.png
+ TestMachinesDisks-testAddDiskAdditionalOptions-vm-add-disk-modal-additional-options-medium-pixels.png
+ TestMachinesDisks-testAddDiskAdditionalOptions-vm-add-disk-modal-additional-options-pixels.png
+ TestMachinesDisks-testAddDiskCustomPath-vm-add-disk-modal-custom-path-dark-pixels.png
+ TestMachinesDisks-testAddDiskCustomPath-vm-add-disk-modal-custom-path-medium-pixels.png
+ TestMachinesDisks-testAddDiskCustomPath-vm-add-disk-modal-custom-path-pixels.png
+ TestMachinesDisks-testAddDiskNFS-vm-add-disk-modal-nfs-dark-pixels.png
+ TestMachinesDisks-testAddDiskNFS-vm-add-disk-modal-nfs-medium-pixels.png
+ TestMachinesDisks-testAddDiskNFS-vm-add-disk-modal-nfs-pixels.png
+ TestMachinesDisks-testAddDiskPool-vm-add-disk-modal-disk-pool-dark-pixels.png
+ TestMachinesDisks-testAddDiskPool-vm-add-disk-modal-disk-pool-medium-pixels.png
+ TestMachinesDisks-testAddDiskPool-vm-add-disk-modal-disk-pool-pixels.png
+ TestMachinesHostDevs-testHostDevAddSingleDevice-vm-hostdevs-add-dialog-dark-pixels.png
+ TestMachinesHostDevs-testHostDevAddSingleDevice-vm-hostdevs-add-dialog-medium-pixels.png
+ TestMachinesHostDevs-testHostDevAddSingleDevice-vm-hostdevs-add-dialog-pixels.png
+ TestMachinesHostDevs-testHostDevicesList-vm-details-hostdevs-card-pixels.png
+ TestMachinesLifecycle-testBasic-vm-details-dark-pixels.png
+ TestMachinesLifecycle-testBasic-vm-details-medium-pixels.png
+ TestMachinesLifecycle-testBasic-vm-details-mobile-pixels.png
+ TestMachinesLifecycle-testBasic-vm-details-pixels.png
+ TestMachinesLifecycle-testBasic-vm-details-rtl-pixels.png
+ TestMachinesNICs-testNICAdd-vm-add-nic-modal-dark-pixels.png
+ TestMachinesNICs-testNICAdd-vm-add-nic-modal-medium-pixels.png
+ TestMachinesNICs-testNICAdd-vm-add-nic-modal-pixels.png
+ TestMachinesNICs-testNICEdit-vm-edit-nic-modal-dark-pixels.png
+ TestMachinesNICs-testNICEdit-vm-edit-nic-modal-medium-pixels.png
+ TestMachinesNICs-testNICEdit-vm-edit-nic-modal-pixels.png
+ TestMachinesNICs-testVmNICs-vm-details-nics-card-pixels.png
+ TestMachinesSettings-testVsock-vsock-dark-pixels.png
+ TestMachinesSettings-testVsock-vsock-medium-pixels.png
+ TestMachinesSettings-testVsock-vsock-pixels.png
+ TestMachinesSettings-testVsock-vsock-rtl-pixels.png
+ TestMachinesSettings-testWatchdog-watchdog-dark-pixels.png
+ TestMachinesSettings-testWatchdog-watchdog-medium-pixels.png
+ TestMachinesSettings-testWatchdog-watchdog-pixels.png
+ TestMachinesSnapshots-testSnapshotCreate-create-snapshot-dialog-dark-pixels.png
+ TestMachinesSnapshots-testSnapshotCreate-create-snapshot-dialog-error-dark-pixels.png
+ TestMachinesSnapshots-testSnapshotCreate-create-snapshot-dialog-error-medium-pixels.png
+ TestMachinesSnapshots-testSnapshotCreate-create-snapshot-dialog-error-pixels.png
+ TestMachinesSnapshots-testSnapshotCreate-create-snapshot-dialog-medium-pixels.png
+ TestMachinesSnapshots-testSnapshotCreate-create-snapshot-dialog-pixels.png
+ TestMachinesSnapshots-testSnapshots-vm-snapshost-card-pixels.png