From 9caa73df572badc9833b84e4bb68558bf8de13b4 Mon Sep 17 00:00:00 2001 From: kabrunko-dev Date: Sun, 14 Apr 2024 10:22:23 -0300 Subject: [PATCH 01/15] docs(pt): translate challenge 16 --- .../content/docs/challenges/angular/16-di.md | 4 +-- .../docs/es/challenges/angular/16-di.md | 2 +- .../docs/pt/challenges/angular/16-di.md | 29 +++++++++++++++++++ 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 docs/src/content/docs/pt/challenges/angular/16-di.md diff --git a/docs/src/content/docs/challenges/angular/16-di.md b/docs/src/content/docs/challenges/angular/16-di.md index 35bb1bc68..623b73520 100644 --- a/docs/src/content/docs/challenges/angular/16-di.md +++ b/docs/src/content/docs/challenges/angular/16-di.md @@ -1,6 +1,6 @@ --- title: 🔴 Master Dependancy Injection -description: Challenge 16 is about masjering how dependancy injection works +description: Challenge 16 is about mastering how dependancy injection works author: thomas-laforge contributors: - tomalaforge @@ -23,7 +23,7 @@ One way to achieve this is by adding a second argument to the pipe, but this is - Your task is to display the correct currency for each row. -## Constraints: +## Constraints - You cannot modify the pipe. - You cannot wrap the row inside a component, as this will break the layout. diff --git a/docs/src/content/docs/es/challenges/angular/16-di.md b/docs/src/content/docs/es/challenges/angular/16-di.md index 5f2482efe..d2a3b59bb 100644 --- a/docs/src/content/docs/es/challenges/angular/16-di.md +++ b/docs/src/content/docs/es/challenges/angular/16-di.md @@ -22,7 +22,7 @@ Una forma de lograr esto es agregando un segundo argumento al pipe, pero esto no - Tu tarea es mostrar la moneda correcta para cada fila. -## Restricciones: +## Restricciones - No puedes modificar el pipe. - No puedes envolver la fila dentro de un componente, ya que esto rompería el diseño. diff --git a/docs/src/content/docs/pt/challenges/angular/16-di.md b/docs/src/content/docs/pt/challenges/angular/16-di.md new file mode 100644 index 000000000..9f9b5f18c --- /dev/null +++ b/docs/src/content/docs/pt/challenges/angular/16-di.md @@ -0,0 +1,29 @@ +--- +title: 🔴 Dominando Injeção de Dependência +description: Desafio 16 é sobre dominar como injeção de dependência funciona +author: thomas-laforge +contributors: + - tomalaforge + - tomer953 +challengeNumber: 16 +command: angular-di +sidebar: + order: 203 +--- + +## Informação + +Para completar este desafio com sucesso, precisaremos ter um bom entendimento de como Injeção de Dependência funciona dentro do Angular. + +O objetivo é providenciar o `CurrencyService` no nível de linha, para que cada linha ilustre a moeda correta. Atualmente, `CurrencyService` é providenciado apenas em nível de tabela, o que resulta em um erro que mostrar a mesma moeda para cada linha, apesar de cada produto ter uma moeda diferente. + +Uma maneira de alcançar isso é adicionando um segundo argumento para o pipe, mas isso não é permitido para este desafio. + +## Declaração + +- Sua tarefa é mostrar a moeda correta para cada linha. + +## Restrições + +- Você não pode modificar o pipe. +- Você não pode envolver a linha dentro de um componente, uma vez que isso quebrará o layout. From b07fddb3ef4ef04d433a969e8a40e9ca28c83194 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Thu, 18 Apr 2024 07:33:04 +0000 Subject: [PATCH 02/15] docs: update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 82d47ca1d..8a7412c7b 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,9 @@ Check [all 48 challenges](https://angular-challenges.vercel.app/) Лапин Андрей (Lapin Andrey)
Лапин Андрей (Lapin Andrey)

🇷🇺 Dinar Shagaliev
Dinar Shagaliev

🇷🇺 + + Timothy Alcaide
Timothy Alcaide

