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

Laboratorio My Day App en Angular 18 #64

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
bb571c3
Update dependencies
Nicolas-Guasch Oct 21, 2024
e4ed147
Package lock
Nicolas-Guasch Oct 21, 2024
675f071
Update angular 16
Nicolas-Guasch Oct 21, 2024
7322abe
Update typescript zone.js
Nicolas-Guasch Oct 21, 2024
2b3d6c0
Update ESLint to 17
Nicolas-Guasch Oct 21, 2024
e25d43a
Update ESLint to 18
Nicolas-Guasch Oct 21, 2024
a46bb0d
Update to Angular 18
Nicolas-Guasch Oct 21, 2024
d4df402
Downgrade Typescript to 5.5
Nicolas-Guasch Oct 21, 2024
f080dce
Merge branch 'master' into angular18
Nicolas-Guasch Oct 21, 2024
68ee8f8
Add model for tasks
Nicolas-Guasch Oct 21, 2024
02539bc
Hide sections when there aren't any tasks
Nicolas-Guasch Oct 21, 2024
fc0eb5e
Add task creation and display
Nicolas-Guasch Oct 21, 2024
de73496
package-lock changes
Nicolas-Guasch Oct 21, 2024
fb0241d
Update dependencies to v16
Nicolas-Guasch Oct 21, 2024
abf6962
Update zone.js, typescript
Nicolas-Guasch Oct 21, 2024
a6563d8
Update to angular 17
Nicolas-Guasch Oct 21, 2024
82dceba
Update ESLint to v18
Nicolas-Guasch Oct 21, 2024
6e727d9
Update to angular 18, component based
Nicolas-Guasch Oct 21, 2024
2303a04
Merge branch 'Working18'
Nicolas-Guasch Oct 21, 2024
2ffafc8
Implement counter, clear completed
Nicolas-Guasch Oct 21, 2024
4137744
Cleanup
Nicolas-Guasch Oct 22, 2024
64d07c4
Implement completed checkbox, edition, deletion
Nicolas-Guasch Oct 22, 2024
54386bb
Fix persistence test case error
Nicolas-Guasch Oct 22, 2024
8944a45
Implement filters via routing
Nicolas-Guasch Oct 22, 2024
c9fb6a1
Include final deployment
Nicolas-Guasch Oct 22, 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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# Compiled output
/dist
/tmp
/out-tsc
/bazel-out
Expand Down
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"overrides": [
{
"files": "*.html",
"options": {
"parser": "angular"
}
}
]
}
22 changes: 12 additions & 10 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist/myapp",
"outputPath": {
"base": "dist/myapp"
},
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"src/polyfills.ts"
],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
Expand All @@ -29,7 +32,8 @@
"styles": [
"src/styles.css"
],
"scripts": []
"scripts": [],
"browser": "src/main.ts"
},
"configurations": {
"production": {
Expand All @@ -54,9 +58,7 @@
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
Expand All @@ -68,18 +70,18 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "myapp:build:production"
"buildTarget": "myapp:build:production"
},
"development": {
"browserTarget": "myapp:build:development"
"buildTarget": "myapp:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "myapp:build"
"buildTarget": "myapp:build"
}
},
"test": {
Expand Down
355 changes: 355 additions & 0 deletions dist/myapp/3rdpartylicenses.txt

Large diffs are not rendered by default.

Binary file added dist/myapp/browser/favicon.ico
Binary file not shown.
16 changes: 16 additions & 0 deletions dist/myapp/browser/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en" data-critters-container>
<head>
<meta charset="utf-8">
<title>MyDayApp - Angular</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<style>@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Mu72xKOzY.woff2) format('woff2');unicode-range:U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Mu5mxKOzY.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Mu7mxKOzY.woff2) format('woff2');unicode-range:U+1F00-1FFF;}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Mu4WxKOzY.woff2) format('woff2');unicode-range:U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Mu7WxKOzY.woff2) format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Mu7GxKOzY.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}</style>
<style>html,body{margin:0;padding:0}body{font-family:Roboto,sans-serif;background:#f5f5f5;color:#111;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:300}</style><link rel="stylesheet" href="styles-UQVIBVNI.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-UQVIBVNI.css"></noscript></head>
<body>
<app-root></app-root>
<script src="polyfills-EONH2QZO.js" type="module"></script><script src="main-BNHSQBU7.js" type="module"></script></body>
</html>
7 changes: 7 additions & 0 deletions dist/myapp/browser/main-BNHSQBU7.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/myapp/browser/polyfills-EONH2QZO.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/myapp/browser/styles-UQVIBVNI.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions e2e/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ test.describe('Clear completed button', () => {
test('should display the correct text', async ({ page }) => {
await page.locator('.todo-list li .toggle').first().check();
await expect(page.locator('.clear-completed')).toHaveText(
'Clear completed'
'Clear completed',
);
});

Expand Down Expand Up @@ -225,7 +225,7 @@ test.describe('Persistence', () => {
await expect(todoItems).toHaveClass(['completed', '']);

// Ensure there is 1 completed item.
checkNumberOfCompletedTodosInLocalStorage(page, 1);
await checkNumberOfCompletedTodosInLocalStorage(page, 1);

// Now reload.
await page.reload();
Expand Down Expand Up @@ -299,12 +299,12 @@ test.describe('Routing', () => {
await page.locator('.filters >> text=Pending').click();
// Page change - active items.
await expect(page.locator('.filters >> text=Pending')).toHaveClass(
'selected'
'selected',
);
await page.locator('.filters >> text=Completed').click();
// Page change - completed items.
await expect(page.locator('.filters >> text=Completed')).toHaveClass(
'selected'
'selected',
);
});
});
Expand All @@ -324,12 +324,12 @@ async function checkNumberOfTodosInLocalStorage(page: Page, expected: number) {

async function checkNumberOfCompletedTodosInLocalStorage(
page: Page,
expected: number
expected: number,
) {
return await page.waitForFunction((e) => {
return (
JSON.parse(localStorage['mydayapp-angular']).filter(
(todo: any) => todo.completed
(todo: any) => todo.completed,
).length === e
);
}, expected);
Expand Down
Loading