Skip to content

Commit

Permalink
Merge branch 'main' into spec-template-feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jattasNI committed Feb 29, 2024
2 parents 23b2573 + 7a14257 commit c2d4362
Show file tree
Hide file tree
Showing 886 changed files with 55,568 additions and 23,300 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
/packages/nimble-components/src/wafer-map @rajsite @jattasNI @DStavilaNI @zszilagy
/packages/nimble-components/src/rich-text-viewer @rajsite @jattasNI @vikisekarNI
/packages/nimble-components/src/rich-text-editor @rajsite @jattasNI @vikisekarNI
/packages/nimble-components/src/card @rajsite @jattasNI @kjohn1922 @mollykreis
/packages/nimble-tokens @rajsite @jattasNI @fredvisser
/packages/site @rajsite @jattasNI
/packages/xliff-to-json-converter @rajsite @TrevorKarjanis @jattasNI
Expand Down
1 change: 1 addition & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"^@tanstack/",
"^@tiptap/",
"@types/markdown-it",
"comlink",
"d3-",
"prosemirror-"
],
Expand Down
25 changes: 20 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,40 @@ on:
branches:
- '**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
GITHUB_SERVICE_USER: "rajsite"
GITHUB_SERVICE_EMAIL: "[email protected]"
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
LANGUAGE: "en_US.UTF-8"
HAS_GITHUBPAGESDEPLOYTOKEN: ${{secrets.GITHUBPAGESDEPLOYTOKEN != ''}}
HAS_CHROMATIC_PROJECT_TOKEN: ${{secrets.CHROMATIC_PROJECT_TOKEN != ''}}
HAS_LHCI_GITHUB_APP_TOKEN: ${{secrets.LHCI_GITHUB_APP_TOKEN != ''}}
HAS_NPM_TOKEN: ${{secrets.NPM_TOKEN != ''}}
HAS_NUGET_TOKEN: ${{secrets.NUGET_TOKEN != ''}}

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
if: env.HAS_GITHUBPAGESDEPLOYTOKEN == 'true'
with:
# Required for beachball changelog detection
fetch-depth: 0
# Must checkout with a token that can push to protected branches for beachball
# Cannot rely on GITHUB_TOKEN with workflow contents permission
# See: https://github.com/orgs/community/discussions/40971
token: ${{ secrets.GITHUBPAGESDEPLOYTOKEN }}
- uses: actions/checkout@v3
if: env.HAS_GITHUBPAGESDEPLOYTOKEN == 'false'
with:
# Required for beachball changelog detection
fetch-depth: 0

# Install dependencies
- uses: actions/setup-dotnet@v3
Expand All @@ -34,7 +49,7 @@ jobs:
working-directory: packages/nimble-blazor/
- uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
# Specify npm version
Expand Down Expand Up @@ -74,7 +89,7 @@ jobs:

# Publish to Chromatic (from any push)
- name: Publish to Chromatic
if: github.event_name == 'push'
if: env.HAS_CHROMATIC_PROJECT_TOKEN == 'true' && github.event_name == 'push'
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
Expand All @@ -96,7 +111,7 @@ jobs:

# Run Lighthouse audit (from any push)
- name: Performance Audit with Lighthouse CI
if: github.event_name == 'push'
if: env.HAS_LHCI_GITHUB_APP_TOKEN == 'true' && github.event_name == 'push'
run: npm run performance
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
Expand All @@ -113,14 +128,14 @@ jobs:
# Release
- name: Set Git User
if: startsWith(github.ref, 'refs/heads/main')
if: env.HAS_GITHUBPAGESDEPLOYTOKEN == 'true' && startsWith(github.ref, 'refs/heads/main')
run: |
git config --global user.name "${{ env.GITHUB_SERVICE_USER }}"
git config --global user.email "${{ env.GITHUB_SERVICE_EMAIL }}"
# Update package versions, tag, and publish to npm (only from main)
- name: Beachball publish
if: startsWith(github.ref, 'refs/heads/main')
if: env.HAS_GITHUBPAGESDEPLOYTOKEN == 'true' && env.HAS_NPM_TOKEN == 'true' && env.HAS_NUGET_TOKEN == 'true' && startsWith(github.ref, 'refs/heads/main')
env:
NPM_SECRET_TOKEN: ${{ secrets.NPM_TOKEN }}
NUGET_SECRET_TOKEN: ${{ secrets.NUGET_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"redhat.vscode-yaml",
"editorconfig.editorconfig",
"rvest.vs-code-prettier-eslint",
"silvenon.mdx",
"unifiedjs.vscode-mdx",
"ms-dotnettools.csharp",
"ms-dotnettools.blazorwasm-companion"
]
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"mode": "auto"
}
],
"xd.globalEditor": true,
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
"omnisharp.useModernNet": true
}
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ This repository uses the following tooling. See below for more info.

