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

[DEV-1955][DEV-1972] Remove hardcoded content #1196

Open
wants to merge 81 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
81e2d29
Add bannerLinks attribute to Product codec
marcobottaro Sep 20, 2024
492999c
Fix CaseHistoriesCodec product attribute type
marcobottaro Sep 20, 2024
41f243c
Add bannerLinks attribute to Product codec and add BaseProductWithBan…
marcobottaro Sep 23, 2024
2630da2
Move fetchProducts to a dedicated file
marcobottaro Sep 23, 2024
4adc511
Merge branch 'main' into DEV-1928-refactor-product-codec
marcobottaro Sep 23, 2024
f2c4763
Add relationships to Product codec
marcobottaro Sep 23, 2024
e862bda
Add changeset
marcobottaro Sep 23, 2024
6aae6f2
Fix comment
marcobottaro Sep 23, 2024
a415d0f
Merge remote-tracking branch 'origin/main' into DEV-1928-refactor-pro…
marcobottaro Sep 25, 2024
40cc214
Fix linting
marcobottaro Sep 25, 2024
8305590
Add seo to makeStrapiGuidesPopulate
marcobottaro Sep 25, 2024
8cd2b48
Remove unused BaseOverviewAttributesCodec and BaseOverviewCodec
marcobottaro Sep 30, 2024
3be2980
Merge remote-tracking branch 'origin/main' into DEV-1928-refactor-pro…
marcobottaro Oct 1, 2024
f87bff5
data preparation
petros-double-test1 Oct 1, 2024
9eb163e
populate
petros-double-test1 Oct 2, 2024
21a70ee
linter
petros-double-test1 Oct 2, 2024
ce3abff
filter out products not having overview
petros-double-test1 Oct 2, 2024
175e1e9
add populate product to overview
petros-double-test1 Oct 2, 2024
36ab412
dyanmic menu
petros-double-test1 Oct 2, 2024
1a1b0bd
changeset
petros-double-test1 Oct 3, 2024
22b0072
Merge branch 'main' into DEV-1955
tommaso1 Oct 4, 2024
d0a798f
Merge remote-tracking branch 'origin/main' into DEV-1955
petros-double-test1 Oct 8, 2024
a263dba
add tutorial populate to make the build build again
petros-double-test1 Oct 9, 2024
8544d94
fix test
petros-double-test1 Oct 9, 2024
6256049
Merge branch 'main' into DEV-1955
marcobottaro Oct 10, 2024
a8b2e10
cms api refactor
petros-double-test1 Oct 10, 2024
4e3ba2e
update apis
petros-double-test1 Oct 10, 2024
b19b8d8
removing stuff
petros-double-test1 Oct 16, 2024
2181c26
Merge remote-tracking branch 'origin/main' into remove-hardcoded-content
petros-double-test1 Oct 16, 2024
bb6c18b
fix import
petros-double-test1 Oct 16, 2024
e93e9d5
workaround to build
petros-double-test1 Oct 18, 2024
6f9f5c1
changeset
petros-double-test1 Oct 18, 2024
d82e697
remove items
petros-double-test1 Oct 24, 2024
c9b30f4
fix guides
petros-double-test1 Oct 25, 2024
411b1a3
Fix internal guide links
MarcoPonchia Oct 25, 2024
73c59f3
Merge branch 'main' into remove-hardcoded-content
marcobottaro Oct 28, 2024
47e1a57
Fix fetch and make functions
MarcoPonchia Oct 30, 2024
2614619
Update pages and paths
MarcoPonchia Oct 30, 2024
02a2d42
Fix linting
MarcoPonchia Oct 30, 2024
82b40c9
Fix linting
MarcoPonchia Oct 30, 2024
e279af4
Remove homepage and components translations
MarcoPonchia Oct 30, 2024
b6d75b4
remove static url replace map
MarcoPonchia Oct 30, 2024
0da53d6
Fix build
MarcoPonchia Oct 30, 2024
6474324
Fix header
MarcoPonchia Oct 30, 2024
83ff524
remove unused code
MarcoPonchia Oct 30, 2024
3ef817e
remove translation for error page
MarcoPonchia Oct 31, 2024
2486914
remove translation for overview page
MarcoPonchia Oct 31, 2024
c9c6507
remove translation for tutorials page
MarcoPonchia Oct 31, 2024
f6ca030
Move compoanyRoles from content to config
MarcoPonchia Oct 31, 2024
34b1995
remove unused files
MarcoPonchia Oct 31, 2024
710abd9
Refactor product attribute names
MarcoPonchia Oct 31, 2024
41d891d
Merge branch 'main' into remove-hardcoded-content
marcobottaro Nov 5, 2024
b281bd7
Merge remote-tracking branch 'origin/main' into remove-hardcoded-content
MarcoPonchia Nov 13, 2024
d98544a
Remove old changeset
MarcoPonchia Nov 13, 2024
64ec2e4
Fix after review
MarcoPonchia Nov 13, 2024
fc311e0
Fix build
MarcoPonchia Nov 13, 2024
d5e8faf
Fix after review
MarcoPonchia Nov 13, 2024
444b2e3
Fix guide build
MarcoPonchia Nov 13, 2024
2b06423
Merge branch 'main' into remove-hardcoded-content
MarcoPonchia Nov 13, 2024
381a951
Fic deskstop menu
MarcoPonchia Nov 13, 2024
481bb44
Fix after review
MarcoPonchia Nov 14, 2024
82cce94
Fix linting
MarcoPonchia Nov 14, 2024
bba336d
Merge remote-tracking branch 'origin/main' into remove-hardcoded-content
MarcoPonchia Nov 14, 2024
5a9e3d4
remove unused files
MarcoPonchia Nov 14, 2024
b857d0d
Merge branch 'main' into remove-hardcoded-content
marcobottaro Nov 20, 2024
f951876
Merge branch 'main' into remove-hardcoded-content
marcobottaro Nov 22, 2024
939ad23
Update package-lock.json
marcobottaro Nov 22, 2024
0caff8e
Update apps/nextjs-website/src/lib/strapi/makeProps/makeProducts.ts
MarcoPonchia Nov 25, 2024
6e97d02
move makeDocs
MarcoPonchia Nov 25, 2024
112e7c9
Merge branch 'main' into remove-hardcoded-content
marcobottaro Nov 27, 2024
c7bdeb4
Add translations
MarcoPonchia Nov 27, 2024
835ad28
Fix generateStaticParams in tutorials list page
marcobottaro Nov 28, 2024
586d90e
Fix makeProducts
marcobottaro Nov 28, 2024
3d7a552
Merge branch 'main' into remove-hardcoded-content
MarcoPonchia Dec 2, 2024
2ce9041
Fix breadcrumb
MarcoPonchia Dec 2, 2024
e67ee33
Fix quick-start page
MarcoPonchia Dec 2, 2024
7c85e22
Merge branch 'main' into remove-hardcoded-content
MarcoPonchia Dec 2, 2024
de82228
fix package json
MarcoPonchia Dec 2, 2024
252558f
Merge remote-tracking branch 'origin/main' into remove-hardcoded-content
MarcoPonchia Dec 2, 2024
cb6be2f
Fix webinar type
MarcoPonchia Dec 2, 2024
81a831a
Fix relatedLinks
MarcoPonchia Dec 2, 2024
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
5 changes: 5 additions & 0 deletions .changeset/plenty-dolls-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nextjs-website": minor
---

