Closed wesrowe closed 10 months ago
Added some questions to the notes. It's unclear to me what prior art exists for a shared component created by a non-platform team and usable by isolated apps, but I believe it would exist in src/platform
if it does. Maybe we could create src/platform/mhv
or something similar?
Maybe good questions for the AuthExp team
Added detail about @@vap-svc
...
@dcloud Here are a few thoughts that I have, but would be more that happy to meet up to discuss more about this type of thing:
you can add code to the platform folder, but have to get it approved by the platform team. I don't know that there is a very formal process other than getting the PR put together and going from there.
I do agree that having something like src/platform/mhv
would make the most sense if this component will be a mhv exclusive thing, but that would also be a call I think platform teams would make
the module alias of @@vap-svc
is a relic of the past. Although it can still be used, I think adding more aliases for module resolutions within platform would be frowned upon and instead we would lean towards using just ~/platform/...
or whatever the final location of the component happens to be.
@department-of-veterans-affairs/platform-user
for the platform/user
location as an example. If you go with a mhv specific folder at the root of platform, then i think you would want to set up a similar structure and naming convention.user
folder, but will need add your exported components to the respective exportsFile.js to make sure that they can be accessed from applications.as far as web components go and prepping a component to be used in the design system
vets-website
is equipped to do at this time.To expand on the note that the Platform docs suggest src/site
as a location for a shared component:
src/site
folder is for "assets used in applications." Website assets are generally defined as "any static content that are shipped intact to web browsers," which means that location will not match our desire for a web component.src/platform
is for "shared code" which matches what we want to do.src/platform/site-wide
already present that looks to be the proper location for our shared code as there are other projects within that folder.src/platform/site-wide/mhv
folder with a couple of utility functions. We can add our shared components there.Agree w/ @carlosfelix2 that src/platform/site-wide/mhv
is probably the best place for this. Imports would look like import { ComponentName } from @department-of-veterans-affairs/platform-site-wide
, once adding our secondary nav component to src/platform/site-wide/exportsFile.js
.
Our final recommendation is:
src/platform/site-wide/mhv
. We would add the typical web component folders to the mhv folder (e.g. components, constants, etc.).src/platform/site-wide/exportsFile.js
to make the import easier and be something like import { ComponentName } from @department-of-veterans-affairs/platform-site-wide
sounds very clear to me. this can close – I'll make sure to link the recommendation above in the implementation ticket.
Description
User story
As a Cartographers team member, I want to set us up to deliver MHV secondary navigation as quickly as possible after UX/UI design is finalized, so that we're ready for MHV-on-VAgov integration (all tools available on Ph1).
Notes
src/site
, but that doesn't seem used any more. Can we create insrc/platform
, and if so, can that be done "as quickly as possible"?src/platform/user/profile/vap-svc
is co-owned by vsa-authd-exp-frontend and has a module resolver alias of"@@vap-svc"
@@profile
module alias points to./src/applications/personalization/profile
, but doesn't appear to be used by other applicationsAcceptance criteria
Tasks