-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VACMS-9885 site previewer #16138
VACMS-9885 site previewer #16138
Conversation
…e flag for next preview
docroot/modules/custom/va_gov_preview/src/EventSubscriber/PreviewEventSubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_preview/src/EventSubscriber/PreviewEventSubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_preview/src/EventSubscriber/PreviewEventSubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_preview/src/EventSubscriber/PreviewEventSubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_preview/src/EventSubscriber/PreviewEventSubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_preview/src/EventSubscriber/PreviewEventSubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_preview/src/EventSubscriber/PreviewEventSubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_preview/src/EventSubscriber/PreviewEventSubscriber.php
Show resolved
Hide resolved
@@ -0,0 +1,40 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noting this plugin isn't actually used by the PreviewEventSubscriber, but it does provide an drastically-less-experience-altering alternative to the full-page iframe takeover of a node view page that the default plugin provided by drupal/next
does.
next.settings.yml
has been configured to use it by default, but it should realistically never render to a page in this manner, because we render buttons that handle both versions of preview ourselves in the PreviewEventSubscriber.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified QA steps 🙂
This is approved; however, we are making a call to hold merging this until after the Thanksgiving holiday. |
* move existing preview button logic to va_gov_preview and check feature flag for next preview * modify page with event subscriber * move existing preview behavior into event subscriber * update preview event subscriber to generate next preview link * export updated config for next * consistent quote marks in services * use correct var for nextPreviewEnabled * inject all the dependencies * use the correct request stack... --------- Co-authored-by: Tim Cosgrove <[email protected]>
Description
Closes #9885. Closes #9891.
This PR creates a feature flag for next preview, some next entity types to enable preview, and refactors the existing preview button logic from
va_gov_backend.module
to an Event Subscriber inside ofva_gov_preview
.Please note: the vets-website assets are not yet correctly symlinked in place for next-build on CMS tugboat (will be a separate PR), so preview pages generated by next-build may take a few seconds to load and appear missing those vets-website-based portions. This will be fixed in a following PR.
Testing done
Enabled the feature flag and then tested a combination of nodes to ensure that next preview worked when enabled and that existing preview logic remained unchanged:
Next preview:
Story:
https://va-gov-cms.ddev.site/butler-health-care/stories/this-suicide-prevention-month-the-butler-va-offers-veterans-support
Story (draft revision):
https://va-gov-cms.ddev.site/node/61531/latest
Existing preview:
VAMC detail page:
https://va-gov-cms.ddev.site/southern-nevada-health-care/work-with-us/internships-and-fellowships/nurse-practitioner-residency
No preview (excluded type):
Events list:
https://va-gov-cms.ddev.site/northport-health-care/events
QA steps
What needs to be checked to prove this works?
What needs to be checked to prove it didn't break any related things?
What variations of circumstances (users, actions, values) need to be checked?
Check a story node, note that the existing preview button is unchanged, using the current preview link format:
https://pr16138-d6emmi3dibioikbr8bbq6bgzw8z1tgfl.ci.cms.va.gov/minneapolis-health-care/stories/its-never-too-late-to-quit-smoking-and-start-breathing-easier
Check a story listing node, note that there is no preview button:
https://pr16138-d6emmi3dibioikbr8bbq6bgzw8z1tgfl.ci.cms.va.gov/chicago-health-care/stories
Enable the
FEATURE_NEXT_STORY_PREVIEW
feature flag at: https://pr16138-d6emmi3dibioikbr8bbq6bgzw8z1tgfl.ci.cms.va.gov/admin/config/system/feature_toggleReturn to a story node, note that the preview button now points to the next-build server:
https://pr16138-d6emmi3dibioikbr8bbq6bgzw8z1tgfl.ci.cms.va.gov/minneapolis-health-care/stories/its-never-too-late-to-quit-smoking-and-start-breathing-easier
Return to a story listing node, note that a preview button now exists and points to the next-build server:
https://pr16138-d6emmi3dibioikbr8bbq6bgzw8z1tgfl.ci.cms.va.gov/chicago-health-care/stories
Check an Event List node, note that there is no preview button: https://pr16138-d6emmi3dibioikbr8bbq6bgzw8z1tgfl.ci.cms.va.gov/northport-health-care/events
Check a VAMC detail page, note that the preview button is generated with existing preview link format (not pointing at next-build):
https://pr16138-d6emmi3dibioikbr8bbq6bgzw8z1tgfl.ci.cms.va.gov/eastern-colorado-health-care/work-with-us/internships-and-fellowships/orthopaedic-physical-therapy-residency-program
Definition of Done
Select Team for PR review
CMS Team
Public websites
Facilities
User support
Accelerated Publishing