Remove all static content
5 changes: 5 additions & 0 deletions .changeset/sharp-pears-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nextjs-website": minor
---

Filter product based on the presence of the overview data, Product menu depends on strapi configured relations with pages
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { ResolvedMetadata } from 'next';
import { makeMetadata } from '@/helpers/metadata.helpers';
import { translations } from '@/_contents/translations';
import { baseUrl } from '@/config';

const { shared } = translations;
import { baseUrl, websiteName } from '@/config';

const parent = {
title: {
Expand Down Expand Up @@ -171,18 +168,18 @@ it('should return the correct metadata when parent is missing', () => {
});

expect(metadataWithoutParent).toEqual({
title: `${shared.siteTitle} | Title`,
title: `${websiteName} | Title`,
description: 'Description',
url: 'Url',
openGraph: {
title: `${shared.siteTitle} | Title`,
title: `${websiteName} | Title`,
type: 'website',
locale: 'it_IT',
description: 'Description',
images: 'Image',
},
twitter: {
title: `${shared.siteTitle} | Title`,
title: `${websiteName} | Title`,
description: 'Description',
images: 'Image',
card: 'summary',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,8 @@ const product: Product = {
mime: 'image/svg+xml',
url: 'test',
},
path: '/path',
slug: 'path',
subpaths: {
overview: {
name: 'overview',
path: '/path/overview_path',
},
tutorials: {
name: 'tutorials',
path: '/path/tutorial_path',
},
guides: {
name: 'guides',
path: '/guides',
},
},
hasOverviewPage: true,
bannerLinks: [],
};

Expand All @@ -42,15 +28,17 @@ it('should convert product to menu items', () => {
'/path/overview_path',
themeLight
);
expect(menuItems.length).toEqual(3);
const overviewItem = menuItems.find(
({ href }) => href === product.subpaths.overview.path
expect(menuItems.length).toEqual(1);
MarcoPonchia marked this conversation as resolved.
Show resolved Hide resolved
});

it('should not have menu items has no supbath available', () => {
const themeLight = 'light';
const menuItems = productToMenuItems(
{ ...product, hasOverviewPage: false },
'/path/overview_path',
themeLight
);
expect(overviewItem).not.toBeUndefined();
expect(overviewItem?.label).toBe(product.subpaths.overview.name);
expect(overviewItem?.href).toBe(product.subpaths.overview.path);
expect(overviewItem?.active).toBeTruthy();
expect(overviewItem?.theme).toBe(themeLight);
expect(menuItems.length).toEqual(0);
});

it('should return the correct active value', () => {
Expand All @@ -60,15 +48,7 @@ it('should return the correct active value', () => {
'/guides/some-guide/some-guide-version/some-guide-page',
themeLight
);
expect(menuItems.length).toEqual(3);
const overviewItem = menuItems.find(
({ href }) => href === product.subpaths.guides?.path
);
expect(overviewItem).not.toBeUndefined();
expect(overviewItem?.label).toBe(product.subpaths.guides?.name);
expect(overviewItem?.href).toBe(product.subpaths.guides?.path);
expect(overviewItem?.active).toBeTruthy();
expect(overviewItem?.theme).toBe(themeLight);
expect(menuItems.length).toEqual(1);
});

it('should return the correct active value if the subpath.path contains the path', () => {
Expand All @@ -78,11 +58,5 @@ it('should return the correct active value if the subpath.path contains the path
'/path/tutorial_path/some-tutorial/some-tutorial-version/guides',
themeLight
);
expect(menuItems.length).toEqual(3);
const overviewItem = menuItems.find(
({ href }) => href === product.subpaths.guides?.path
);
expect(overviewItem).not.toBeUndefined();
expect(overviewItem?.active).toBeFalsy();
expect(overviewItem?.theme).toBe(themeLight);
expect(menuItems.length).toEqual(1);
});
6 changes: 0 additions & 6 deletions apps/nextjs-website/src/_contents/appIo/apiPath.ts

This file was deleted.

35 changes: 0 additions & 35 deletions apps/nextjs-website/src/_contents/appIo/appIo.ts

This file was deleted.

81 changes: 0 additions & 81 deletions apps/nextjs-website/src/_contents/appIo/bannerLinks.ts

This file was deleted.

140 changes: 0 additions & 140 deletions apps/nextjs-website/src/_contents/appIo/guideLists.ts

This file was deleted.

6 changes: 0 additions & 6 deletions apps/nextjs-website/src/_contents/appIo/guideListsPath.ts

This file was deleted.

Loading
Loading