Skip to content

Commit 3bfa945

Browse files
authored
fix(SVGLibrary): add UI icon request links to Icon and Pictogram libraries (carbon-design-system#4809)
* fix(SVGLibrary): add UI icon request links to Icon and Pictogram libraries * fix(NoResult): update resource cards layout and restore download option * fix(NoResult): enhance empty state messaging and increase paragraph width
1 parent 3dcc485 commit 3bfa945

File tree

4 files changed

+35
-12
lines changed

4 files changed

+35
-12
lines changed

src/components/SVGLibraries/IconLibrary/IconLibrary.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ const IconLibrary = () => {
119119
allIconResults={filteredIcons.length}
120120
pageName="icon"
121121
pageUrl="https://github.com/carbon-design-system/carbon/blob/main/packages/icons/master/ui-icon-master.ai"
122+
single="https://github.ibm.com/brand/ui-icons/issues/new?assignees=&labels=ui-icon%2Crequest%2Csingle&projects=&template=01-ui-icon-request-single.yml&title=%5BUI+icon%5D+single%3A+UI+icon+name"
123+
batch="https://github.ibm.com/brand/ui-icons/issues/new?assignees=&labels=ui-icon%2Crequest&projects=&template=02-ui-icon-request-batch.yml&title=%5BUI+icon%5D+batch%3A+UI+icon+batch+name"
124+
update="https://github.ibm.com/brand/ui-icons/issues/new?assignees=&labels=ui-icon%2Crequest%2Cupdate&projects=&template=03-ui-icon-request-update.yml&title=%5BUI+icon%5D+update%3A+UI+icon+name"
122125
/>
123126
) : (
124127
<div className={svgLibrary}>

src/components/SVGLibraries/PictogramLibrary/PictogramLibrary.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ const IconLibrary = () => {
110110
allIconResults={filteredPictograms.length}
111111
pageName="pictogram"
112112
pageUrl="https://github.com/carbon-design-system/carbon/raw/refs/heads/main/packages/pictograms/master/productive-pictogram-master.ai"
113+
single="https://github.ibm.com/brand/ui-icons/issues/new?assignees=&labels=ui-icon%2Crequest%2Csingle&projects=&template=01-ui-icon-request-single.yml&title=%5BUI+icon%5D+single%3A+UI+icon+name"
114+
batch="https://github.ibm.com/brand/ui-icons/issues/new?assignees=&labels=ui-icon%2Crequest&projects=&template=02-ui-icon-request-batch.yml&title=%5BUI+icon%5D+batch%3A+UI+icon+batch+name"
115+
update="https://github.ibm.com/brand/ui-icons/issues/new?assignees=&labels=ui-icon%2Crequest%2Cupdate&projects=&template=03-ui-icon-request-update.yml&title=%5BUI+icon%5D+update%3A+UI+icon+name"
113116
/>
114117
) : (
115118
<div className={svgLibrary}>

src/components/SVGLibraries/shared/NoResult.js

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ const NoResult = ({
1717
type = 'icons',
1818
pageName,
1919
pageUrl,
20+
single,
21+
batch,
22+
update,
2023
}) => (
2124
<div className={noResult}>
2225
{allIconResults ? (
@@ -38,21 +41,35 @@ const NoResult = ({
3841
<>
3942
<h2 className={h2}>No result found</h2>
4043
<p className={paragraph}>
41-
It appears we don’t have an icon that matches your search. Try
42-
different search terms or give us a hand—submit your own design to the
43-
library!
44+
It appears we don’t have{' '}
45+
{`${pageName === 'icon' ? 'an icon' : 'a pictogram'}`} that matches
46+
your search. Try different search terms or submit an issue for a new{' '}
47+
{`${pageName === 'icon' ? 'icon' : 'pictogram'}`}. Select from the
48+
ticket options here or check the{' '}
49+
<a href="https://www.ibm.com/design/language/iconography/pictograms/contribute/">
50+
Contribute
51+
</a>{' '}
52+
page for more details and best practices.
4453
</p>
4554
<Row className="resource-card-group">
4655
<Column colMd={4} colLg={4} noGutterSm>
4756
<ResourceCard
48-
subTitle={`Submit ${
49-
pageName === 'icon' ? 'an icon' : 'a pictogram'
50-
} design`}
51-
href={
52-
pageName === 'icon'
53-
? 'https://github.ibm.com/brand/ui-icons/issues/new'
54-
: 'https://github.ibm.com/brand/pictograms/issues/new'
55-
}>
57+
href={single}
58+
subTitle={`UI ${pageName} request: Single`}>
59+
<Github />
60+
</ResourceCard>
61+
</Column>
62+
<Column colMd={4} colLg={4} noGutterSm>
63+
<ResourceCard
64+
href={batch}
65+
subTitle={`UI ${pageName} request: Batch`}>
66+
<Github />
67+
</ResourceCard>
68+
</Column>
69+
<Column colMd={4} colLg={4} noGutterSm>
70+
<ResourceCard
71+
href={update}
72+
subTitle={`UI ${pageName} request: Update`}>
5673
<Github />
5774
</ResourceCard>
5875
</Column>

src/components/SVGLibraries/shared/SvgLibrary.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ $svg-card-border: 1px solid $ui-03;
299299
.no-result p {
300300
margin: 0;
301301
margin-top: $spacing-06;
302-
max-width: 400px;
302+
max-width: 650px;
303303
}
304304

305305
.no-result :global(.resource-card-group) {

0 commit comments

Comments
 (0)