First step in development is to build the monorepo which requires the following to be installed:

- Node.js version 18+ (run `node --version`) and npm version 8+ (run `npm --version`) which can be downloaded from https://nodejs.org/en/download/
- .NET 6 SDK (`6.0.202 <= version < 7`) which can be downloaded from https://dotnet.microsoft.com/en-us/download
- Node.js version 20+ (run `node --version`) and npm version 10+ (run `npm --version`) which can be downloaded from https://nodejs.org/en/download/
- .NET 6 SDK (`6.0.418 <= version < 7`) which can be downloaded from https://dotnet.microsoft.com/en-us/download
- Run `dotnet --info` to verify the required version of the SDK is installed. A `v6` install is required, but it's fine if later versions are installed too.

From the `nimble` directory:
Expand Down Expand Up @@ -192,7 +192,7 @@ The general policy is that intermittent failures that can fail a build, such as
Some resolutions for an intermittent test are:

1. Immediately submit a PR to address the underlying issue causing the failure. This can be done if the change can be approved and merged by the end of the day that the issue was discovered and if there is high confidence in the change.
2. If the underlying issue is not well-known or the fix does not give high confidence in resolving the intermittent test then the test should be disabled and a tech debt issue created to handle the intermittent test. The disabled test should include a comment linking to the corresponding issue. Then the new issue itself must be handled as follows.
2. If the underlying issue is not well-known or the fix does not give high confidence in resolving the intermittent test then the test should be disabled with `xit` and a tech debt issue created to handle the intermittent test. The disabled test should include a comment linking to the corresponding issue. Then the new issue itself must be handled as follows.

### Handling new intermittent test tech debt issues

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ This repository contains the source for the following packages:
- **[`@ni/nimble-tokens`](/packages/nimble-tokens/)** - design tokens used by the component packages