📖 + From bc293cde656f0f9d35ba61212ff912e1e7e6b05b Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Thu, 18 Apr 2024 07:33:05 +0000 Subject: [PATCH 03/15] docs: update .all-contributorsrc --- .all-contributorsrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index 0079dd719..837bd6ce1 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -240,6 +240,15 @@ "contributions": [ "translation-ru" ] + }, + { + "login": "alcaidio", + "name": "Timothy Alcaide", + "avatar_url": "https://avatars.githubusercontent.com/u/17033036?v=4", + "profile": "https://twitter.com/alcaidio", + "contributions": [ + "doc" + ] } ], "contributorsPerLine": 7, From 6ada4ecc4bc5d8033b7d868fe2e45a47c8b501f3 Mon Sep 17 00:00:00 2001 From: thomas Date: Thu, 18 Apr 2024 09:35:04 +0200 Subject: [PATCH 04/15] fix: contribution --- .all-contributorsrc | 18 +++++++++--------- README.md | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 837bd6ce1..08b16a7f1 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -100,6 +100,15 @@ "challenge" ] }, + { + "login": "alcaidio", + "name": "Timothy Alcaide", + "avatar_url": "https://avatars.githubusercontent.com/u/17033036?v=4", + "profile": "https://twitter.com/alcaidio", + "contributions": [ + "challenge" + ] + }, { "login": "alan-bio", "name": "Alan Dragicevich", @@ -240,15 +249,6 @@ "contributions": [ "translation-ru" ] - }, - { - "login": "alcaidio", - "name": "Timothy Alcaide", - "avatar_url": "https://avatars.githubusercontent.com/u/17033036?v=4", - "profile": "https://twitter.com/alcaidio", - "contributions": [ - "doc" - ] } ], "contributorsPerLine": 7, diff --git a/README.md b/README.md index 8a7412c7b..5e32386ff 100644 --- a/README.md +++ b/README.md @@ -40,28 +40,28 @@ Check [all 48 challenges](https://angular-challenges.vercel.app/) Devesh Chaudhari
Devesh Chaudhari

💻 🐛 🧩 stillst
stillst

🧩 🇷🇺 Wandrille
Wandrille

🧩 - Alan Dragicevich
Alan Dragicevich

📖 + Timothy Alcaide
Timothy Alcaide

🧩 + Alan Dragicevich
Alan Dragicevich

📖 Michel EDIGHOFFER
Michel EDIGHOFFER

📖 Gerardo Sebastian Gonzalez
Gerardo Sebastian Gonzalez

📖 Evseev Yuriy
Evseev Yuriy

🐛 Tomer953
Tomer953

🐛 📖 💻 Dmitriy Mishchenko
Dmitriy Mishchenko

📖 Sagar Devkota
Sagar Devkota

📖 💻 - Nelson Gutierrez
Nelson Gutierrez

🇪🇸 + Nelson Gutierrez
Nelson Gutierrez

🇪🇸 Hossain K. M.
Hossain K. M.

📖 Diogo Nishikawa
Diogo Nishikawa

💻 🇵🇹 📖 Erick Rodriguez
Erick Rodriguez

🇪🇸 Eduardo Roth
Eduardo Roth

📖 🇪🇸 Fernando Bello
Fernando Bello

📖 Лапин Андрей (Lapin Andrey)
Лапин Андрей (Lapin Andrey)

🇷🇺 - Dinar Shagaliev
Dinar Shagaliev

🇷🇺 - Timothy Alcaide
Timothy Alcaide

📖 + Dinar Shagaliev
Dinar Shagaliev

🇷🇺 @@ -84,6 +84,6 @@ Contributions of any kind are welcome. If I have forgotten to add you as a contributor, please reach out to me. 🙏 -## Licensev +## License MIT From b13eafc471b9119a7af49df5b9a000fa602655a6 Mon Sep 17 00:00:00 2001 From: thomas Date: Thu, 18 Apr 2024 09:38:21 +0200 Subject: [PATCH 05/15] fix: actions --- .github/github-action/index.js | 7 +------ .github/workflows/label-issue.yml | 1 + 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/github-action/index.js b/.github/github-action/index.js index 91e62abd2..a35a2cb36 100644 --- a/.github/github-action/index.js +++ b/.github/github-action/index.js @@ -5,12 +5,7 @@ const { contributors } = require('./contributors'); async function run() { try { const title = github.context.payload.pull_request.title; - const labels = []; - - if(!title.startsWith('Answer:')) { - return; - } - labels.push('answer'); + const labels = ['answer']; const match = title.match(/Answer:\s*(\d+)/); if (match) { diff --git a/.github/workflows/label-issue.yml b/.github/workflows/label-issue.yml index 5c1aaf006..37614eafc 100644 --- a/.github/workflows/label-issue.yml +++ b/.github/workflows/label-issue.yml @@ -7,6 +7,7 @@ on: jobs: add_supporters: runs-on: ubuntu-latest + if: ${{ startsWith(github.event.pull_request.title, 'Answer') }} steps: - name: checkout uses: actions/checkout@v2 From f82c079e784de108074c23966d5ed5b3068bc1a0 Mon Sep 17 00:00:00 2001 From: kabrunko-dev Date: Thu, 18 Apr 2024 08:24:23 -0300 Subject: [PATCH 06/15] docs(pt): update challenge 16 contributors --- docs/src/content/docs/challenges/angular/16-di.md | 1 + docs/src/content/docs/pt/challenges/angular/16-di.md | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/content/docs/challenges/angular/16-di.md b/docs/src/content/docs/challenges/angular/16-di.md index 623b73520..97f62b05d 100644 --- a/docs/src/content/docs/challenges/angular/16-di.md +++ b/docs/src/content/docs/challenges/angular/16-di.md @@ -5,6 +5,7 @@ author: thomas-laforge contributors: - tomalaforge - tomer953 + - kabrunko-dev challengeNumber: 16 command: angular-di sidebar: diff --git a/docs/src/content/docs/pt/challenges/angular/16-di.md b/docs/src/content/docs/pt/challenges/angular/16-di.md index 9f9b5f18c..88147980b 100644 --- a/docs/src/content/docs/pt/challenges/angular/16-di.md +++ b/docs/src/content/docs/pt/challenges/angular/16-di.md @@ -3,8 +3,7 @@ title: 🔴 Dominando Injeção de Dependência description: Desafio 16 é sobre dominar como injeção de dependência funciona author: thomas-laforge contributors: - - tomalaforge - - tomer953 + - kabrunko-dev challengeNumber: 16 command: angular-di sidebar: From 97026895f08f4c7b0579c39baab329e441e79516 Mon Sep 17 00:00:00 2001 From: Sven Brodny Date: Thu, 18 Apr 2024 14:55:53 +0200 Subject: [PATCH 07/15] fix(challenge 48): challenge naming --- .../.eslintrc.json | 0 .../README.md | 4 +-- .../project.json | 24 +++++++++--------- .../src/app/app.component.ts | 0 .../src/app/app.config.ts | 0 .../src/app/app.routes.ts | 0 .../src/app/pages/join.component.ts | 0 .../src/app/pages/page.component.ts | 0 .../src/app/ui/dialog.component.ts | 0 .../src/app/ui/form.component.ts | 0 .../src/app/ui/nav.component.ts | 0 .../src/assets/.gitkeep | 0 .../src/favicon.ico | Bin .../src/index.html | 2 +- .../src/main.ts | 0 .../src/styles.scss | 0 .../tailwind.config.js | 0 .../tsconfig.app.json | 0 .../tsconfig.editor.json | 0 .../tsconfig.json | 0 ...t-form.md => 48-avoid-losing-form-data.md} | 2 +- docs/src/content/docs/es/index.mdx | 2 +- docs/src/content/docs/fr/index.mdx | 2 +- docs/src/content/docs/index.mdx | 2 +- docs/src/content/docs/pt/index.mdx | 2 +- docs/src/content/docs/ru/index.mdx | 2 +- 26 files changed, 21 insertions(+), 21 deletions(-) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/.eslintrc.json (100%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/README.md (66%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/project.json (65%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/src/app/app.component.ts (100%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/src/app/app.config.ts (100%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/src/app/app.routes.ts (100%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/src/app/pages/join.component.ts (100%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/src/app/pages/page.component.ts (100%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/src/app/ui/dialog.component.ts (100%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/src/app/ui/form.component.ts (100%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/src/app/ui/nav.component.ts (100%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/src/assets/.gitkeep (100%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/src/favicon.ico (100%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/src/index.html (87%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/src/main.ts (100%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/src/styles.scss (100%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/tailwind.config.js (100%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/tsconfig.app.json (100%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/tsconfig.editor.json (100%) rename apps/forms/{form-dialog-alert => avoid-losing-form-data}/tsconfig.json (100%) rename docs/src/content/docs/challenges/forms/{48-dialog-alert-form.md => 48-avoid-losing-form-data.md} (98%) diff --git a/apps/forms/form-dialog-alert/.eslintrc.json b/apps/forms/avoid-losing-form-data/.eslintrc.json similarity index 100% rename from apps/forms/form-dialog-alert/.eslintrc.json rename to apps/forms/avoid-losing-form-data/.eslintrc.json diff --git a/apps/forms/form-dialog-alert/README.md b/apps/forms/avoid-losing-form-data/README.md similarity index 66% rename from apps/forms/form-dialog-alert/README.md rename to apps/forms/avoid-losing-form-data/README.md index 93f4070b1..9a3d0acae 100644 --- a/apps/forms/form-dialog-alert/README.md +++ b/apps/forms/avoid-losing-form-data/README.md @@ -5,7 +5,7 @@ ### Run Application ```bash -npx nx serve form-dialog-alert +npx nx serve avoid-losing-form-data ``` -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/forms/48-form-dialog-alert/). +Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/forms/48-avoid-losing-form-data/). diff --git a/apps/forms/form-dialog-alert/project.json b/apps/forms/avoid-losing-form-data/project.json similarity index 65% rename from apps/forms/form-dialog-alert/project.json rename to apps/forms/avoid-losing-form-data/project.json index 24a5d4f45..f052ceb65 100644 --- a/apps/forms/form-dialog-alert/project.json +++ b/apps/forms/avoid-losing-form-data/project.json @@ -1,26 +1,26 @@ { - "name": "form-dialog-alert", + "name": "avoid-losing-form-data", "$schema": "../../../node_modules/nx/schemas/project-schema.json", "projectType": "application", "prefix": "app", - "sourceRoot": "apps/forms/form-dialog-alert/src", + "sourceRoot": "apps/forms/avoid-losing-form-data/src", "tags": [], "targets": { "build": { "executor": "@angular-devkit/build-angular:application", "outputs": ["{options.outputPath}"], "options": { - "outputPath": "dist/apps/forms/form-dialog-alert", - "index": "apps/forms/form-dialog-alert/src/index.html", - "browser": "apps/forms/form-dialog-alert/src/main.ts", + "outputPath": "dist/apps/forms/avoid-losing-form-data", + "index": "apps/forms/avoid-losing-form-data/src/index.html", + "browser": "apps/forms/avoid-losing-form-data/src/main.ts", "polyfills": ["zone.js"], - "tsConfig": "apps/forms/form-dialog-alert/tsconfig.app.json", + "tsConfig": "apps/forms/avoid-losing-form-data/tsconfig.app.json", "inlineStyleLanguage": "scss", "assets": [ - "apps/forms/form-dialog-alert/src/favicon.ico", - "apps/forms/form-dialog-alert/src/assets" + "apps/forms/avoid-losing-form-data/src/favicon.ico", + "apps/forms/avoid-losing-form-data/src/assets" ], - "styles": ["apps/forms/form-dialog-alert/src/styles.scss"], + "styles": ["apps/forms/avoid-losing-form-data/src/styles.scss"], "scripts": [] }, "configurations": { @@ -51,10 +51,10 @@ "executor": "@angular-devkit/build-angular:dev-server", "configurations": { "production": { - "buildTarget": "form-dialog-alert:build:production" + "buildTarget": "avoid-losing-form-data:build:production" }, "development": { - "buildTarget": "form-dialog-alert:build:development" + "buildTarget": "avoid-losing-form-data:build:development" } }, "defaultConfiguration": "development" @@ -62,7 +62,7 @@ "extract-i18n": { "executor": "@angular-devkit/build-angular:extract-i18n", "options": { - "buildTarget": "form-dialog-alert:build" + "buildTarget": "avoid-losing-form-data:build" } }, "lint": { diff --git a/apps/forms/form-dialog-alert/src/app/app.component.ts b/apps/forms/avoid-losing-form-data/src/app/app.component.ts similarity index 100% rename from apps/forms/form-dialog-alert/src/app/app.component.ts rename to apps/forms/avoid-losing-form-data/src/app/app.component.ts diff --git a/apps/forms/form-dialog-alert/src/app/app.config.ts b/apps/forms/avoid-losing-form-data/src/app/app.config.ts similarity index 100% rename from apps/forms/form-dialog-alert/src/app/app.config.ts rename to apps/forms/avoid-losing-form-data/src/app/app.config.ts diff --git a/apps/forms/form-dialog-alert/src/app/app.routes.ts b/apps/forms/avoid-losing-form-data/src/app/app.routes.ts similarity index 100% rename from apps/forms/form-dialog-alert/src/app/app.routes.ts rename to apps/forms/avoid-losing-form-data/src/app/app.routes.ts diff --git a/apps/forms/form-dialog-alert/src/app/pages/join.component.ts b/apps/forms/avoid-losing-form-data/src/app/pages/join.component.ts similarity index 100% rename from apps/forms/form-dialog-alert/src/app/pages/join.component.ts rename to apps/forms/avoid-losing-form-data/src/app/pages/join.component.ts diff --git a/apps/forms/form-dialog-alert/src/app/pages/page.component.ts b/apps/forms/avoid-losing-form-data/src/app/pages/page.component.ts similarity index 100% rename from apps/forms/form-dialog-alert/src/app/pages/page.component.ts rename to apps/forms/avoid-losing-form-data/src/app/pages/page.component.ts diff --git a/apps/forms/form-dialog-alert/src/app/ui/dialog.component.ts b/apps/forms/avoid-losing-form-data/src/app/ui/dialog.component.ts similarity index 100% rename from apps/forms/form-dialog-alert/src/app/ui/dialog.component.ts rename to apps/forms/avoid-losing-form-data/src/app/ui/dialog.component.ts diff --git a/apps/forms/form-dialog-alert/src/app/ui/form.component.ts b/apps/forms/avoid-losing-form-data/src/app/ui/form.component.ts similarity index 100% rename from apps/forms/form-dialog-alert/src/app/ui/form.component.ts rename to apps/forms/avoid-losing-form-data/src/app/ui/form.component.ts diff --git a/apps/forms/form-dialog-alert/src/app/ui/nav.component.ts b/apps/forms/avoid-losing-form-data/src/app/ui/nav.component.ts similarity index 100% rename from apps/forms/form-dialog-alert/src/app/ui/nav.component.ts rename to apps/forms/avoid-losing-form-data/src/app/ui/nav.component.ts diff --git a/apps/forms/form-dialog-alert/src/assets/.gitkeep b/apps/forms/avoid-losing-form-data/src/assets/.gitkeep similarity index 100% rename from apps/forms/form-dialog-alert/src/assets/.gitkeep rename to apps/forms/avoid-losing-form-data/src/assets/.gitkeep diff --git a/apps/forms/form-dialog-alert/src/favicon.ico b/apps/forms/avoid-losing-form-data/src/favicon.ico similarity index 100% rename from apps/forms/form-dialog-alert/src/favicon.ico rename to apps/forms/avoid-losing-form-data/src/favicon.ico diff --git a/apps/forms/form-dialog-alert/src/index.html b/apps/forms/avoid-losing-form-data/src/index.html similarity index 87% rename from apps/forms/form-dialog-alert/src/index.html rename to apps/forms/avoid-losing-form-data/src/index.html index 233e131ea..9305b4a43 100644 --- a/apps/forms/form-dialog-alert/src/index.html +++ b/apps/forms/avoid-losing-form-data/src/index.html @@ -2,7 +2,7 @@ - form-dialog-alert + avoid-losing-form-data diff --git a/apps/forms/form-dialog-alert/src/main.ts b/apps/forms/avoid-losing-form-data/src/main.ts similarity index 100% rename from apps/forms/form-dialog-alert/src/main.ts rename to apps/forms/avoid-losing-form-data/src/main.ts diff --git a/apps/forms/form-dialog-alert/src/styles.scss b/apps/forms/avoid-losing-form-data/src/styles.scss similarity index 100% rename from apps/forms/form-dialog-alert/src/styles.scss rename to apps/forms/avoid-losing-form-data/src/styles.scss diff --git a/apps/forms/form-dialog-alert/tailwind.config.js b/apps/forms/avoid-losing-form-data/tailwind.config.js similarity index 100% rename from apps/forms/form-dialog-alert/tailwind.config.js rename to apps/forms/avoid-losing-form-data/tailwind.config.js diff --git a/apps/forms/form-dialog-alert/tsconfig.app.json b/apps/forms/avoid-losing-form-data/tsconfig.app.json similarity index 100% rename from apps/forms/form-dialog-alert/tsconfig.app.json rename to apps/forms/avoid-losing-form-data/tsconfig.app.json diff --git a/apps/forms/form-dialog-alert/tsconfig.editor.json b/apps/forms/avoid-losing-form-data/tsconfig.editor.json similarity index 100% rename from apps/forms/form-dialog-alert/tsconfig.editor.json rename to apps/forms/avoid-losing-form-data/tsconfig.editor.json diff --git a/apps/forms/form-dialog-alert/tsconfig.json b/apps/forms/avoid-losing-form-data/tsconfig.json similarity index 100% rename from apps/forms/form-dialog-alert/tsconfig.json rename to apps/forms/avoid-losing-form-data/tsconfig.json diff --git a/docs/src/content/docs/challenges/forms/48-dialog-alert-form.md b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md similarity index 98% rename from docs/src/content/docs/challenges/forms/48-dialog-alert-form.md rename to docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md index 0dece74f0..7ab8ad123 100644 --- a/docs/src/content/docs/challenges/forms/48-dialog-alert-form.md +++ b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md @@ -5,7 +5,7 @@ author: timothy-alcaide contributors: - alcaidio challengeNumber: 48 -command: form-dialog-alert +command: avoid-losing-form-data sidebar: order: 121 badge: New diff --git a/docs/src/content/docs/es/index.mdx b/docs/src/content/docs/es/index.mdx index f730cdc4d..5a3b1bec7 100644 --- a/docs/src/content/docs/es/index.mdx +++ b/docs/src/content/docs/es/index.mdx @@ -13,7 +13,7 @@ hero: icon: right-arrow variant: primary - text: Ir al Desafío más reciente - link: /es/challenges/forms/48-dialog-alert-form/ + link: /es/challenges/forms/48-avoid-losing-form-data/ icon: rocket - text: Dar una estrella link: https://github.com/tomalaforge/angular-challenges diff --git a/docs/src/content/docs/fr/index.mdx b/docs/src/content/docs/fr/index.mdx index 3cf67fd7e..0c796f809 100644 --- a/docs/src/content/docs/fr/index.mdx +++ b/docs/src/content/docs/fr/index.mdx @@ -13,7 +13,7 @@ hero: icon: right-arrow variant: primary - text: Aller au dernier Challenge - link: /fr/challenges/forms/48-dialog-alert-form/ + link: /fr/challenges/forms/48-avoid-losing-form-data/ icon: rocket - text: Donne une étoile link: https://github.com/tomalaforge/angular-challenges diff --git a/docs/src/content/docs/index.mdx b/docs/src/content/docs/index.mdx index 95c706897..4a6202f23 100644 --- a/docs/src/content/docs/index.mdx +++ b/docs/src/content/docs/index.mdx @@ -13,7 +13,7 @@ hero: icon: right-arrow variant: primary - text: Go to the latest Challenge - link: /challenges/forms/48-dialog-alert-form/ + link: /challenges/forms/48-avoid-losing-form-data/ icon: rocket - text: Give a star link: https://github.com/tomalaforge/angular-challenges diff --git a/docs/src/content/docs/pt/index.mdx b/docs/src/content/docs/pt/index.mdx index d71b7e5ec..b963d02e4 100644 --- a/docs/src/content/docs/pt/index.mdx +++ b/docs/src/content/docs/pt/index.mdx @@ -13,7 +13,7 @@ hero: icon: right-arrow variant: primary - text: Ir para o desafio mais recente - link: /pt/challenges/forms/48-dialog-alert-form/ + link: /pt/challenges/forms/48-avoid-losing-form-data/ icon: rocket - text: Dar uma estrela link: https://github.com/tomalaforge/angular-challenges diff --git a/docs/src/content/docs/ru/index.mdx b/docs/src/content/docs/ru/index.mdx index ff3233c46..8d06e1eb0 100644 --- a/docs/src/content/docs/ru/index.mdx +++ b/docs/src/content/docs/ru/index.mdx @@ -13,7 +13,7 @@ hero: icon: right-arrow variant: primary - text: Перейти к последней задаче - link: /ru/challenges/forms/48-dialog-alert-form/ + link: /ru/challenges/forms/48-avoid-losing-form-data/ icon: rocket - text: Добавить звезду link: https://github.com/tomalaforge/angular-challenges From 72ef2ccd24705b21882d054a9968c08896745801 Mon Sep 17 00:00:00 2001 From: Sven Brodny Date: Thu, 18 Apr 2024 14:57:08 +0200 Subject: [PATCH 08/15] fix(c-48): contributors --- .../forms/48-avoid-losing-form-data.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md diff --git a/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md new file mode 100644 index 000000000..cf5dfd0c2 --- /dev/null +++ b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md @@ -0,0 +1,42 @@ +--- +title: 🟠 Avoid losing form data +description: Challenge 48 is about Bob 🧙‍♂️ the product owner, he wants to develop a new feature in response to customer complaints about losing form input information. +author: timothy-alcaide +contributors: + - alcaidio + - svenson95 +challengeNumber: 48 +command: avoid-losing-form-data +sidebar: + order: 121 + badge: New +--- + +## Context + +As a member of the development team, you need to address a specific request from the product owner, 🧙‍♂️ Bob. He wants to develop a new feature in response to customer complaints about losing form input information. + +## User Story + +Here's the feature expressed as a user story (functional expectation) : + +"As a user, I would like to have an alert dialog box that appears when I attempt to navigate away from the /form page after I have started entering information into the form." + +## Acceptance Criteria + +1. On the /form page: + +- If the input text has been pre-filled, then an alert dialog box opens. +- Otherwise, the user navigates normally. + +2. The content of `dialog.component.ts` must be use for your dialog box content. +3. The appearance and behavior of the alert dialog box must comply with W3C conventions, see [alert dialog pattern](https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/). +4. Maximize the use of the new concepts and syntax in the latest version of Angular. + +
+ Tips 🤫 (if you really need it and after careful consideration) +
    +
  • Use the Material CDK Dialog or Overlay - https://material.angular.io/cdk/ (dont forget to add @import '@angular/cdk/overlay-prebuilt.css' in style.sccss)
  • +
  • Use the CanDeactivate guard - https://angular.io/api/router/CanDeactivate (use new functionnal approach).
  • +
+
From cfc71a8c107a5bfe0e73f5f47f5117e9e4b99ea2 Mon Sep 17 00:00:00 2001 From: Sven Brodny Date: Thu, 18 Apr 2024 15:30:13 +0200 Subject: [PATCH 09/15] fix(c-48): contributors --- .../content/docs/challenges/forms/48-avoid-losing-form-data.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md index 7ab8ad123..cf5dfd0c2 100644 --- a/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md +++ b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md @@ -4,6 +4,7 @@ description: Challenge 48 is about Bob 🧙‍♂️ the product owner, he wants author: timothy-alcaide contributors: - alcaidio + - svenson95 challengeNumber: 48 command: avoid-losing-form-data sidebar: From bad35ac72f3fb08713715a1f6c677dcc2645331a Mon Sep 17 00:00:00 2001 From: Sven Brodny Date: Fri, 19 Apr 2024 01:27:26 +0200 Subject: [PATCH 10/15] docs(c48): update docs content --- .../forms/48-avoid-losing-form-data.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md index cf5dfd0c2..174befe7d 100644 --- a/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md +++ b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md @@ -18,25 +18,24 @@ As a member of the development team, you need to address a specific request from ## User Story -Here's the feature expressed as a user story (functional expectation) : +Here's the feature expressed as a user story with a functional expectation: -"As a user, I would like to have an alert dialog box that appears when I attempt to navigate away from the /form page after I have started entering information into the form." +> As a user, I would like to have an alert dialog box that appears when +> I attempt to navigate away from the page, after I have started +> entering information into the form. ## Acceptance Criteria -1. On the /form page: +1. If one of the form fields is not empty and the user tries to navigate to a different route or page, or wants to reload the page, show an alert dialog to _avoid losing form data_. -- If the input text has been pre-filled, then an alert dialog box opens. -- Otherwise, the user navigates normally. - -2. The content of `dialog.component.ts` must be use for your dialog box content. +2. The content of `dialog.component.ts` must be used for your alert. 3. The appearance and behavior of the alert dialog box must comply with W3C conventions, see [alert dialog pattern](https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/). 4. Maximize the use of the new concepts and syntax in the latest version of Angular.
Tips 🤫 (if you really need it and after careful consideration)
    -
  • Use the Material CDK Dialog or Overlay - https://material.angular.io/cdk/ (dont forget to add @import '@angular/cdk/overlay-prebuilt.css' in style.sccss)
  • -
  • Use the CanDeactivate guard - https://angular.io/api/router/CanDeactivate (use new functionnal approach).
  • +
  • Use the Material CDK Dialog or Overlay - https://material.angular.io/cdk/ (dont forget to add `@import '@angular/cdk/overlay-prebuilt.css'` in `styles.scss`)
  • +
  • Use the `CanDeactivate` guard - https://angular.io/api/router/CanDeactivate in the new functional approach.
From 322ea9a9aaac78cdac0cfa5162d3b5440198d4cb Mon Sep 17 00:00:00 2001 From: Sven Brodny Date: Fri, 19 Apr 2024 01:38:14 +0200 Subject: [PATCH 11/15] docs(c48): fix tips styling --- .../docs/challenges/forms/48-avoid-losing-form-data.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md index 174befe7d..d48f7f82f 100644 --- a/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md +++ b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md @@ -35,7 +35,7 @@ Here's the feature expressed as a user story with a functional expectation:
Tips 🤫 (if you really need it and after careful consideration)
    -
  • Use the Material CDK Dialog or Overlay - https://material.angular.io/cdk/ (dont forget to add `@import '@angular/cdk/overlay-prebuilt.css'` in `styles.scss`)
  • -
  • Use the `CanDeactivate` guard - https://angular.io/api/router/CanDeactivate in the new functional approach.
  • +
  • Use the [Material CDK](https://material.angular.io/cdk/) Dialog or Overlay - dont forget to add @import '@angular/cdk/overlay-prebuilt.css' in styles.scss
  • +
  • Use the [CanDeactivate](https://angular.io/api/router/CanDeactivate) guard in the new functional approach.
From 74c4b104a596988cad3c55cfbf28fb8564287bfa Mon Sep 17 00:00:00 2001 From: Sven Brodny Date: Fri, 19 Apr 2024 01:47:36 +0200 Subject: [PATCH 12/15] docs(c48): refactor --- .../docs/challenges/forms/48-avoid-losing-form-data.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md index d48f7f82f..0636dc992 100644 --- a/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md +++ b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md @@ -29,13 +29,13 @@ Here's the feature expressed as a user story with a functional expectation: 1. If one of the form fields is not empty and the user tries to navigate to a different route or page, or wants to reload the page, show an alert dialog to _avoid losing form data_. 2. The content of `dialog.component.ts` must be used for your alert. -3. The appearance and behavior of the alert dialog box must comply with W3C conventions, see [alert dialog pattern](https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/). +3. The appearance and behavior of the alert dialog must comply with W3C conventions, see [alert dialog pattern](https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/). 4. Maximize the use of the new concepts and syntax in the latest version of Angular.
- Tips 🤫 (if you really need it and after careful consideration) + Tips 🤫 if you really need it and after careful consideration ...
    -
  • Use the [Material CDK](https://material.angular.io/cdk/) Dialog or Overlay - dont forget to add @import '@angular/cdk/overlay-prebuilt.css' in styles.scss
  • -
  • Use the [CanDeactivate](https://angular.io/api/router/CanDeactivate) guard in the new functional approach.
  • + * Use the [Material CDK](https://material.angular.io/cdk/) Dialog or Overlay - dont forget to add `@import '@angular/cdk/overlay-prebuilt.css'` in `styles.scss`. + * Use the [CanDeactivate](https://angular.io/api/router/CanDeactivate) guard in the new functional approach.
From 9f36fc17a537a826709c03d57648ea9240664ee1 Mon Sep 17 00:00:00 2001 From: Sven Brodny Date: Fri, 19 Apr 2024 01:47:52 +0200 Subject: [PATCH 13/15] docs(c48): refactor (2) --- .../content/docs/challenges/forms/48-avoid-losing-form-data.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md index 0636dc992..d2c4ef3bb 100644 --- a/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md +++ b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md @@ -34,8 +34,6 @@ Here's the feature expressed as a user story with a functional expectation:
Tips 🤫 if you really need it and after careful consideration ... -
    * Use the [Material CDK](https://material.angular.io/cdk/) Dialog or Overlay - dont forget to add `@import '@angular/cdk/overlay-prebuilt.css'` in `styles.scss`. * Use the [CanDeactivate](https://angular.io/api/router/CanDeactivate) guard in the new functional approach. -
From e2c10dd374735e6bc3ab930faf12cb17d062d92c Mon Sep 17 00:00:00 2001 From: Sven Brodny Date: Fri, 19 Apr 2024 01:49:03 +0200 Subject: [PATCH 14/15] docs(c48): refactor (3) --- .../content/docs/challenges/forms/48-avoid-losing-form-data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md index d2c4ef3bb..7dc40d69d 100644 --- a/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md +++ b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md @@ -34,6 +34,6 @@ Here's the feature expressed as a user story with a functional expectation:
Tips 🤫 if you really need it and after careful consideration ... - * Use the [Material CDK](https://material.angular.io/cdk/) Dialog or Overlay - dont forget to add `@import '@angular/cdk/overlay-prebuilt.css'` in `styles.scss`. + * Use the [Material CDK](https://material.angular.io/cdk/) Dialog or Overlay - don't forget to add `@import '@angular/cdk/overlay-prebuilt.css'` in `styles.scss`. * Use the [CanDeactivate](https://angular.io/api/router/CanDeactivate) guard in the new functional approach.
From 19c9e4ec060d0a44f537c8dea099df1d9d4839a7 Mon Sep 17 00:00:00 2001 From: Sven Brodny Date: Fri, 19 Apr 2024 01:56:48 +0200 Subject: [PATCH 15/15] docs(c48): revert & fix link --- .../docs/challenges/forms/48-avoid-losing-form-data.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md index 7dc40d69d..bbaa48647 100644 --- a/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md +++ b/docs/src/content/docs/challenges/forms/48-avoid-losing-form-data.md @@ -29,11 +29,13 @@ Here's the feature expressed as a user story with a functional expectation: 1. If one of the form fields is not empty and the user tries to navigate to a different route or page, or wants to reload the page, show an alert dialog to _avoid losing form data_. 2. The content of `dialog.component.ts` must be used for your alert. -3. The appearance and behavior of the alert dialog must comply with W3C conventions, see [alert dialog pattern](https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/). +3. The appearance and behavior of the alert dialog box must comply with W3C conventions, see [alert dialog pattern](https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/). 4. Maximize the use of the new concepts and syntax in the latest version of Angular.
- Tips 🤫 if you really need it and after careful consideration ... - * Use the [Material CDK](https://material.angular.io/cdk/) Dialog or Overlay - don't forget to add `@import '@angular/cdk/overlay-prebuilt.css'` in `styles.scss`. - * Use the [CanDeactivate](https://angular.io/api/router/CanDeactivate) guard in the new functional approach. + Tips 🤫 (if you really need it and after careful consideration) +
    +
  • Use the Material CDK Dialog or Overlay - don't forget to add @import '@angular/cdk/overlay-prebuilt.css' in styles.scss
  • +
  • Use the CanDeactivate guard in the new functional approach.
  • +