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

Feat/otter training #2551

Open
wants to merge 92 commits into
base: main
Choose a base branch
from
Open

Feat/otter training #2551

wants to merge 92 commits into from

Conversation

cpaulve-1A
Copy link
Contributor

Proposed change

Related issues

- No issue associated -

sdo-1A and others added 30 commits October 2, 2024 11:53
## Proposed change

Creation of components that will be used in the Otter training (such as
a code editor, etc)

## Related issues

- 🐛 Fixes #(issue)
- 🚀 Feature #(issue)

<!-- Please make sure to follow the contributing guidelines on
https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md -->
## Proposed change

Preparation for the training content

## Related issues

- 🐛 Fixes #(issue)
- 🚀 Feature #(issue)

<!-- Please make sure to follow the contributing guidelines on
https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md -->
## Proposed change

Creation of training SDK
This PR is mainly to check the package files, the specifications are
likely to change when we update the content of the SDK training
exercises.

## Related issues

- 🐛 Fixes #(issue)
- 🚀 Feature #(issue)

<!-- Please make sure to follow the contributing guidelines on
https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md -->
## Proposed change

Cross-origin isolation service worker in order to be able to deploy the
training on GitHub pages.
Source of this script:
https://github.com/gzuidhof/coi-serviceworker/tree/master

## Related issues

- 🐛 Fixes #(issue)
- 🚀 Feature #(issue)

<!-- Please make sure to follow the contributing guidelines on
https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md -->
## Proposed change

Add an indicator on the terminal output to know that some work is in
progress

