Skip to content

Commit f13615e

Browse files
feat(blog): angular in depth category (#285)
1 parent ff02a2b commit f13615e

File tree

27 files changed

+307
-3
lines changed

27 files changed

+307
-3
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { expect, test } from '@playwright/test';
2+
3+
const slugs = [];
4+
5+
test.describe('migrated articles', () => {
6+
test.beforeEach(async ({ page }) => {
7+
await page.goto('/');
8+
});
9+
10+
slugs.forEach(({ slug }) => {
11+
test(`should proper display ${slug}`, async ({ page }) => {
12+
await page.goto(`/en/${slug}`);
13+
14+
const title = await page.locator('#article-title');
15+
16+
await expect(title).toBeVisible();
17+
await expect(page).toHaveURL(`/en/${slug}`);
18+
});
19+
});
20+
});

apps/blog/src/assets/i18n/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"angularNews": "Angular News",
77
"guides": "Guides",
88
"partners": "Community partners",
9-
"mainPartner": "Main partner"
9+
"mainPartner": "Main partner",
10+
"angularInDepth": "Angular In Depth"
1011
},
1112
"nav": {
1213
"home": "Home Page",

apps/blog/src/assets/i18n/pl.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"angularNews": "Wiadomości ze świata Angulara",
77
"guides": "Poradniki",
88
"partners": "Community partnerzy",
9-
"mainPartner": "Główny partner"
9+
"mainPartner": "Główny partner",
10+
"angularInDepth": "Angular In Depth"
1011
},
1112
"nav": {
1213
"home": "Strona Główna",

libs/blog-contracts/articles/src/lib/articles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export const articleCategories = [
44
'recommended',
55
'authors',
66
'latest',
7+
'angular-in-depth',
78
] as const;
89

910
export type ArticleCategory = (typeof articleCategories)[number];

libs/blog/about-us/feature-about-us/src/lib/feature-about-us/feature-about-us.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,15 @@ export class FeatureAboutUsComponent implements OnInit {
4848
private readonly _pageSize = this._authorListStore.pageSize;
4949
private readonly _sortedTitles =
5050
'key_contributor,contributor,gde,hoa,blogger';
51+
private readonly _acfFormat = 'standard';
5152

5253
ngOnInit(): void {
5354
if (this.authorsCards().length === 0) {
5455
this._authorListStore.fetchAuthorList({
5556
take: this._pageSize(),
5657
skip: 0,
5758
sortedTitles: this._sortedTitles,
59+
acfFormat: this._acfFormat,
5860
});
5961
}
6062
}
@@ -65,6 +67,7 @@ export class FeatureAboutUsComponent implements OnInit {
6567
take: this._pageSize(),
6668
skip: this._skip() + this._pageSize(),
6769
sortedTitles: this._sortedTitles,
70+
acfFormat: this._acfFormat,
6871
});
6972
}
7073
}

libs/blog/articles/data-access/src/lib/dto/articles.query.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ export type ArticlesQuery = {
66
skip?: number;
77
category?: ArticleCategory;
88
excludeRecent?: number;
9+
excludeCategory?: string;
910
} | null;
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"extends": ["../../../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"extends": [
8+
"plugin:@nx/angular",
9+
"plugin:@angular-eslint/template/process-inline-templates"
10+
],
11+
"rules": {
12+
"@angular-eslint/directive-selector": [
13+
"error",
14+
{
15+
"type": "attribute",
16+
"prefix": "al",
17+
"style": "camelCase"
18+
}
19+
],
20+
"@angular-eslint/component-selector": [
21+
"error",
22+
{
23+
"type": "element",
24+
"prefix": "al",
25+
"style": "kebab-case"
26+
}
27+
]
28+
}
29+
},
30+
{
31+
"files": ["*.html"],
32+
"extends": ["plugin:@nx/angular-template"],
33+
"rules": {}
34+
}
35+
]
36+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# feature-angular-in-depth
2+
3+
This library was generated with [Nx](https://nx.dev).
4+
5+
## Running unit tests
6+
7+
Run `nx test feature-angular-in-depth` to execute the unit tests.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/* eslint-disable */
2+
export default {
3+
displayName: 'feature-angular-in-depth',
4+
preset: '../../../../jest.preset.js',
5+
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
6+
coverageDirectory:
7+
'../../../../coverage/libs/blog/articles/feature-angular-in-depth',
8+
transform: {
9+
'^.+\\.(ts|mjs|js|html)$': [
10+
'jest-preset-angular',
11+
{
12+
tsconfig: '<rootDir>/tsconfig.spec.json',
13+
stringifyContentPathRegex: '\\.(html|svg)$',
14+
},
15+
],
16+
},
17+
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
18+
snapshotSerializers: [
19+
'jest-preset-angular/build/serializers/no-ng-attributes',
20+
'jest-preset-angular/build/serializers/ng-snapshot',
21+
'jest-preset-angular/build/serializers/html-comment',
22+
],
23+
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "feature-angular-in-depth",
3+
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
4+
"sourceRoot": "libs/blog/articles/feature-angular-in-depth/src",
5+
"prefix": "al",
6+
"projectType": "library",
7+
"tags": ["scope:client", "type:feature"],
8+
"targets": {
9+
"test": {
10+
"executor": "@nx/jest:jest",
11+
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
12+
"options": {
13+
"jestConfig": "libs/blog/articles/feature-angular-in-depth/jest.config.ts"
14+
}
15+
},
16+
"lint": {
17+
"executor": "@nx/eslint:lint"
18+
}
19+
}
20+
}

0 commit comments

Comments
 (0)