refactor: review

This commit is contained in:
Timothy Alcaide
2024-04-13 22:37:05 +02:00
committed by thomas
parent 928ec929f8
commit 31a44ba4bd
2 changed files with 8 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
# Hold to send button # Hold to send button
> author: thomas-laforge > author: alcaidio
### Run Application ### Run Application

View File

@@ -30,17 +30,17 @@ Here the prototype made by Lucie :
## Acceptance Criteria ## Acceptance Criteria
1. We should be able to configure a maintenance duration in milliseconds. 1. We should be able to configure a maintenance duration in milliseconds.
2. Pressing and holding the button triggers the countdown on "mousedown" event. 2. Pressing and holding the button triggers the countdown on the `mousedown` event.
3. On "mouseleave" or "mouseup" events, the progress bar is reset to 0. 3. On `mouseleave` or `mouseup` events, the progress bar is reset to 0.
4. The progress bar representing the remaining relative time should reflect the remaining time. 4. The progress bar representing the remaining relative time should reflect the remaining time.
5. Simulates a backup request when the hold time is over (console log or alert). 5. Simulates a backend request when the hold time is over (console log or alert).
6. You must maximize the use of RxJS operators and be as declarative as possible. 6. You must maximize the use of RxJS operators and be as declarative as possible.
<details> <details>
<summary>Tips 🤫 (if you really need it and after careful consideration)</summary> <summary>Tips 🤫 (if you really need it and after careful consideration)</summary>
<ul> <ul>
<li>Create the `HolddableDirective`</li> <li>Create the `HoldableDirective`</li>
<li>Use `TemplateRef` and `fromEvent` from rxjs to catch events OR `@HostListener`</li> <li>Use `TemplateRef` and `fromEvent` from RxJS to catch events or `@HostListener`</li>
<li>Perhaps the following rxjs operators can help you: interval, takeUntil, switchmap, takeWhile/retry...</li> <li>Perhaps the following RxJS operators can help you: interval, takeUntil, switchMap, takeWhile/retry...</li>
</ul> </ul>
</details> </details>