![image](https://github.com/user-attachments/assets/5ec89ad1-859c-4db1-81c4-70998457d2e4)

Working example: https://fpaul-1a.github.io/otter/#/sdk-training#4

## Related issues

- 🐛 Fixes #(issue)
- 🚀 Feature #(issue)

<!-- Please make sure to follow the contributing guidelines on
https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md -->
## Proposed change

Otter SDK Training - SDK with Dates - Generation step and How to use
step

NOTE: the app.component files are those that are added to the
webcontainer (these are converted to a JSON format and then added to the
webcontainer for the exercises)



Generation step:

![image](https://github.com/user-attachments/assets/e74aa0ab-aa9d-4846-af76-928ef1298b33)

![image](https://github.com/user-attachments/assets/d1cf75c4-a17d-431c-a8a8-6122532e6513)
Show solution:

![image](https://github.com/user-attachments/assets/ee6a6f93-62cf-4cf0-9ae2-aee5b317043b)

How to use:

![image](https://github.com/user-attachments/assets/93401778-b55a-4533-96d0-5c4d353a11d1)

![image](https://github.com/user-attachments/assets/37a60396-af3e-4e61-92b8-21f18caa0f9f)
Show solution:

![image](https://github.com/user-attachments/assets/c6bdbf47-3a90-45a8-b96e-8e4eaa17f21d)

## Related issues

- 🐛 Fixes #(issue)
- 🚀 Feature #(issue)

<!-- Please make sure to follow the contributing guidelines on
https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md -->
… on screen (#2433)

## Proposed change

https://fpaul-1a.github.io/otter/#/sdk-training#0
https://fpaul-1a.github.io/otter/#/sdk-training#4


![image](https://github.com/user-attachments/assets/fadd94bd-6558-426e-8dc8-687c3233a8de)


## Related issues

<!--
Please make sure to follow the [contribution
guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md)
-->

*- No issue associated -*

<!-- * 🐛 Fix #issue -->
<!-- * 🐛 Fix resolves #issue -->
<!-- * 🚀 Feature #issue -->
<!-- * 🚀 Feature resolves #issue -->
<!-- * :octocat: Pull Request #issue -->
## Proposed change

Instead of writing the trainings instructions in HTML, we can use
markdown.
With this, we can easily enable the code highlighting.

Example:
https://fpaul-1a.github.io/otter/#/sdk-training#2
Generated from
https://github.com/fpaul-1A/otter/blob/main/apps/showcase/src/assets/trainings/sdk/steps/typescript-sdk/instructions.md


![image](https://github.com/user-attachments/assets/de3c26cc-5f32-4a18-9c1b-4d4257b51f00)


## Related issues

<!--
Please make sure to follow the [contribution
guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md)
-->

*- No issue associated -*

<!-- * 🐛 Fix #issue -->
<!-- * 🐛 Fix resolves #issue -->
<!-- * 🚀 Feature #issue -->
<!-- * 🚀 Feature resolves #issue -->
<!-- * :octocat: Pull Request #issue -->
## Proposed change

<!--
Please include a summary of the changes and the related issue.
Please also include relevant motivation and context.
-->

## Related issues

<!--
Please make sure to follow the [contribution
guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md)
-->

*- No issue associated -*

<!-- * 🐛 Fix #issue -->
<!-- * 🐛 Fix resolves #issue -->
<!-- * 🚀 Feature #issue -->
<!-- * 🚀 Feature resolves #issue -->
<!-- * :octocat: Pull Request #issue -->
## Proposed change

https://fpaul-1a.github.io/otter/#/sdk-training#9

## Related issues

<!--
Please make sure to follow the [contribution
guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md)
-->

*- No issue associated -*

<!-- * 🐛 Fix #issue -->
<!-- * 🐛 Fix resolves #issue -->
<!-- * 🚀 Feature #issue -->
<!-- * 🚀 Feature resolves #issue -->
<!-- * :octocat: Pull Request #issue -->
## Proposed change

<!--
Please include a summary of the changes and the related issue.
Please also include relevant motivation and context.
-->

## Related issues

<!--
Please make sure to follow the [contribution
guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md)
-->

*- No issue associated -*

<!-- * 🐛 Fix #issue -->
<!-- * 🐛 Fix resolves #issue -->
<!-- * 🚀 Feature #issue -->
<!-- * 🚀 Feature resolves #issue -->
<!-- * :octocat: Pull Request #issue -->
## Proposed change

<!--
Please include a summary of the changes and the related issue.
Please also include relevant motivation and context.
-->

## Related issues

<!--
Please make sure to follow the [contribution
guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md)
-->

*- No issue associated -*

<!-- * 🐛 Fix #issue -->
<!-- * 🐛 Fix resolves #issue -->
<!-- * 🚀 Feature #issue -->
<!-- * 🚀 Feature resolves #issue -->
<!-- * :octocat: Pull Request #issue -->
## Proposed change

<!--
Please include a summary of the changes and the related issue.
Please also include relevant motivation and context.
-->

## Related issues

<!--
Please make sure to follow the [contribution
guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md)
-->

*- No issue associated -*

<!-- * 🐛 Fix #issue -->
<!-- * 🐛 Fix resolves #issue -->
<!-- * 🚀 Feature #issue -->
<!-- * 🚀 Feature resolves #issue -->
<!-- * :octocat: Pull Request #issue -->
## Proposed change

<!--
Please include a summary of the changes and the related issue.
Please also include relevant motivation and context.
-->

## Related issues

<!--
Please make sure to follow the [contribution
guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md)
-->

*- No issue associated -*

<!-- * 🐛 Fix #issue -->
<!-- * 🐛 Fix resolves #issue -->
<!-- * 🚀 Feature #issue -->
<!-- * 🚀 Feature resolves #issue -->
<!-- * :octocat: Pull Request #issue -->
## Proposed change

Otter SDK Training - Introduction step

## Related issues

- 🐛 Fixes #(issue)
- 🚀 Feature #(issue)

<!-- Please make sure to follow the contributing guidelines on
https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md -->
cpaulve-1A and others added 18 commits December 6, 2024 11:28
## Proposed change
Merge `main` content into the otter training feature branch.

Conflicts:

-
apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/component-replacement.png
-
apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/configuration.png
-
apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/design-token.png
-
apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/dynamic-content.png
-
apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/home.png
-
apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/localization.png
-
apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/placeholder.png
-
apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/rules-engine.png
-
apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/run-app-locally.png
-
apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/sdk-generator.png
- apps/showcase/package.json
- apps/showcase/project.json
- apps/showcase/src/app/app.module.ts
- apps/showcase/src/app/dynamic-content/dynamic-content.component.ts
- apps/showcase/src/app/rules-engine/rules-engine.component.ts
- apps/showcase/src/app/run-app-locally/run-app-locally.component.ts
-
apps/showcase/src/components/utilities/clipboard-button/clipboard-button-pres.component.ts
-
apps/showcase/src/components/utilities/clipboard-button/clipboard-button-pres.template.html
- apps/showcase/src/components/utilities/index.ts
- apps/showcase/src/services/webcontainer/webcontainer-runner.ts
- package.json
- packages/@o3r-training/showcase-sdk/project.json
- yarn.lock
## Conflicts
- apps/showcase/project.json
## Proposed change

Repair yarn.lock and adapt padding on instructions

*- No issue associated -*
## Proposed change

Enable `Go to Definition` feature (Ctrl+click), auto complete and avoid
errors on imports.
https://fpaul-1a.github.io/otter/#/sdk-training#1


![image](https://github.com/user-attachments/assets/02527b55-e049-49bd-a586-895001799363)

## Related issues

<!--
Please make sure to follow the [contribution
guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md)
-->

*- No issue associated -*

<!-- * 🐛 Fix #issue -->
<!-- * 🐛 Fix resolves #issue -->
<!-- * 🚀 Feature #issue -->
<!-- * 🚀 Feature resolves #issue -->
<!-- * :octocat: Pull Request #issue -->
…value

Project only contains the description of the exercise and does not reflect the trainee changes
…value (#2590)

## Proposed change
Project only contains the description of the exercise and does not
reflect the trainee changes.
The file list should reflect the webcontainer state

Fixes also e2e tests and add a prefix for training directories to avoid
name conflicts

## Related issues

*- No issue associated -*
## Proposed change

<!--
Please include a summary of the changes and the related issue.
Please also include relevant motivation and context.
-->

## Related issues

<!--
Please make sure to follow the [contribution
guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md)
-->

*- No issue associated -*

<!-- * 🐛 Fix #issue -->
<!-- * 🐛 Fix resolves #issue -->
<!-- * 🚀 Feature #issue -->
<!-- * 🚀 Feature resolves #issue -->
<!-- * :octocat: Pull Request #issue -->
## Proposed change
Add persistence in `localStorage` of code modifications in a training
step.
When the user refresh or come back on the training on which code
modifications were made, we prompt a dialog to ask if he wants to keep
the changes or discard them.

![image](https://github.com/user-attachments/assets/b55fccc4-97a8-44b4-be69-2bcebf586e55)


With this feature we think also to add a `Reset` or `Discard changes`
button, it will be done in another PR, unless someone think it's a must
inside this PR.
## Proposed change

Merge main to otter training

### Conflicting files .vscode/settings.json

apps/showcase/package.json
package.json
packages/@o3r-training/showcase-sdk/package.json
packages/@o3r-training/showcase-sdk/project.json
packages/@o3r/core/package.json
packages/@o3r/eslint-config-otter/package.json
yarn.lock

## Related issues

*- No issue associated -*
Copy link

nx-cloud bot commented Dec 19, 2024

View your CI Pipeline Execution ↗ for commit 64d5a42.

Command Status Duration Result
nx run-many --target=test-e2e ❌ Failed 9m 51s View ↗
nx affected --target=test --cacheDirectory=D:\a... ❌ Failed 10m 45s View ↗
nx affected --target=test --cacheDirectory=/hom... ❌ Failed 8m 7s View ↗
nx run-many --target=test-int ✅ Succeeded 54m 50s View ↗
nx run-many --target=build --projects=eslint-pl... ✅ Succeeded 1s View ↗
nx run-many --target=publish --nx-bail --userco... ✅ Succeeded 37s View ↗
nx run-many --target=build ✅ Succeeded 16m 53s View ↗
nx affected --target=lint --base=remotes/origin... ✅ Succeeded 15m 5s View ↗
Additional runs (3) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2024-12-19 16:43:05 UTC

cpaulve-1A and others added 2 commits December 20, 2024 14:35
## Proposed change

<!--
Please include a summary of the changes and the related issue.
Please also include relevant motivation and context.
-->

## Related issues

<!--
Please make sure to follow the [contribution
guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md)
-->

*- No issue associated -*

<!-- * 🐛 Fix #issue -->
<!-- * 🐛 Fix resolves #issue -->
<!-- * 🚀 Feature #issue -->
<!-- * 🚀 Feature resolves #issue -->
<!-- * :octocat: Pull Request #issue -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants