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-1972] Remove hardcoded content #1196

Open
wants to merge 52 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
52 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
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/quiet-foxes-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nextjs-website": patch
---

Add the bannerLinks attribute to the product codec and refactor its relationships
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
Expand Up @@ -16,22 +16,7 @@ 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',
},
},
bannerLinks: [],
};

Expand All @@ -42,15 +27,7 @@ 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(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(1);
});

it('should return the correct active value', () => {
Expand All @@ -60,15 +37,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 +47,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