Skip to content

Commit

Permalink
feat(#2062): rename prefix of react components to "goab"
Browse files Browse the repository at this point in the history
BREAKING CHANGE: rename all components for React apps.
  • Loading branch information
vanessatran-ddi authored and minhthytran committed Nov 29, 2024
1 parent 314faa1 commit 78fd615
Show file tree
Hide file tree
Showing 117 changed files with 2,277 additions and 1,802 deletions.
31 changes: 18 additions & 13 deletions _templates/react/src/app/app.tsx
Original file line number Diff line number Diff line change
@@ -1,38 +1,43 @@
import { Link, Outlet } from "react-router-dom";
import { GoAAppFooter, GoAAppHeader, GoAMicrositeHeader, GoAOneColumnLayout, GoASideMenu, GoASideMenuGroup } from "@abgov/react-components";
import {
GoabAppFooter,
GoabAppHeader,
GoabMicrositeHeader,
GoabOneColumnLayout,
GoabSideMenu,
GoabSideMenuGroup,
} from "@abgov/react-components";
import "@abgov/style";

export function App() {
return (
<GoAOneColumnLayout>
<GoabOneColumnLayout>
<section slot="header">
<GoAMicrositeHeader type="alpha" version="UAT" />
<GoAAppHeader url="/" heading="Design System">
<GoabMicrositeHeader type="alpha" version="UAT" />
<GoabAppHeader url="/" heading="Design System">
<a href="/login">Sign in</a>
</GoAAppHeader>
</GoabAppHeader>
</section>
<div style={{ display: "flex" }}>
<section style={{ flex: "0 0 250px" }}>
<GoASideMenu>
<GoASideMenuGroup heading="Components">
<GoabSideMenu>
<GoabSideMenuGroup heading="Components">
<Link to="/">Nothing here</Link>

{/* Add links here */}

</GoASideMenuGroup>
</GoabSideMenuGroup>

{/* Add links here */}

</GoASideMenu>
</GoabSideMenu>
</section>
<section>
<Outlet />
</section>
</div>
<section slot="footer">
<GoAAppFooter />
<GoabAppFooter />
</section>
</GoAOneColumnLayout>
</GoabOneColumnLayout>
);
}

Expand Down
10 changes: 5 additions & 5 deletions _templates/web/src/app/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@
import TextareaPage from "../pages/TextareaPage.svelte"
import TextFieldPage from "../pages/TextFieldPage.svelte"
import TooltipPage from "../pages/TooltipPage.svelte"
let hash: string = "#";
onMount(() => {
hash = window.location.hash;
window.addEventListener("hashchange", (e) => {
// @ts-expect-error
hash = e.target?.location?.hash;
})
})
})
})
</script>

<svelte:head>
<title>GoA Component Playground</title>
<title>GoAB Component Playground</title>
</svelte:head>

<goa-one-column-layout>
Expand Down Expand Up @@ -206,7 +206,7 @@
{:else if hash === "#tooltip"}
<TooltipPage />
{/if}

</div>
</section>

Expand Down
18 changes: 18 additions & 0 deletions libs/common/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
19 changes: 19 additions & 0 deletions libs/common/.releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "../../.releaserc.json",
"tagFormat": "common-v${version}",
"plugins": [
[
"@abgov/nx-release",
{
"project": "ui-components-common"
}
],
[
"@semantic-release/npm",
{
"pkgRoot": "dist/libs/common"
}
],
"@semantic-release/github"
]
}
9 changes: 9 additions & 0 deletions libs/common/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "@abgov/ui-components-common",
"version": "0.0.0",
"description": "Government of Alberta - UI Web components",
"private": true,
"type": "module",
"main": "./index.js",
"module": "./index.js"
}
36 changes: 36 additions & 0 deletions libs/common/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "common",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/common/src",
"projectType": "library",
"targets": {
"lint": {
"executor": "@nx/eslint:lint"
},
"build": {
"executor": "@nx/vite:build",
"outputs": [
"{options.outputPath}"
],
"defaultConfiguration": "production",
"options": {
"outputPath": "dist/libs/common"
},
"configurations": {
"development": {
"mode": "development"
},
"production": {
"mode": "production"
}
}
},
"release": {
"executor": "nx:run-commands",
"options": {
"command": "npx semantic-release -e ./libs/ui-components-common/.releaserc.json"
}
}
},
"tags": []
}
1 change: 1 addition & 0 deletions libs/common/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./lib/common";
Loading

0 comments on commit 78fd615

Please sign in to comment.