And some additional utility packages:
- [`@ni/jasmine-parameterized`](/packages/jasmine-parameterized/) - a utility for writing [Jasmine](https://jasmine.github.io/) parameterized tests
- [`@ni/xliff-to-json-converter`](/packages/xliff-to-json-converter/) - a utility to convert translation files from XLIFF to JSON for Angular localization

Consult the `README.md` for each package to learn more, including how to use it in an application.
Expand Down
2 changes: 1 addition & 1 deletion angular-workspace/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@ni/nimble-angular": {
"projectType": "library",
"root": "projects/ni/nimble-angular",
"sourceRoot": "projects/ni/nimble-angular/src",
"sourceRoot": "projects/ni/nimble-angular",
"prefix": "lib",
"architect": {
"build": {
Expand Down
27 changes: 27 additions & 0 deletions angular-workspace/lighthouserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module.exports = {
ci: {
collect: {
// Serve from dist folder so Angular project name is part of url path
// and shows up in GitHub status checks
staticDistDir: './dist/',
url: [
'http://localhost/example-client-app/#/customapp'
],
numberOfRuns: 3,
settings: {
preset: 'desktop',
// Omit the pwa category
onlyCategories: ['accessibility', 'best-practices', 'performance', 'seo']
}
},
assert: {
assertions: {
'categories:performance': ['error', { minScore: 0.9 }],
'categories:accessibility': ['error', { minScore: 0.8 }]
}
},
upload: {
target: 'temporary-public-storage',
},
},
};
35 changes: 19 additions & 16 deletions angular-workspace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,47 +15,50 @@
"pack": "npm run pack:library && npm run pack:application",
"pack:library": "cd dist/ni/nimble-angular && npm pack",
"pack:application": "cd dist/example-client-app && npm pack",
"performance": "lhci autorun",
"watch": "ng build --watch --configuration development",
"test": "ng test --watch=false",
"lint": "ng lint",
"format": "ng lint --fix"
},
"dependencies": {
"@angular/animations": "^14.2.0",
"@angular/common": "^14.2.0",
"@angular/compiler": "^14.2.0",
"@angular/core": "^14.2.0",
"@angular/forms": "^14.2.0",
"@angular/platform-browser": "^14.2.0",
"@angular/platform-browser-dynamic": "^14.2.0",
"@angular/router": "^14.2.0",
"@angular/animations": "^15.2.10",
"@angular/common": "^15.2.10",
"@angular/compiler": "^15.2.10",
"@angular/core": "^15.2.10",
"@angular/forms": "^15.2.10",
"@angular/platform-browser": "^15.2.10",
"@angular/platform-browser-dynamic": "^15.2.10",
"@angular/router": "^15.2.10",
"@ni/nimble-components": "*",
"rxjs": "^7.3.0",
"tslib": "^2.2.0",
"zone.js": "^0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.2.0",
"@angular/cli": "^14.2.0",
"@angular/compiler-cli": "^14.2.0",
"@angular/localize": "^14.2.0",
"@angular-devkit/build-angular": "^15.2.10",
"@angular/cli": "^15.2.10",
"@angular/compiler-cli": "^15.2.10",
"@angular/localize": "^15.2.10",
"@lhci/cli": "^0.13.0",
"@microsoft/fast-web-utilities": "^6.0.0",
"@ni/eslint-config-angular": "^5.0.3",
"@ni/eslint-config-angular": "^6.0.0",
"@ni/eslint-config-javascript": "^4.2.0",
"@ni/eslint-config-typescript": "^4.2.0",
"@ni/jasmine-parameterized": "*",
"@ni/nimble-tokens": "*",
"@rollup/plugin-node-resolve": "^15.0.1",
"@types/jasmine": "^4.3.1",
"@types/node": "^18.11.18",
"eslint-plugin-jsdoc": "^39.6.8",
"eslint-plugin-jsdoc": "^46.8.2",
"jasmine-core": "^4.5.0",
"karma": "^6.3.0",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage": "^2.0.3",
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.0.0",
"ng-packagr": "^14.1.0",
"playwright": "^1.30.0",
"ng-packagr": "^15.2.2",
"playwright": "1.40.0",
"rollup": "^3.10.1",
"typescript": "~4.8.2"
}
Expand Down
17 changes: 0 additions & 17 deletions angular-workspace/projects/example-client-app/.browserslistrc

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = function (config) {
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
stopSpecOnExpectationFailure: false
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { NimbleLabelProviderRichTextModule } from '@ni/nimble-angular/label-prov
import { NimbleLabelProviderTableModule } from '@ni/nimble-angular/label-provider/table';
import { NimbleMappingTextModule } from '@ni/nimble-angular/mapping/text';
import { NimbleMappingIconModule } from '@ni/nimble-angular/mapping/icon';
import { NimbleMappingUserModule } from '@ni/nimble-angular/mapping/user';
import { NimbleMappingSpinnerModule } from '@ni/nimble-angular/mapping/spinner';
import { NimbleTableModule } from '@ni/nimble-angular/table';
import { NimbleTableColumnTextModule } from '@ni/nimble-angular/table-column/text';
Expand All @@ -27,6 +28,7 @@ import { NimbleTableColumnNumberTextModule } from '@ni/nimble-angular/table-colu
import { NimbleTableColumnDurationTextModule } from '@ni/nimble-angular/table-column/duration-text';
import { NimbleRichTextViewerModule } from '@ni/nimble-angular/rich-text/viewer';
import { NimbleRichTextEditorModule } from '@ni/nimble-angular/rich-text/editor';
import { NimbleRichTextMentionUsersModule } from '@ni/nimble-angular/rich-text-mention/users';
import { AppComponent } from './app.component';
import { CustomAppComponent } from './customapp/customapp.component';
import { HeaderComponent } from './header/header.component';
Expand Down Expand Up @@ -96,6 +98,8 @@ import { HeaderComponent } from './header/header.component';
NimbleRichTextEditorModule,
NimbleTableColumnIconModule,
NimbleMappingIconModule,
NimbleMappingUserModule,
NimbleRichTextMentionUsersModule,
NimbleMappingSpinnerModule,
RouterModule.forRoot(
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
</div>
<div class="sub-container">
<div class="container-label">Select</div>
<nimble-select appearance="underline">
<nimble-select filter-mode="standard" appearance="underline">
<nimble-list-option>Option 1</nimble-list-option>
<nimble-list-option>Option 2</nimble-list-option>
<nimble-list-option>Option 3</nimble-list-option>
Expand Down Expand Up @@ -186,15 +186,24 @@
<div class="sub-container">
<div class="container-label">Rich Text Editor</div>
<div class="rich-text-editor-container">
<nimble-rich-text-editor placeholder="Rich text editor" #editor>
<nimble-rich-text-editor class="rich-text-editor" placeholder="Rich text editor" #editor>
<nimble-rich-text-mention-users pattern="^user:(.*)" button-label="Mention User">
<nimble-mapping-user key="user:1" display-name="John Doe"></nimble-mapping-user>
<nimble-mapping-user key="user:2" display-name="Mary Wilson"></nimble-mapping-user>
</nimble-rich-text-mention-users>
<nimble-button slot="footer-actions" (click)="loadRichTextEditorContent()">Load Content</nimble-button>
</nimble-rich-text-editor>
</div>
</div>
<div class="sub-container">
<div class="container-label">Rich Text Viewer</div>
<div class="rich-text-viewer-container">
<nimble-rich-text-viewer [markdown]="viewerMarkdownString"></nimble-rich-text-viewer>
<nimble-rich-text-viewer [markdown]="markdownString">
<nimble-rich-text-mention-users pattern="^user:(.*)">
<nimble-mapping-user key="user:1" display-name="John Doe"></nimble-mapping-user>
<nimble-mapping-user key="user:2" display-name="Mary Wilson"></nimble-mapping-user>
</nimble-rich-text-mention-users>
</nimble-rich-text-viewer>
</div>
</div>
<div class="sub-container">
Expand All @@ -212,7 +221,7 @@
</div>
<div class="sub-container">
<div class="container-label">Table</div>
<nimble-table [data$]="tableData$" id-field-name="id" selection-mode="multiple">
<nimble-table [data$]="tableData$" id-field-name="id" parent-id-field-name="parentId" selection-mode="multiple">
<nimble-table-column-text
field-name="stringValue1"
action-menu-slot="action-menu"
Expand Down Expand Up @@ -279,6 +288,28 @@
</nimble-table>
<nimble-button class="add-table-row-button" (click)="addTableRows(10)">Add rows</nimble-button>
</div>
<div class="sub-container">
<div class="container-label">Table with delayed hierarchy</div>
<nimble-table #delayedHierarchyTable id-field-name="id" parent-id-field-name="parentId" selection-mode="multiple" (row-expand-toggle)="onRowExpandToggle($event)">
<nimble-table-column-text
field-name="firstName"
>
First name
</nimble-table-column-text>
<nimble-table-column-text
field-name="lastName"
>
Last name
</nimble-table-column-text>
<nimble-table-column-number-text
field-name="age"
format="decimal"
decimal-digits="0"
>
Age
</nimble-table-column-number-text>
</nimble-table>
</div>
<div class="sub-container">
<div class="container-label">Tabs</div>
<nimble-tabs [(activeid)]="activeTabId">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ nimble-table {
padding: $ni-nimble-small-padding;
}

.rich-text-editor {
height: 280px;
}

.add-table-row-button {
margin-top: $ni-nimble-small-padding;
}
Loading

0 comments on commit c2d4362

Please sign in to comment.