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

CNV-53287: fix the alignment issue on Settings -> User #2320

Merged
merged 1 commit into from
Dec 17, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import './ExpandSection.scss';

type ExpandSectionProps = {
className?: string;
dataTestID?: string;
isDisabled?: boolean;
isIndented?: boolean;
toggleContent?: ReactNode;
Expand All @@ -16,6 +17,7 @@ type ExpandSectionProps = {
const ExpandSection: FC<ExpandSectionProps> = ({
children,
className,
dataTestID,
isDisabled = false,
isIndented = true,
toggleContent = null,
Expand All @@ -32,6 +34,7 @@ const ExpandSection: FC<ExpandSectionProps> = ({
return (
<ExpandableSection
className={classNames(className, { 'expand-section__disabled': isDisabled }, 'ExpandSection')}
data-test-id={dataTestID}
isExpanded={isExpanded}
isIndented={isIndented}
onToggle={(_event, expanded: boolean) => handleToggle(expanded)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,23 @@ const GettingStartedSection: FC = () => {
const [quickStarts, setQuickStarts] = useKubevirtUserSettings('quickStart');
const run = runningTourSignal.value;
return (
<ExpandSection toggleText={t('Getting started resources')}>
<ExpandSection
dataTestID="settings-user-getting-started"
toggleText={t('Getting started resources')}
>
<Stack hasGutter>
<Switch
onChange={(_event, value) =>
setQuickStarts({ ...quickStarts, dontShowWelcomeModal: !value })
}
className="GettingStartedSection__switch-text"
data-test-id="welcome-information"
isChecked={!quickStarts?.dontShowWelcomeModal}
label={t('Welcome information')}
/>
<Switch
className="GettingStartedSection__switch-text"
data-test-id="guided-tour"
isChecked={run}
label={t('Guided tour')}
onChange={!run && startTour}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const ManageSSHKeySection: FC = () => {
const { t } = useKubevirtTranslation();

return (
<ExpandSection toggleText={t('Manage SSH keys')}>
<ExpandSection dataTestID="settings-user-ssh-key" toggleText={t('Manage SSH keys')}>
<Stack hasGutter>
<MutedTextSpan
text={t(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const TaskPermissionsSection: FC = () => {
const { t } = useKubevirtTranslation();
const { capabilitiesData, isLoading } = usePermissions();
return (
<ExpandSection className="permissions-tab--main" toggleText={t('Permissions')}>
<ExpandSection dataTestID="settings-user-permissions" toggleText={t('Permissions')}>
<Flex>
<FlexItem>
<Title headingLevel="h6" size="md">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.permissions-tab {
&--main {
width: 35vw;
&__divider {
margin: var(--pf-global--spacer--sm) 0 var(--pf-global--spacer--md) 0;
}
Expand Down
Loading