Repository: Enterprise-CMCS/macpro-mdct-mcr
Pull request #12162: CMDCT-4529: Missing Information Text Updates
Author: login: karla-vm
Created: 2025-05-08T19:12:22Z | Merged: 2025-05-09T14:15:31Z

### Description
<!-- Detailed description of changes and related context -->
Updating the `missingEntity` message for the "Plan compliance" section to link users directly to each required section:

![Screenshot 2025-05-08 at 3 11 20 PM](https://github.com/user-attachments/assets/695f9491-e764-456c-8cab-345eb2e994b4)

### Related ticket(s)
<!-- Link to related ticket(s) or issue(s) -->
<!-- Hint: Type CMDCT-<ticket-number> for autolinking -->
CMDCT-4529

---
### How to test
<!-- Step-by-step instructions on how to test, if necessary -->
- Log in as a state user
- Create a NAAAR report
- Navigate to `/naaar/plan-compliance`

You should see the three sections in bullet points ✨ 

### Notes
<!-- Changed dependencies, .env files, configs, etc. -->
<!-- Instructions for local dev, e.g. requires new installs in directories -->


---
### Pre-review checklist
<!-- Complete the following steps before opening for review -->
- [ ] I have added [thorough](https://shorturl.at/aejkF) tests, if necessary
- [ ] I have updated relevant documentation, if necessary
- [ ] I have performed a self-review of my code
- [ ] I have manually tested this PR in the deployed cloud environment

---
### Pre-merge checklist
<!-- Complete the following steps before merging -->

#### Review
- [ ] Design: This work has been reviewed and approved by design, if necessary
- [ ] Product: This work has been reviewed and approved by product owner, if necessary

#### Security
_If either of the following are true, notify the team's ISSO (Information System Security Officer)._

- [ ] These changes are significant enough to require an update to the SIA.
- [ ] These changes are significant enough to require a penetration test.
---

<!-- If deploying to val or prod, click 'Preview' and select template -->
_convert to a different template: [test → val](?expand=1&template=test-to-val-deployment.md)_ | _[val → prod](?expand=1&template=val-to-prod-deployment.md)_



Diff:
diff --git a/services/app-api/forms/naaar.json b/services/app-api/forms/naaar.json
index 0269dc84c..ed1ced515 100644
--- a/services/app-api/forms/naaar.json
+++ b/services/app-api/forms/naaar.json
@@ -1078,22 +1078,52 @@
         "requiredMessages": {
           "plans": [
             {
-              "type": "p",
+              "type": "div",
               "children": [
                 {
                   "type": "p",
-                  "content": "This program is missing required information. You won’t be able to access this section until you’ve completed all the required questions in section "
+                  "content": "This program is missing required information. You won’t be able to access this section until you’ve completed all the required questions in section I."
                 },
                 {
-                  "type": "internalLink",
-                  "content": "I. State and program information",
-                  "props": {
-                    "to": "/naaar/state-and-program-information/state-information-and-reporting-scenario"
-                  }
-                },
-                {
-                  "type": "span",
-                  "content": "."
+                  "type": "ul",
+                  "children": [
+                    {
+                      "type": "li",
+                      "children": [
+                        {
+                          "type": "internalLink",
+                          "content": "Add plans",
+                          "props": {
+                            "to": "/naaar/state-and-program-information/add-plans"
+                          }
+                        }
+                      ]
+                    },
+                    {
+                      "type": "li",
+                      "children": [
+                        {
+                          "type": "internalLink",
+                          "content": "Provider type coverage",
+                          "props": {
+                            "to": "/naaar/state-and-program-information/provider-type-coverage"
+                          }
+                        }
+                      ]
+                    },
+                    {
+                      "type": "li",
+                      "children": [
+                        {
+                          "type": "internalLink",
+                          "content": "Analysis methods",
+                          "props": {
+                            "to": "/naaar/state-and-program-information/analysis-methods"
+                          }
+                        }
+                      ]
+                    }
+                  ]
                 }
               ]
             }
diff --git a/services/ui-src/src/components/reports/OverlayReportPage.tsx b/services/ui-src/src/components/reports/OverlayReportPage.tsx
index ff57a079d..f2b816273 100644
--- a/services/ui-src/src/components/reports/OverlayReportPage.tsx
+++ b/services/ui-src/src/components/reports/OverlayReportPage.tsx
@@ -319,5 +319,15 @@ const sx = {
     ol: {
       paddingLeft: "1rem",
     },
+    ul: {
+      display: "contents",
+    },
+    li: {
+      marginLeft: "2rem",
+      lineHeight: "2rem",
+      "&:first-of-type": {
+        paddingTop: "0.75rem",
+      },
+    },
   },
 };


Reviews:
user: login: bangbay-bluetiger
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T19:42:04Z
user: login: cy-by
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T19:47:22Z
user: login: karla-vm
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-08T19:50:28Z
user: login: karla-vm
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-08T19:50:37Z
user: login: cy-by
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T19:58:46Z
user: login: karla-vm
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-08T20:00:24Z
user: login: cy-by
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T20:06:18Z
user: login: bangbay-bluetiger
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T20:52:30Z

Review comments:
diff_hunk: @@ -1078,22 +1078,47 @@
         "requiredMessages": {
           "plans": [
             {
-              "type": "p",
+              "type": "ul",
               "children": [
                 {
                   "type": "p",
-                  "content": "This program is missing required information. You won’t be able to access this section until you’ve completed all the required questions in section "
+                  "content": "This program is missing required information. You won’t be able to access this section until you’ve completed all the required questions in section I."
path: services/app-api/forms/naaar.json
user: login: bangbay-bluetiger
body: `p` can't be a direct child of `ul`.
created_at: 2025-05-08T19:39:44Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1078,22 +1078,47 @@
         "requiredMessages": {
           "plans": [
             {
-              "type": "p",
+              "type": "ul",
path: services/app-api/forms/naaar.json
user: login: bangbay-bluetiger
body: I'd change this to `div`.
created_at: 2025-05-08T19:39:58Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1078,22 +1078,47 @@
         "requiredMessages": {
           "plans": [
             {
-              "type": "p",
+              "type": "ul",
               "children": [
                 {
                   "type": "p",
-                  "content": "This program is missing required information. You won’t be able to access this section until you’ve completed all the required questions in section "
+                  "content": "This program is missing required information. You won’t be able to access this section until you’ve completed all the required questions in section I."
                 },
                 {
-                  "type": "internalLink",
-                  "content": "I. State and program information",
-                  "props": {
-                    "to": "/naaar/state-and-program-information/state-information-and-reporting-scenario"
-                  }
+                  "type": "li",
path: services/app-api/forms/naaar.json
user: login: bangbay-bluetiger
body: Move all these `li` as children of a `ul` that's a sibling to the `p` above.
created_at: 2025-05-08T19:41:11Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1078,22 +1078,47 @@
         "requiredMessages": {
           "plans": [
             {
-              "type": "p",
+              "type": "ul",
               "children": [
                 {
                   "type": "p",
-                  "content": "This program is missing required information. You won’t be able to access this section until you’ve completed all the required questions in section "
+                  "content": "This program is missing required information. You won’t be able to access this section until you’ve completed all the required questions in section I."
path: services/app-api/forms/naaar.json
user: login: cy-by
body: The output of this JSON is that the `p` tag is a child of the `ul` tag, [which is against the HTML spec](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ul#:~:text=Permitted%20content,and%0A%20%20%20%20%20%20%20%20%3Ctemplate%3E%20elements), could this be adjusted so that the `p` tag is above the `ul`?

Current HTML output:
![Managed Care Reporting 2025-05-08 at 14 46 09@2x](https://github.com/user-attachments/assets/49b6c5e1-1125-4144-86cd-b30c0bc382ca)

Suggested output:
![Managed Care Reporting 2025-05-08 at 14 46 29@2x](https://github.com/user-attachments/assets/11552b3e-bf29-42af-8e95-48df11a2adc1)


created_at: 2025-05-08T19:47:22Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1078,22 +1078,47 @@
         "requiredMessages": {
           "plans": [
             {
-              "type": "p",
+              "type": "ul",
path: services/app-api/forms/naaar.json
user: login: karla-vm
body: Changed the top-level one to a `p` to match our other JSON blobs 👍🏽 
created_at: 2025-05-08T19:50:28Z
author_association: COLLABORATOR
diff_hunk: @@ -1078,22 +1078,47 @@
         "requiredMessages": {
           "plans": [
             {
-              "type": "p",
+              "type": "ul",
               "children": [
                 {
                   "type": "p",
-                  "content": "This program is missing required information. You won’t be able to access this section until you’ve completed all the required questions in section "
+                  "content": "This program is missing required information. You won’t be able to access this section until you’ve completed all the required questions in section I."
path: services/app-api/forms/naaar.json
user: login: karla-vm
body: Fixed!
created_at: 2025-05-08T19:50:37Z
author_association: COLLABORATOR
diff_hunk: @@ -1081,19 +1081,49 @@
               "type": "p",
               "children": [
                 {
-                  "type": "p",
-                  "content": "This program is missing required information. You won’t be able to access this section until you’ve completed all the required questions in section "
-                },
-                {
-                  "type": "internalLink",
-                  "content": "I. State and program information",
-                  "props": {
-                    "to": "/naaar/state-and-program-information/state-information-and-reporting-scenario"
-                  }
+                  "type": "span",
+                  "content": "This program is missing required information. You won’t be able to access this section until you’ve completed all the required questions in section I."
                 },
                 {
-                  "type": "span",
-                  "content": "."
+                  "type": "ul",
path: services/app-api/forms/naaar.json
user: login: cy-by
body: Now the `ul` is [not allowed to be a child](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/p#:~:text=Permitted%20content,Phrasing%20content) of `p`. Can they be siblings?

The top node could be a `div`, with the `span` turning into your `p` and that would make the `p` and `ul` siblings.

Incorrect HTML output:
![Managed Care Reporting 2025-05-08 at 14 56 45@2x](https://github.com/user-attachments/assets/8e348131-c710-4ea9-ac99-8dda93d01864)

created_at: 2025-05-08T19:58:46Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1081,19 +1081,49 @@
               "type": "p",
               "children": [
                 {
-                  "type": "p",
-                  "content": "This program is missing required information. You won’t be able to access this section until you’ve completed all the required questions in section "
-                },
-                {
-                  "type": "internalLink",
-                  "content": "I. State and program information",
-                  "props": {
-                    "to": "/naaar/state-and-program-information/state-information-and-reporting-scenario"
-                  }
+                  "type": "span",
+                  "content": "This program is missing required information. You won’t be able to access this section until you’ve completed all the required questions in section I."
                 },
                 {
-                  "type": "span",
-                  "content": "."
+                  "type": "ul",
path: services/app-api/forms/naaar.json
user: login: karla-vm
body: Ah, I see, I misunderstood @bangbay-bluetiger's suggestion, which was exactly that. Just fixed!
created_at: 2025-05-08T20:00:24Z
author_association: COLLABORATOR

PR comments:
user: login: qlty-cloud-legacy[bot]
created_at: 2025-05-08T20:21:58Z
body: Code Climate has analyzed commit 1b68cd23 and detected **0 issues** on this pull request.

The test coverage on the diff in this pull request is **100.0%** (**90%** is the threshold).

This pull request will bring the total coverage in the repository to **97.2%** (**0.0%** change).

View more on [Code Climate](https://codeclimate.com/repos/644971a20bd7db00dfeaf21a/pull/12162).

author_association: NONE