Skip to content

Commit b0c10af

Browse files
committed
src: Update Registration step based on mocks
This updates the Registration step to reflect final mocks. Registration options were moved outside of from the expendable, copy was updated and spacing was revisited to align with the final mocks.
1 parent a34952a commit b0c10af

File tree

14 files changed

+174
-287
lines changed

14 files changed

+174
-287
lines changed

playwright/test.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ test.describe.serial('test', () => {
2929

3030
if (isHosted()) {
3131
frame.getByRole('heading', {
32-
name: 'Register systems using this image',
32+
name: 'Register',
3333
});
3434
await page.getByRole('radio', { name: /Register later/i }).click();
3535
await frame.getByRole('button', { name: 'Next', exact: true }).click();

src/Components/CreateImageWizard/steps/Registration/components/ActivationKeyInformation.tsx

Lines changed: 37 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ import {
55
Button,
66
Content,
77
ContentVariants,
8+
DescriptionList,
9+
DescriptionListDescription,
10+
DescriptionListGroup,
11+
DescriptionListTerm,
812
Popover,
913
Spinner,
1014
} from '@patternfly/react-core';
11-
import { HelpIcon } from '@patternfly/react-icons';
1215
import { Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table';
1316

1417
import { useAppSelector } from '../../../../../store/hooks';
@@ -34,51 +37,40 @@ const ActivationKeyInformation = (): JSX.Element => {
3437
<>
3538
{isFetchingActivationKeyInfo && <Spinner size='lg' />}
3639
{isSuccessActivationKeyInfo && (
37-
<Content>
38-
<Content component={ContentVariants.dl}>
39-
<Content component={ContentVariants.dt}>Name:</Content>
40-
<Content component={ContentVariants.dd}>{activationKey}</Content>
41-
<Content component={ContentVariants.dt}>Description:</Content>
42-
<Content component={ContentVariants.dd}>
40+
<DescriptionList>
41+
<DescriptionListGroup>
42+
<DescriptionListTerm>Name</DescriptionListTerm>
43+
<DescriptionListDescription>
44+
{activationKey}
45+
</DescriptionListDescription>
46+
</DescriptionListGroup>
47+
<DescriptionListGroup>
48+
<DescriptionListTerm>Description</DescriptionListTerm>
49+
<DescriptionListDescription>
4350
{activationKeyInfo?.body?.description || ''}
44-
</Content>
45-
<Content component={ContentVariants.dt}>Role:</Content>
46-
<Content component={ContentVariants.dd}>
51+
</DescriptionListDescription>
52+
</DescriptionListGroup>
53+
<DescriptionListGroup>
54+
<DescriptionListTerm>Role</DescriptionListTerm>
55+
<DescriptionListDescription>
4756
{activationKeyInfo?.body?.role || 'Not defined'}
48-
</Content>
49-
<Content component={ContentVariants.dt}>SLA:</Content>
50-
<Content component={ContentVariants.dd}>
57+
</DescriptionListDescription>
58+
</DescriptionListGroup>
59+
<DescriptionListGroup>
60+
<DescriptionListTerm>SLA</DescriptionListTerm>
61+
<DescriptionListDescription>
5162
{activationKeyInfo?.body?.serviceLevel || 'Not defined'}
52-
</Content>
53-
<Content component={ContentVariants.dt}>Usage:</Content>
54-
<Content component={ContentVariants.dd}>
63+
</DescriptionListDescription>
64+
</DescriptionListGroup>
65+
<DescriptionListGroup>
66+
<DescriptionListTerm>Usage</DescriptionListTerm>
67+
<DescriptionListDescription>
5568
{activationKeyInfo?.body?.usage || 'Not defined'}
56-
</Content>
57-
<Content component={ContentVariants.dt}>
58-
Additional repositories:
59-
<Popover
60-
bodyContent={
61-
<Content>
62-
<Content>
63-
The core repositories for your operating system version
64-
are always enabled and do not need to be explicitly added
65-
to the activation key.
66-
</Content>
67-
</Content>
68-
}
69-
>
70-
<Button
71-
icon={<HelpIcon />}
72-
variant='plain'
73-
aria-label='About additional repositories'
74-
className='pf-v6-u-pl-sm pf-v6-u-pt-0 pf-v6-u-pb-0'
75-
/>
76-
</Popover>
77-
</Content>
78-
<Content
79-
component={ContentVariants.dd}
80-
className='pf-v6-u-display-flex pf-v6-u-align-items-flex-end'
81-
>
69+
</DescriptionListDescription>
70+
</DescriptionListGroup>
71+
<DescriptionListGroup>
72+
<DescriptionListTerm>Additional repositories</DescriptionListTerm>
73+
<DescriptionListDescription>
8274
{activationKeyInfo?.body?.additionalRepositories &&
8375
activationKeyInfo?.body?.additionalRepositories?.length > 0 ? (
8476
<Popover
@@ -123,9 +115,9 @@ const ActivationKeyInformation = (): JSX.Element => {
123115
) : (
124116
'None'
125117
)}
126-
</Content>
127-
</Content>
128-
</Content>
118+
</DescriptionListDescription>
119+
</DescriptionListGroup>
120+
</DescriptionList>
129121
)}
130122
{isErrorActivationKeyInfo && (
131123
<Content>

src/Components/CreateImageWizard/steps/Registration/components/ActivationKeysList.tsx

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,28 @@ import React, { useEffect, useState } from 'react';
22

33
import {
44
Alert,
5+
Button,
6+
Flex,
7+
FlexItem,
58
FormGroup,
69
FormHelperText,
710
HelperText,
811
HelperTextItem,
912
MenuToggle,
1013
MenuToggleElement,
14+
Popover,
1115
Select,
1216
SelectList,
1317
SelectOption,
1418
Spinner,
1519
TextInputGroup,
1620
TextInputGroupMain,
1721
} from '@patternfly/react-core';
22+
import { InfoCircleIcon } from '@patternfly/react-icons';
1823
import { useAddNotification } from '@redhat-cloud-services/frontend-components-notifications/hooks';
1924
import { v4 as uuidv4 } from 'uuid';
2025

26+
import ActivationKeyInformation from './ActivationKeyInformation';
2127
import ManageKeysButton from './ManageKeysButton';
2228

2329
import { CDN_PROD_URL, CDN_STAGE_URL } from '../../../../../constants';
@@ -266,18 +272,38 @@ const ActivationKeysList = () => {
266272

267273
return (
268274
<>
269-
<FormGroup label='Activation key to use for this image'>
270-
<Select
271-
isScrollable
272-
isOpen={isOpen}
273-
selected={activationKey}
274-
onSelect={handleSelect}
275-
onOpenChange={handleToggle}
276-
toggle={toggle}
277-
shouldFocusFirstItemOnOpen={false}
278-
>
279-
<SelectList>{prepareSelectOptions()}</SelectList>
280-
</Select>
275+
<FormGroup label='Activation key'>
276+
<Flex spaceItems={{ default: 'spaceItemsMd' }}>
277+
<FlexItem>
278+
<Select
279+
isScrollable
280+
isOpen={isOpen}
281+
selected={activationKey}
282+
onSelect={handleSelect}
283+
onOpenChange={handleToggle}
284+
toggle={toggle}
285+
shouldFocusFirstItemOnOpen={false}
286+
>
287+
<SelectList>{prepareSelectOptions()}</SelectList>
288+
</Select>
289+
</FlexItem>
290+
<FlexItem>
291+
<Popover
292+
headerContent='Details'
293+
bodyContent={<ActivationKeyInformation />}
294+
minWidth='30'
295+
>
296+
<Button
297+
variant='secondary'
298+
icon={<InfoCircleIcon />}
299+
iconPosition='left'
300+
isDisabled={!activationKey}
301+
>
302+
View details
303+
</Button>
304+
</Popover>
305+
</FlexItem>
306+
</Flex>
281307
<FormHelperText>
282308
<HelperText>
283309
<HelperTextItem>

0 commit comments

Comments
 (0)