Skip to content

Commit 7566e2c

Browse files
authored
fix: P in P (#1999)
* chore: use Node 20.11.1 * fix: use a span instead of p for Notification subtitles Our apps render markdown for notifications which contain p tags. This results in p tags nested within p tags, which is not valid HTML and causes React runtime validations to complain.
1 parent 4dc57db commit 7566e2c

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

.node-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.9.0
1+
20.11.1

src/components/AppNotification/AppNotification.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const AppNotification = ({
6666
{title}
6767
</Text>
6868
<Text
69-
as="p"
69+
as="span"
7070
className={styles['app-notification__sub-title']}
7171
preset="body-md"
7272
>

src/components/AppNotification/__snapshots__/AppNotification.test.ts.snap

+12-12
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ exports[`<AppNotification /> Default story renders snapshot 1`] = `
1414
>
1515
This is an AppNotification title
1616
</div>
17-
<p
17+
<span
1818
class="text text--body-md app-notification__sub-title"
1919
>
2020
Lorem ipsum dolor sit amet consectetur. At et vitae quis amet felis mollis in vitae. Eget in neque et molestie. Luctus sed id commodo volutpat. In a eu in id molestie consectetur pellentesque.
21-
</p>
21+
</span>
2222
<div
2323
class="app-notification__actions"
2424
/>
@@ -41,11 +41,11 @@ exports[`<AppNotification /> LightColor story renders snapshot 1`] = `
4141
>
4242
This is an AppNotification title
4343
</div>
44-
<p
44+
<span
4545
class="text text--body-md app-notification__sub-title"
4646
>
4747
Lorem ipsum dolor sit amet consectetur. At et vitae quis amet felis mollis in vitae. Eget in neque et molestie. Luctus sed id commodo volutpat. In a eu in id molestie consectetur pellentesque.
48-
</p>
48+
</span>
4949
<div
5050
class="app-notification__actions"
5151
>
@@ -93,11 +93,11 @@ exports[`<AppNotification /> LightWithDismissAndControls story renders snapshot
9393
>
9494
This is an AppNotification title
9595
</div>
96-
<p
96+
<span
9797
class="text text--body-md app-notification__sub-title"
9898
>
9999
Lorem ipsum dolor sit amet consectetur. At et vitae quis amet felis mollis in vitae. Eget in neque et molestie. Luctus sed id commodo volutpat. In a eu in id molestie consectetur pellentesque.
100-
</p>
100+
</span>
101101
<div
102102
class="app-notification__actions"
103103
>
@@ -169,11 +169,11 @@ exports[`<AppNotification /> WithControls story renders snapshot 1`] = `
169169
>
170170
This is an AppNotification title
171171
</div>
172-
<p
172+
<span
173173
class="text text--body-md app-notification__sub-title"
174174
>
175175
Lorem ipsum dolor sit amet consectetur. At et vitae quis amet felis mollis in vitae. Eget in neque et molestie. Luctus sed id commodo volutpat. In a eu in id molestie consectetur pellentesque.
176-
</p>
176+
</span>
177177
<div
178178
class="app-notification__actions"
179179
>
@@ -221,11 +221,11 @@ exports[`<AppNotification /> WithDismissAndControls story renders snapshot 1`] =
221221
>
222222
This is an AppNotification title
223223
</div>
224-
<p
224+
<span
225225
class="text text--body-md app-notification__sub-title"
226226
>
227227
Limited subtitle text
228-
</p>
228+
</span>
229229
<div
230230
class="app-notification__actions"
231231
>
@@ -297,7 +297,7 @@ exports[`<AppNotification /> WithLinkInSubtitle story renders snapshot 1`] = `
297297
>
298298
This is an AppNotification title
299299
</div>
300-
<p
300+
<span
301301
class="text text--body-md app-notification__sub-title"
302302
>
303303
<span
@@ -314,7 +314,7 @@ exports[`<AppNotification /> WithLinkInSubtitle story renders snapshot 1`] = `
314314
315315
in.
316316
</span>
317-
</p>
317+
</span>
318318
<div
319319
class="app-notification__actions"
320320
/>

0 commit comments

Comments
 (0)