Skip to content

Commit 234d7b9

Browse files
author
Dmitry Misharov
committed
Added data-ouia-component-ns
1 parent 751260d commit 234d7b9

File tree

19 files changed

+97
-80
lines changed

19 files changed

+97
-80
lines changed

packages/patternfly-4/react-core/src/components/Alert/Alert.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ const Alert: React.FunctionComponent<AlertProps & InjectedOuiaProps> = ({
7070
className={customClassName}
7171
aria-label={ariaLabel}
7272
{...(ouiaContext.isOuia && {
73-
'data-ouia-component-type': 'PF4/Alert',
73+
'data-ouia-component-type': 'Alert',
74+
'data-ouia-component-ns': 'PF4',
7475
'data-ouia-component-id': ouiaId || ouiaContext.ouiaId
7576
})}
7677
{...(isLiveRegion && {

packages/patternfly-4/react-core/src/components/ApplicationLauncher/__snapshots__/ApplicationLauncher.test.js.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ exports[`ApplicationLauncher custom icon 1`] = `
215215
isOpen={true}
216216
isPlain={false}
217217
onSelect={[Function]}
218-
ouiaComponentType="PF4/Dropdown"
218+
ouiaComponentType="Dropdown"
219219
ouiaContext={
220220
Object {
221221
"isOuia": false,
@@ -1083,7 +1083,7 @@ exports[`ApplicationLauncher dropup + right aligned 1`] = `
10831083
isOpen={false}
10841084
isPlain={false}
10851085
onSelect={[Function]}
1086-
ouiaComponentType="PF4/Dropdown"
1086+
ouiaComponentType="Dropdown"
10871087
ouiaContext={
10881088
Object {
10891089
"isOuia": false,
@@ -1471,7 +1471,7 @@ exports[`ApplicationLauncher dropup 1`] = `
14711471
isOpen={false}
14721472
isPlain={false}
14731473
onSelect={[Function]}
1474-
ouiaComponentType="PF4/Dropdown"
1474+
ouiaComponentType="Dropdown"
14751475
ouiaContext={
14761476
Object {
14771477
"isOuia": false,
@@ -1859,7 +1859,7 @@ exports[`ApplicationLauncher expanded 1`] = `
18591859
isOpen={true}
18601860
isPlain={false}
18611861
onSelect={[Function]}
1862-
ouiaComponentType="PF4/Dropdown"
1862+
ouiaComponentType="Dropdown"
18631863
ouiaContext={
18641864
Object {
18651865
"isOuia": false,
@@ -2722,7 +2722,7 @@ exports[`ApplicationLauncher regular 1`] = `
27222722
isOpen={false}
27232723
isPlain={false}
27242724
onSelect={[Function]}
2725-
ouiaComponentType="PF4/Dropdown"
2725+
ouiaComponentType="Dropdown"
27262726
ouiaContext={
27272727
Object {
27282728
"isOuia": false,
@@ -3110,7 +3110,7 @@ exports[`ApplicationLauncher right aligned 1`] = `
31103110
isOpen={false}
31113111
isPlain={false}
31123112
onSelect={[Function]}
3113-
ouiaComponentType="PF4/Dropdown"
3113+
ouiaComponentType="Dropdown"
31143114
ouiaContext={
31153115
Object {
31163116
"isOuia": false,

packages/patternfly-4/react-core/src/components/Breadcrumb/Breadcrumb.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ const Breadcrumb: React.FunctionComponent<BreadcrumbProps & InjectedOuiaProps> =
2525
aria-label={ariaLabel}
2626
className={css(styles.breadcrumb, className)}
2727
{...(ouiaContext.isOuia && {
28-
'data-ouia-component-type': 'PF4/Breadcrumb',
28+
'data-ouia-component-type': 'Breadcrumb',
29+
'data-ouia-component-ns': 'PF4',
2930
'data-ouia-component-id': ouiaId || ouiaContext.ouiaId
3031
})}
3132
>

packages/patternfly-4/react-core/src/components/Button/Button.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ const Button: React.FunctionComponent<ButtonProps & InjectedOuiaProps> = ({
9191
tabIndex={isDisabled && !isButtonElement ? -1 : tabIndex}
9292
type={isButtonElement ? type : null}
9393
{...(ouiaContext.isOuia && {
94-
'data-ouia-component-type': 'PF4/Button',
94+
'data-ouia-component-type': 'Button',
95+
'data-ouia-component-ns': 'PF4',
9596
'data-ouia-component-id': ouiaId || ouiaContext.ouiaId
9697
})}
9798
>

packages/patternfly-4/react-core/src/components/ChipGroup/Chip.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ class Chip extends React.Component<ChipProps & InjectedOuiaProps, ChipState> {
6363
<Component
6464
className={css(styles.chip, styles.modifiers.overflow, className)}
6565
{...ouiaContext.isOuia && {
66-
'data-ouia-component-type': 'PF4/OverflowChip',
66+
'data-ouia-component-type': 'OverflowChip',
67+
'data-ouia-component-ns': 'PF4',
6768
'data-ouia-component-id': ouiaId || ouiaContext.ouiaId
6869
}}
6970
>
@@ -92,7 +93,8 @@ class Chip extends React.Component<ChipProps & InjectedOuiaProps, ChipState> {
9293
<Component
9394
className={css(styles.chip, isReadOnly && styles.modifiers.readOnly, className)}
9495
{...ouiaContext.isOuia && {
95-
'data-ouia-component-type': 'PF4/Chip',
96+
'data-ouia-component-type': 'Chip',
97+
'data-ouia-component-ns': 'PF4',
9698
'data-ouia-component-id': ouiaId || ouiaContext.ouiaId
9799
}}
98100
>
@@ -117,7 +119,8 @@ class Chip extends React.Component<ChipProps & InjectedOuiaProps, ChipState> {
117119
<Component
118120
className={css(styles.chip, isReadOnly && styles.modifiers.readOnly, className)}
119121
{...ouiaContext.isOuia && {
120-
'data-ouia-component-type': 'PF4/Chip',
122+
'data-ouia-component-type': 'Chip',
123+
'data-ouia-component-ns': 'PF4',
121124
'data-ouia-component-id': ouiaId || ouiaContext.ouiaId
122125
}}
123126
>

packages/patternfly-4/react-core/src/components/Dropdown/DropdownWithContext.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class DropdownWithContext extends React.Component<DropdownProps & InjectedOuiaPr
2424
direction: DropdownDirection.down,
2525
onSelect: (): void => undefined,
2626
autoFocus: true,
27-
ouiaComponentType: 'PF4/Dropdown'
27+
ouiaComponentType: 'Dropdown'
2828
};
2929

3030
constructor(props: DropdownProps & InjectedOuiaProps) {
@@ -94,6 +94,7 @@ class DropdownWithContext extends React.Component<DropdownProps & InjectedOuiaPr
9494
ref={this.baseComponentRef}
9595
{...ouiaContext.isOuia && {
9696
'data-ouia-component-type': ouiaComponentType,
97+
'data-ouia-component-ns': 'PF4',
9798
'data-ouia-component-id': ouiaId || ouiaContext.ouiaId
9899
}}
99100
>

packages/patternfly-4/react-core/src/components/Dropdown/__snapshots__/Dropdown.test.tsx.snap

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ exports[`KebabToggle basic 1`] = `
4141
isOpen={true}
4242
isPlain={false}
4343
onSelect={[Function]}
44-
ouiaComponentType="PF4/Dropdown"
44+
ouiaComponentType="Dropdown"
4545
ouiaContext={
4646
Object {
4747
"isOuia": false,
@@ -789,7 +789,7 @@ exports[`KebabToggle dropup + right aligned 1`] = `
789789
isOpen={false}
790790
isPlain={false}
791791
onSelect={[Function]}
792-
ouiaComponentType="PF4/Dropdown"
792+
ouiaComponentType="Dropdown"
793793
ouiaContext={
794794
Object {
795795
"isOuia": false,
@@ -1498,7 +1498,7 @@ exports[`KebabToggle dropup 1`] = `
14981498
isOpen={false}
14991499
isPlain={false}
15001500
onSelect={[Function]}
1501-
ouiaComponentType="PF4/Dropdown"
1501+
ouiaComponentType="Dropdown"
15021502
ouiaContext={
15031503
Object {
15041504
"isOuia": false,
@@ -2207,7 +2207,7 @@ exports[`KebabToggle expanded 1`] = `
22072207
isOpen={true}
22082208
isPlain={false}
22092209
onSelect={[Function]}
2210-
ouiaComponentType="PF4/Dropdown"
2210+
ouiaComponentType="Dropdown"
22112211
ouiaContext={
22122212
Object {
22132213
"isOuia": false,
@@ -3335,7 +3335,7 @@ exports[`KebabToggle plain 1`] = `
33353335
isOpen={false}
33363336
isPlain={true}
33373337
onSelect={[Function]}
3338-
ouiaComponentType="PF4/Dropdown"
3338+
ouiaComponentType="Dropdown"
33393339
ouiaContext={
33403340
Object {
33413341
"isOuia": false,
@@ -4041,7 +4041,7 @@ exports[`KebabToggle regular 1`] = `
40414041
isOpen={false}
40424042
isPlain={false}
40434043
onSelect={[Function]}
4044-
ouiaComponentType="PF4/Dropdown"
4044+
ouiaComponentType="Dropdown"
40454045
ouiaContext={
40464046
Object {
40474047
"isOuia": false,
@@ -4750,7 +4750,7 @@ exports[`KebabToggle right aligned 1`] = `
47504750
isOpen={false}
47514751
isPlain={false}
47524752
onSelect={[Function]}
4753-
ouiaComponentType="PF4/Dropdown"
4753+
ouiaComponentType="Dropdown"
47544754
ouiaContext={
47554755
Object {
47564756
"isOuia": false,
@@ -4947,7 +4947,7 @@ exports[`dropdown basic 1`] = `
49474947
isOpen={true}
49484948
isPlain={false}
49494949
onSelect={[Function]}
4950-
ouiaComponentType="PF4/Dropdown"
4950+
ouiaComponentType="Dropdown"
49514951
ouiaContext={
49524952
Object {
49534953
"isOuia": false,
@@ -5718,7 +5718,7 @@ exports[`dropdown dropup + right aligned 1`] = `
57185718
isOpen={false}
57195719
isPlain={false}
57205720
onSelect={[Function]}
5721-
ouiaComponentType="PF4/Dropdown"
5721+
ouiaComponentType="Dropdown"
57225722
ouiaContext={
57235723
Object {
57245724
"isOuia": false,
@@ -6450,7 +6450,7 @@ exports[`dropdown dropup 1`] = `
64506450
isOpen={false}
64516451
isPlain={false}
64526452
onSelect={[Function]}
6453-
ouiaComponentType="PF4/Dropdown"
6453+
ouiaComponentType="Dropdown"
64546454
ouiaContext={
64556455
Object {
64566456
"isOuia": false,
@@ -7182,7 +7182,7 @@ exports[`dropdown expanded 1`] = `
71827182
isOpen={true}
71837183
isPlain={false}
71847184
onSelect={[Function]}
7185-
ouiaComponentType="PF4/Dropdown"
7185+
ouiaComponentType="Dropdown"
71867186
ouiaContext={
71877187
Object {
71887188
"isOuia": false,
@@ -8333,7 +8333,7 @@ exports[`dropdown primary 1`] = `
83338333
isOpen={false}
83348334
isPlain={false}
83358335
onSelect={[Function]}
8336-
ouiaComponentType="PF4/Dropdown"
8336+
ouiaComponentType="Dropdown"
83378337
ouiaContext={
83388338
Object {
83398339
"isOuia": false,
@@ -9064,7 +9064,7 @@ exports[`dropdown regular 1`] = `
90649064
isOpen={false}
90659065
isPlain={false}
90669066
onSelect={[Function]}
9067-
ouiaComponentType="PF4/Dropdown"
9067+
ouiaComponentType="Dropdown"
90689068
ouiaContext={
90699069
Object {
90709070
"isOuia": false,
@@ -9796,7 +9796,7 @@ exports[`dropdown right aligned 1`] = `
97969796
isOpen={false}
97979797
isPlain={false}
97989798
onSelect={[Function]}
9799-
ouiaComponentType="PF4/Dropdown"
9799+
ouiaComponentType="Dropdown"
98009800
ouiaContext={
98019801
Object {
98029802
"isOuia": false,

packages/patternfly-4/react-core/src/components/Nav/Nav.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ class Nav extends React.Component<NavProps & InjectedOuiaProps> {
142142
: ariaLabel
143143
}
144144
{...(ouiaContext.isOuia && {
145-
'data-ouia-component-type': 'PF4/Nav',
145+
'data-ouia-component-type': 'Nav',
146+
'data-ouia-component-ns': 'PF4',
146147
'data-ouia-component-id': ouiaId || ouiaContext.ouiaId
147148
})}
148149
{...props}

packages/patternfly-4/react-core/src/components/OptionsMenu/__snapshots__/OptionsMenu.test.js.snap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ exports[`optionsMenu expanded 1`] = `
179179
isOpen={true}
180180
isPlain={false}
181181
onSelect={[Function]}
182-
ouiaComponentType="PF4/Dropdown"
182+
ouiaComponentType="Dropdown"
183183
ouiaContext={
184184
Object {
185185
"isOuia": false,
@@ -1316,7 +1316,7 @@ exports[`optionsMenu isDisabled 1`] = `
13161316
isOpen={false}
13171317
isPlain={false}
13181318
onSelect={[Function]}
1319-
ouiaComponentType="PF4/Dropdown"
1319+
ouiaComponentType="Dropdown"
13201320
ouiaContext={
13211321
Object {
13221322
"isOuia": false,
@@ -1718,7 +1718,7 @@ exports[`optionsMenu open up 1`] = `
17181718
isOpen={false}
17191719
isPlain={false}
17201720
onSelect={[Function]}
1721-
ouiaComponentType="PF4/Dropdown"
1721+
ouiaComponentType="Dropdown"
17221722
ouiaContext={
17231723
Object {
17241724
"isOuia": false,
@@ -2114,7 +2114,7 @@ exports[`optionsMenu plain 1`] = `
21142114
isOpen={false}
21152115
isPlain={true}
21162116
onSelect={[Function]}
2117-
ouiaComponentType="PF4/Dropdown"
2117+
ouiaComponentType="Dropdown"
21182118
ouiaContext={
21192119
Object {
21202120
"isOuia": false,
@@ -2429,7 +2429,7 @@ exports[`optionsMenu regular 1`] = `
24292429
isOpen={false}
24302430
isPlain={false}
24312431
onSelect={[Function]}
2432-
ouiaComponentType="PF4/Dropdown"
2432+
ouiaComponentType="Dropdown"
24332433
ouiaContext={
24342434
Object {
24352435
"isOuia": false,
@@ -2828,7 +2828,7 @@ exports[`optionsMenu right aligned + open up 1`] = `
28282828
isOpen={false}
28292829
isPlain={false}
28302830
onSelect={[Function]}
2831-
ouiaComponentType="PF4/Dropdown"
2831+
ouiaComponentType="Dropdown"
28322832
ouiaContext={
28332833
Object {
28342834
"isOuia": false,
@@ -3224,7 +3224,7 @@ exports[`optionsMenu right aligned 1`] = `
32243224
isOpen={false}
32253225
isPlain={false}
32263226
onSelect={[Function]}
3227-
ouiaComponentType="PF4/Dropdown"
3227+
ouiaComponentType="Dropdown"
32283228
ouiaContext={
32293229
Object {
32303230
"isOuia": false,
@@ -3632,7 +3632,7 @@ exports[`optionsMenu text 1`] = `
36323632
isOpen={false}
36333633
isPlain={false}
36343634
onSelect={[Function]}
3635-
ouiaComponentType="PF4/Dropdown"
3635+
ouiaComponentType="Dropdown"
36363636
ouiaContext={
36373637
Object {
36383638
"isOuia": false,

packages/patternfly-4/react-core/src/components/Pagination/Pagination.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ const Pagination: React.FunctionComponent<PaginationProps & InjectedOuiaProps> =
192192
)}
193193
id={widgetId}
194194
{...(ouiaContext.isOuia && {
195-
'data-ouia-component-type': 'PF4/Pagination',
195+
'data-ouia-component-type': 'Pagination',
196+
'data-ouia-component-ns': 'PF4',
196197
'data-ouia-component-id': ouiaId || ouiaContext.ouiaId
197198
})}
198199
{...props}

0 commit comments

Comments
 (0)