Skip to content

Commit e8ec098

Browse files
committed
refactor: simplify About Modal layout with HTML definition list
Replace PatternFly DescriptionList components with standard HTML <dl>, <dt>, and <dd> tags for a cleaner two-column layout. Changes: - Remove PatternFly DescriptionList imports - Use native HTML definition list elements (dl, dt, dd) - Maintain all data-testid attributes and co-select-to-copy classes - Keep the same information displayed: - Dashboard Version - Server Version - Username - Browser Name - Browser Version - Browser OS Benefits: - Simpler markup structure - Better semantic HTML - More flexible styling control - Maintains accessibility and testability All tests pass (12 passed). Assisted-by: Claude Sonnet 4.5 Signed-off-by: Oleksii Orel <oorel@redhat.com>
1 parent bbd5a5d commit e8ec098

File tree

2 files changed

+34
-50
lines changed

2 files changed

+34
-50
lines changed

.image-tag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pr-1452-10
1+
pr-1452-11

packages/dashboard-frontend/src/Layout/Header/Tools/AboutMenu/Modal.tsx

Lines changed: 33 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,7 @@
1010
* Red Hat, Inc. - initial API and implementation
1111
*/
1212

13-
import {
14-
AboutModal as PatternflyAboutModal,
15-
Content,
16-
DescriptionList,
17-
DescriptionListDescription,
18-
DescriptionListGroup,
19-
DescriptionListTerm,
20-
} from '@patternfly/react-core';
13+
import { AboutModal as PatternflyAboutModal, Content } from '@patternfly/react-core';
2114
import { detect } from 'detect-browser';
2215
import React from 'react';
2316

@@ -54,65 +47,56 @@ export class AboutModal extends React.PureComponent<Props> {
5447

5548
return (
5649
<Content>
57-
<DescriptionList>
50+
<dl>
5851
{dashboardVersion && (
59-
<DescriptionListGroup>
60-
<DescriptionListTerm>Dashboard Version</DescriptionListTerm>
61-
<DescriptionListDescription
62-
className="co-select-to-copy"
63-
data-testid="dashboard-version"
64-
>
52+
<>
53+
<dt>Dashboard Version</dt>
54+
<dd className="co-select-to-copy" data-testid="dashboard-version">
6555
{dashboardVersion}
66-
</DescriptionListDescription>
67-
</DescriptionListGroup>
56+
</dd>
57+
</>
6858
)}
6959
{serverVersion && (
70-
<DescriptionListGroup>
71-
<DescriptionListTerm>Server Version</DescriptionListTerm>
72-
<DescriptionListDescription
73-
className="co-select-to-copy"
74-
data-testid="server-version"
75-
>
60+
<>
61+
<dt>Server Version</dt>
62+
<dd className="co-select-to-copy" data-testid="server-version">
7663
{serverVersion}
77-
</DescriptionListDescription>
78-
</DescriptionListGroup>
64+
</dd>
65+
</>
7966
)}
8067
{username && (
81-
<DescriptionListGroup>
82-
<DescriptionListTerm>Username</DescriptionListTerm>
83-
<DescriptionListDescription className="co-select-to-copy" data-testid="username">
68+
<>
69+
<dt>Username</dt>
70+
<dd className="co-select-to-copy" data-testid="username">
8471
{username}
85-
</DescriptionListDescription>
86-
</DescriptionListGroup>
72+
</dd>
73+
</>
8774
)}
8875
{browserName && (
89-
<DescriptionListGroup>
90-
<DescriptionListTerm>Browser Name</DescriptionListTerm>
91-
<DescriptionListDescription className="co-select-to-copy" data-testid="browser-name">
76+
<>
77+
<dt>Browser Name</dt>
78+
<dd className="co-select-to-copy" data-testid="browser-name">
9279
{browserName}
93-
</DescriptionListDescription>
94-
</DescriptionListGroup>
80+
</dd>
81+
</>
9582
)}
9683
{browserVersion && (
97-
<DescriptionListGroup>
98-
<DescriptionListTerm>Browser Version</DescriptionListTerm>
99-
<DescriptionListDescription
100-
className="co-select-to-copy"
101-
data-testid="browser-version"
102-
>
84+
<>
85+
<dt>Browser Version</dt>
86+
<dd className="co-select-to-copy" data-testid="browser-version">
10387
{browserVersion}
104-
</DescriptionListDescription>
105-
</DescriptionListGroup>
88+
</dd>
89+
</>
10690
)}
10791
{browserOS && (
108-
<DescriptionListGroup>
109-
<DescriptionListTerm>Browser OS</DescriptionListTerm>
110-
<DescriptionListDescription className="co-select-to-copy" data-testid="browser-os">
92+
<>
93+
<dt>Browser OS</dt>
94+
<dd className="co-select-to-copy" data-testid="browser-os">
11195
{browserOS}
112-
</DescriptionListDescription>
113-
</DescriptionListGroup>
96+
</dd>
97+
</>
11498
)}
115-
</DescriptionList>
99+
</dl>
116100
</Content>
117101
);
118102
}

0 commit comments

Comments
 (0)