department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
283 stars 204 forks source link

Move landing page to isolated app build #70837

Closed wesrowe closed 10 months ago

wesrowe commented 11 months ago

MAY BE BLOCKED on IA dependency in Medications tool

Description

User story

As a Cartographers team member, I want our landing page to be built in isolation, so that deploys are done quickly and on-demand with less exposure to unrelated flaky CI steps.

Notes

See first comment below for two in-flight PRs.

See steps/discussion here

  • each app would have to be moved to its own directory, rather than live under /mhv/
  • all shared code in use would have to be either duplicated in the app directory or (ideally) moved under platform

Steps mentioned by Adrian in slack:

Related docs

Acceptance criteria

Tasks

dcloud commented 11 months ago

Existing tickets:

I think the main difference now is the recommendation to move the app to a different directory, since the Platform bug that blocked this work, https://github.com/department-of-veterans-affairs/va.gov-team/issues/58176, seems unlikely to get fixed

radavis commented 11 months ago

Documentation on Isolated Application Builds: https://depo-platform-documentation.scrollhelp.site/developer-docs/isolated-application-builds

radavis commented 11 months ago

There are some issues we will need to address before taking on this ticket:

/my-health/about-medications

Currently, there is code within the MHV Landing Page that routes to a component within Medications. The Medications team/IA wanted the above URL path. Because of technical limitations and time constraints, we did a cross-app import and mounted their component within our routes file. We will need to address this in order to make our landing page an isolated application.

Potential Options:

Address shared code with the Mega Menu:

Refactor the following files to avoid importing from application/mhv/landing-page. I believe importing our manifest is OK (yarn check-app-imports --app-folders mhv/landing-page will tell us), but other imports from our landing page should be refactored out.

Relevant Slack conversation

Relevant Medications/IA documentation

sterkenburgsara commented 11 months ago

Update: related thread in Medications Slack channel to gauge timeline for moving /about-medicationscontent to a new URL to unblock this work.

wesrowe commented 11 months ago

Refinement notes:

carlosfelix2 commented 11 months ago

Help a developer meeting to figure out steps to isolated our application:

  1. Copy (do not move) MHV landing page app folder to the applications folder level, so we can run the check app imports script. This includes refactoring/copying the use DataDogRUM code from the shared folder. This requires a new appName for step 5. Possibility of using git move to move the files to the new location, then make a copy of the files to the old location, so we can retain the history of the files in the new location.
  2. Copy medications landing page code (and dependencies) into the MHV landing page location.
  3. Enable isolated app for the new MHV landing page location.
  4. Deploy changes to production. Must verify it is in production before proceeding.
  5. Update content-build repo to point to new MHV landing page location. Must verify content-build changes are deployed to production before proceeding.
  6. Remove old MHV landing page location from repo.

Note: Probably need another ticket to track move of the landing page to Drupal.

dcloud commented 11 months ago

Per Slack:

Update: cannot use Drupal for authenticated content (it only works for publicly viewable / unauth pages).

We can still temporarily copy the medication landing page, but would need a different approach for where the content will move to in the future since Drupal is out:

  1. It can be its own app… 🙁
  2. It moves URLs and lives at a path under /my-health/medications/, such as /my-health/medications/about. This would involve changes to the MHV medications app to add that page at a route, plus a redirect in our own app to the new URL
dcloud commented 10 months ago

It's done?!