Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
joseivanlopez committed Sep 26, 2023
1 parent b934955 commit 3801bcf
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
8 changes: 0 additions & 8 deletions web/src/assets/styles/blocks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,6 @@ span.notification-mark[data-variant="sidebar"] {
}
}

.device-selector {
@extend .device-list;

[role="option"] {
cursor: pointer;
}
}

// compact lists in popover
.pf-c-popover li + li {
margin: 0;
Expand Down
5 changes: 5 additions & 0 deletions web/src/assets/styles/patternfly-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,8 @@ table td > .pf-c-empty-state {
.password-toggler span.pf-c-button__icon {
display: flex;
}

.pf-c-toggle-group__button.pf-m-selected {
--pf-c-toggle-group__button--m-selected--BackgroundColor: var(--color-primary);
--pf-c-toggle-group__button--Color: var(--color-gray-light);
}
4 changes: 4 additions & 0 deletions web/src/assets/styles/utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,7 @@
inline-size: 95dvw;
max-inline-size: calc(var(--ui-max-inline-size) + var(--spacer-large))
}

.cursor-pointer {
cursor: pointer;
}
9 changes: 4 additions & 5 deletions web/src/components/storage/ProposalSettingsSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const LVMSettingsForm = ({
return (
<Form id={id} onSubmit={onSubmit}>
<div className="split">
<span>{_("Devices in which to create the volume group")}</span>
<span>{_("Devices for creating the volume group")}</span>
<ToggleGroup aria-label="Volume group devices" isCompact>
<ToggleGroupItem
text="Boot device"
Expand Down Expand Up @@ -279,10 +279,9 @@ const LVMField = ({
onChangeProp({ vgDevices });
};

const description =
"Select in which devices to create the system volume group. All the file system " +
"will be created in a logical volume of the system volume group unless a " +
"different location is assigned to the file system.";
const description = _("Configuration of the system volume group. All the file system will be \
created in a logical volume of the system volume group unless a different location is \
assigned to the file system.");

const LVMSettingsButton = () => {
return (
Expand Down
6 changes: 3 additions & 3 deletions web/src/components/storage/device-utils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ import { deviceSize } from "~/components/storage/utils";

const ListBox = ({ children, ...props }) => <ul role="listbox" {...props}>{children}</ul>;

const ListBoxItem = ({ isSelected, children, onClick }) => {
const props = {};
const ListBoxItem = ({ isSelected, children, onClick, ...props }) => {
if (isSelected) props['aria-selected'] = true;

return (
Expand Down Expand Up @@ -259,12 +258,13 @@ const DeviceSelector = ({ selected, devices = [], isMultiple = false, onChange =
};

return (
<ListBox aria-label={_("Available devices")} className="stack device-selector">
<ListBox aria-label={_("Available devices")} className="stack device-list">
{ devices.map(device => (
<ListBoxItem
key={device.sid}
onClick={() => onOptionClick(device.name)}
isSelected={isSelected(device.name)}
className="cursor-pointer"
>
<DeviceItem device={device} />
</ListBoxItem>
Expand Down

0 comments on commit 3801bcf

Please sign in to comment.