Skip to content

Commit

Permalink
feat(#2291)!: upgrade angular & react components
Browse files Browse the repository at this point in the history
BREAKING CHANGE: rename GoAFilterChip to GoabFilterChip and gh workflows
  • Loading branch information
vanessatran-ddi authored and ArakTaiRoth committed Jan 3, 2025
1 parent 1646a2f commit db76130
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 13 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/lts-release-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: LTS Release CI (v5 react, v3 angular)

on:
push:
branches:
- lts

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-node@v2
with:
node-version: "20"

- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

- run: npm ci

- name: Lint
run: npx nx run-many --target=lint --all

- name: Test
run: npm run test

- name: Build
run: npx nx run-many --target=build --all --prod

- name: Update VsCode documentation
run: npm run build:vscode-doc

- name: Update Web components documentation
run: cp libs/web-components/README.md dist/libs/web-components

- name: Remove types file for now
run: rm dist/libs/web-components/index.d.ts

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx nx run-many --target release --all
6 changes: 5 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
{
"name": "alpha",
"prerelease": true
},
{
"name": "lts",
"channel": "lts"
}
]
}
}
4 changes: 2 additions & 2 deletions libs/angular-components/src/lib/checked-directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export class CheckedDirective extends CheckboxControlValueAccessor {
private _checked = false;

/* eslint-disable @typescript-eslint/no-explicit-any */
override onChange: any = () => { };
override onTouched: any = () => { };
override onChange: any = () => {/** No implementation **/ };
override onTouched: any = () => {/** No implementation **/ };

constructor(protected renderer: Renderer2, protected elementRef: ElementRef) {
super(renderer, elementRef);
Expand Down
4 changes: 2 additions & 2 deletions libs/angular-components/src/lib/value-directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export class ValueDirective implements ControlValueAccessor {
private _disabled = false;

/* eslint-disable @typescript-eslint/no-explicit-any */
onChange: any = () => { };
onTouched: any = () => { };
onChange: any = () => { /* default implementation */ };
onTouched: any = () => { /* default implementation */ };

get value(): string {
return this._value;
Expand Down
4 changes: 2 additions & 2 deletions libs/common/.releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[
"@abgov/nx-release",
{
"project": "ui-components-common"
"project": "common"
}
],
[
Expand All @@ -16,4 +16,4 @@
],
"@semantic-release/github"
]
}
}
2 changes: 1 addition & 1 deletion libs/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"type": "module",
"main": "./index.js",
"module": "./index.js"
}
}
4 changes: 2 additions & 2 deletions libs/common/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"release": {
"executor": "nx:run-commands",
"options": {
"command": "npx semantic-release -e ./libs/ui-components-common/.releaserc.json"
"command": "npx semantic-release -e ./libs/common/.releaserc.json"
}
}
},
"tags": []
}
}
1 change: 1 addition & 0 deletions libs/common/src/lib/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export type GoabDatePickerOnChangeDetail = {
export type GoabChipVariant = "filter";

export type GoabChipTheme = "outline" | "filled" | "sharp";
export type GoabFilterChipTheme = "outline" | "filled";

export type GoabCheckboxOnChangeDetail = {
name?: string;
Expand Down
4 changes: 2 additions & 2 deletions libs/react-components/src/lib/filter-chip/filter-chip.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useEffect, useRef } from "react";
import { Margins } from "@abgov/ui-components-common";
import { Margins, GoabFilterChipTheme } from "@abgov/ui-components-common";

export type GoAFilterChipTheme = "outline" | "filled";

interface WCProps extends Margins {
ref: React.RefObject<HTMLElement>;
icontheme: GoAFilterChipTheme;
icontheme: GoabFilterChipTheme;
error: boolean;
content: string;
}
Expand Down
2 changes: 1 addition & 1 deletion libs/react-components/src/lib/input/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface WCProps extends Margins {
error?: boolean;
readonly?: boolean;
focused?: boolean;
handletrailingiconclick: boolean;
handletrailingiconclick?: boolean;
width?: string;
prefix?: string;
suffix?: string;
Expand Down

0 comments on commit db76130

Please sign in to comment.