Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New icons (bold, italic, and numbered list) and Chromatic config changes #1301

Merged
merged 8 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ jobs:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
onlyChanged: "!startsWith(github.ref, 'refs/heads/main')" # Use TurboSnap for PR builds
workingDir: ./packages/nimble-components
externals: |
- '.storybook/public/**'
- '../packages/nimble-tokens/dist/icons/svg/**'
- '../packages/nimble-tokens/source/styledictionary/properties/**'
storybookBuildDir: ../../packages/site/dist/storybook
exitOnceUploaded: true # Do not wait for test results
exitZeroOnChanges: true # Option to prevent the workflow from failing
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "New icons for bold, italic, and numbered list",
"packageName": "@ni/nimble-components",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "New icons for bold, italic, and numbered list",
"packageName": "@ni/nimble-tokens",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type * as IconsNamespace from '../icons/all-icons';
import type * as IconsNamespace from '../../icons/all-icons';

type IconName = keyof typeof IconsNamespace;

Expand Down Expand Up @@ -76,6 +76,9 @@ export const iconMetadata: {
IconBlockWithRibbon: {
tags: ['certificate']
},
IconBoldB: {
tags: []
},
IconBookMagnifyingGlass: {
tags: ['analyze']
},
Expand Down Expand Up @@ -295,6 +298,9 @@ export const iconMetadata: {
IconInfoCircle: {
tags: []
},
IconItalicI: {
tags: []
},
IconKey: {
tags: ['access-control', 'active-directory']
},
Expand Down Expand Up @@ -343,6 +349,9 @@ export const iconMetadata: {
IconNotebook: {
tags: []
},
IconNumberList: {
tags: ['order']
},
IconPaste: {
tags: ['clipboard']
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { NimbleIconName } from '@ni/nimble-tokens/dist/icons/js';
import { DesignSystem } from '@microsoft/fast-foundation';
import { getSpecTypeByNamedList } from '../../utilities/tests/parameterized';
import * as allIconsNamespace from '../../icons/all-icons';
import { iconMetadata } from '../icon-metadata';
import { iconMetadata } from './icon-metadata';

describe('Icons', () => {
describe('should have correct SVG structure', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/nimble-tokens/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ These steps require access to Adobe Illustrator and Perforce so will typically b

3. Confirm the new icon files will build correctly by running: `npm run build -w @ni/nimble-tokens`.
4. Generate and build icon components by running `npm run build -w @ni/nimble-components`. This step will report an error at this point but is necessary to enable the next step.
5. Add metadata for the new icons to `nimble-components\src\icon-base\icon-metadata.ts`.
5. Add metadata for the new icons to `nimble-components/src/icon-base/tests/icon-metadata.ts`.
6. Run `npm run build -w @ni/nimble-components` again. It should now succeed.
7. Preview the built files by running: `npm run storybook -w @ni/nimble-components`, and review the **Icons** story to confirm that your changes appear correctly. Inspect the icons in each **Severity** and ensure their color changes.
8. Publish a PR with your changes. If there are any new icons, set `changeType` and `dependentChangeType` to minor in the beachball change file.
17 changes: 17 additions & 0 deletions packages/nimble-tokens/dist/icons/svg/bold-b_16x16.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions packages/nimble-tokens/dist/icons/svg/italic-i_16x16.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions packages/nimble-tokens/dist/icons/svg/number-list_16x16.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.