From 4ce3b5234619a75ccb4dc885f0a2bf776b3b6f10 Mon Sep 17 00:00:00 2001 From: neil-hughes Date: Wed, 8 Feb 2023 15:52:51 +0000 Subject: [PATCH] fix: Clarify the deliberate inconsistency in the API --- docs/activity_3.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/activity_3.md b/docs/activity_3.md index d460a815..6d7c5249 100644 --- a/docs/activity_3.md +++ b/docs/activity_3.md @@ -4,7 +4,7 @@ Here's the design for this page: -![Confess To Us](./images/confess.png "Sketched confession page") +![Confess To Us](./images/confess.png 'Sketched confession page') Well, that's pretty surprising. @@ -12,11 +12,11 @@ Well, that's pretty surprising. It looks like they want a form with three elements. -- A subject line for the confession. +- A subject line for the confession. -- A dropdown for the reason for the confession. This could be either a type of misdemeanour, or "I just want to talk" +- A dropdown for the reason for the confession. This could be either a type of misdemeanour, or "I just want to talk" -- A text box for details +- A text box for details ## Form Behaviour - on the Client @@ -77,6 +77,8 @@ You must POST the above form data to the endpoint: 2️⃣ If `success` is `true` and `justTalked` is `false`, i.e. it's a real confession, you should add the confession data to your list of misdemeanours so this new crime is visible on the misdemeanours page. (NB: the server does not save this data so if you hit F5 it will be lost. That's okay!) +🤔 You may notice that the returned data isn't _quite_ the same data type as the result from GETting misdemeanours. It's up to you how you handle this little inconsistency while meeting the requirements. + 3️⃣ If `justTalked` is `true`, you don't have to do anything. 👉 Hold on! Have you been writing quality, valid, [accessible HTML](https://reactjs.org/docs/accessibility.html#semantic-html)? Maybe now is a good time to run your generated HTML through a validator and see! To do this, you can open your app in the browser and copy/paste the HTML from dev tools into a validator. 🙌