[SAFE-EMAIL-TEST-1] PLU-386: setup infra to display app-specific tooltips in check step#1645
[SAFE-EMAIL-TEST-1] PLU-386: setup infra to display app-specific tooltips in check step#1645ogp-weeloong wants to merge 1 commit into
Conversation
f4b9e29 to
c847a08
Compare
|
|
||
| if (isFormSgTrigger) { | ||
| return <FormSGCheckAgainButton {...props} /> | ||
| return <FormSGCheckAgainButton ref={ref} {...props} /> |
There was a problem hiding this comment.
Will migrate this to extension approach in a later PR
| </Tooltip> | ||
| ) | ||
| } | ||
| const CheckStepTooltip = forwardRef<HTMLDivElement, CheckStepTooltipProps>( |
There was a problem hiding this comment.
the forwardRef is needed here because eventually I'll wrap this in another tooltip, which requires its child to support refs
Code reviewArchitectural question: should app-extensions live in the frontend or be driven by the backend? Frontend-only is the right call here. The reasoning:
No critical bugs found. One latent concern worth noting (below the threshold for a blocking finding):
When 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
We want to allow apps to extend our front end (e.g. with tooltips) This creates a new "app-extensions" system in front end to enable this. The idea is to allow apps to provide react components that we will render in appropriate parts of the frontend. This kicks it off by extending the "check step" button Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
c847a08 to
6afa940
Compare

Problem
When testing email, we want to always send the email only to the pipe owner. This prevents them from accidentally sending a real email to their target audience when testing.
Solution
High level: when calling postman's API, clear CC list and force recipient to pipe owner if the run is a test run.
We want to add a UX signal to let the pipe owner know that when they click test step in postman, the email will be sent to them.
I decided on showing a tooltip. However, I'm not 100% sure if tooltip is good enough - we may want to do a NUX / first time modal instead.
This PR
This sets up the infra to enable apps to extend the front end.
High level approach
We do something similar to apps in backend.
frontend/src/app-extensions/<appName>APP_EXTENSIONSmap in theapp-extensionsindex file.This PR implements this approach and sets up the first extension site - the check step button.
BONUS: We can move the FormSG "check step again" button to this approach.
IMPORTANT: Feel free to leave comments if you have better idea, code is easy to change.
Before & After Screenshots
No-op, so here's some screens showing existing tooltips still work
Tests
Generally regression tests on test step tooltips since I refactored it a bit.