-
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-14700: Adds banner to VBA Facility #16076
Conversation
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
...a_facility/src/Plugin/Validation/Constraint/VbaFacilityRequiredFieldsConstraintValidator.php
Show resolved
Hide resolved
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
PHP_CodeSniffer
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php|174 col 4| Expected 4 space(s) before asterisk; 3 found
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php|175 col 4| Expected 4 space(s) before asterisk; 3 found
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php|176 col 4| Expected 4 space(s) before asterisk; 3 found
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php|177 col 4| Expected 4 space(s) before asterisk; 3 found
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php|244 col 1| More than 2 empty lines are not allowed
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php|246 col 6| Line exceeds 80 characters; contains 85 characters
docroot/modules/custom/va_gov_vba_facility/src/Plugin/Validation/Constraint/VbaFacilityRequiredFieldsConstraintValidator.php|23 col 9| Line exceeds 80 characters; contains 81 characters
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/js/set_banner_content_to_required.es6.js
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/js/set_banner_content_to_required.es6.js
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/js/set_banner_content_to_required.es6.js
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/js/set_banner_content_to_required.es6.js
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/js/set_banner_content_to_required.es6.js
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/js/set_banner_content_to_required.es6.js
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
...a_facility/src/Plugin/Validation/Constraint/VbaFacilityRequiredFieldsConstraintValidator.php
Outdated
Show resolved
Hide resolved
b724d4f
to
b3eae90
Compare
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
@davidmpickett Could you take a look at this and see what I might want to change before really tightening down the code? I created a user [email protected] who should best imitate an editor. |
4d1e93d
to
0273ee7
Compare
e3cf721
to
5e56050
Compare
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.
This is looking quite good. I am still testing, but here are thoughts and questions from code review.
region: content | ||
parent_name: '' | ||
weight: 2 | ||
format_type: detailswithimage |
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.
Are we going to do an image?
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.
I am not sure. We use this format_type in the CLP. I imagine that it would be useful. I wan't going to worry about putting one in now, though, but this way we can post-MVP.
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.
Makes sense. Might want to spin up a ticket to reminder us.
config/sync/core.entity_view_display.node.vba_facility.default.yml
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Outdated
Show resolved
Hide resolved
docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php
Show resolved
Hide resolved
$empty_fields[] = $entity->get('field_dismissible_option')->getFieldDefinition()->getLabel(); | ||
$field_error_path[] = 'field_dismissible_option'; | ||
} | ||
if (empty(trim($entity->get('field_banner_title')->value))) { |
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.
Nicely done adding the trim().
|
||
if (!empty($empty_fields)) { | ||
if (count($field_error_path) > 1) { | ||
// Multiple errors should go on the checkbox. |
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.
Nice!
The jumplink when the error is in the CKeditor is broken. This one is definitely a known issue and I created an upstream issue for it. I will find it an link it here when I do Edit: here is the upstream issue We are using patch 6 currently, but it seems to not be working. |
5e56050
to
33c2d32
Compare
7b8ac99
to
a43b906
Compare
…rors in UI and testing.
a43b906
to
ca22eaf
Compare
I just resolved the conflicts |
I just created a drupal core issue for the error message jump link to the checkbox not working. |
* VACMS-14700: Adds config for banner fields * VACMS-14700: Adds config for persistence * VACMS-14700: Adds hiding and a little resetting on presave * VACMS-14700: Hides and reveals fields. Adds constraint. Clears fields. * VACMS-14700: Expands banner fieldset when checkbox is checked. * VACMS-14700: Hides banner fields on node:view when not checked * VACMS-14700: Adds config changes. * VACMS-14700: Changes config and select list option * VACMS-14700: Code cleanup * VACMS-14700: Fixes a couple typos. * VACMS-14700: Updates language after review. Updates code to remove errors in UI and testing. * VACMS-14700: Removes isset() as it always exists and is not nullable, per PHPStan. * VACMS-14700: Adds full content validation. * VACMS-14700: Removes N/A from dismissible, makes it show as required. * VACMS-14700: Orders methods * VACMS-14700: Makes dismissible not required. * VACMS-14700: Updates name, per PR review * VACMS-14700: Updates UI per Figma
Description
Relates to #14700
Testing done
Manually
QA Steps
Node:edit when banner is not enabled
As [email protected], edit Cheyenne VA Regional Benefit Office.
Node:view when banner is not enabled
Node:edit when banner is enabled
Set no fields
Set the Banner title only
Set the Banner type
Set Dismissible by user?
Set Banner content
Node:view when banner is enabled
Node:view when banner is turned off again
Node:edit after banner has been turned off
Definition of Done
Select Team for PR review
CMS Team
Public websites
Facilities
User support
Accelerated Publishing