From 820c70fb4b703f7bd8feb5eef43c619553bcdf15 Mon Sep 17 00:00:00 2001 From: Joe Galluccio Date: Thu, 11 Dec 2025 15:28:17 -0500 Subject: [PATCH 1/4] new view and mod code --- ...lity_report_for_authors_using_revision.yml | 582 ++++++++++++++++++ .../mass_admin_pages/mass_admin_pages.module | 36 +- 2 files changed, 612 insertions(+), 6 deletions(-) create mode 100644 conf/drupal/config/views.view.accessibility_report_for_authors_using_revision.yml diff --git a/conf/drupal/config/views.view.accessibility_report_for_authors_using_revision.yml b/conf/drupal/config/views.view.accessibility_report_for_authors_using_revision.yml new file mode 100644 index 0000000000..91094b4b10 --- /dev/null +++ b/conf/drupal/config/views.view.accessibility_report_for_authors_using_revision.yml @@ -0,0 +1,582 @@ +uuid: 44b71015-3be8-4d2c-a7f9-abefb4a29391 +langcode: en +status: true +dependencies: + module: + - editoria11y + - node + - user +id: accessibility_report_for_authors_using_revision +label: 'Accessibility report for authors using revision' +module: views +description: '' +tag: '' +base_table: node_field_revision +base_field: vid +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + title: 'Accessibility report for authors using revision' + fields: + nid: + id: nid + table: node_field_revision + field: nid + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: nid + plugin_id: field + label: ID + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: number_integer + settings: + thousand_separator: '' + prefix_suffix: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + title: + id: title + table: node_field_revision + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: title + plugin_id: field + label: Title + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: false + ellipsis: false + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + title_1: + id: title_1 + table: node_field_revision + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: title + plugin_id: field + label: Title + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: false + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + page_result_count: + id: page_result_count + table: editoria11y_results + field: page_result_count + relationship: editoria11y_results + group_type: sum + admin_label: '' + plugin_id: editoria11y_issues_by_page_link + label: 'Page result count' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + set_precision: false + precision: 0 + decimal: . + separator: ',' + format_plural: 0 + format_plural_string: !!binary MQNAY291bnQ= + prefix: '' + suffix: '' + changed: + id: changed + table: node_field_revision + field: changed + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: changed + plugin_id: field + label: Revised + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: false + ellipsis: false + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: timestamp + settings: + date_format: medium + custom_date_format: '' + timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 + description: '' + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + updated: + id: updated + table: editoria11y_results + field: updated + relationship: editoria11y_results + group_type: group + admin_label: '' + plugin_id: date + label: 'Editoria11y scan date' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + date_format: medium + custom_date_format: '' + timezone: '' + pager: + type: mini + options: + offset: 0 + pagination_heading_level: h4 + items_per_page: 20 + total_pages: null + id: 0 + tags: + next: ›› + previous: ‹‹ + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: perm + options: + perm: 'view all revisions' + cache: + type: tag + options: { } + empty: { } + sorts: + nid: + id: nid + table: node_field_data + field: nid + relationship: nid + group_type: group + admin_label: '' + entity_type: node + entity_field: nid + plugin_id: standard + order: ASC + expose: + label: '' + field_identifier: '' + exposed: false + arguments: { } + filters: + status: + id: status + table: node_field_revision + field: status + entity_type: node + entity_field: status + plugin_id: boolean + value: '1' + group: 1 + expose: + operator: '' + latest_revision: + id: latest_revision + table: node_revision + field: latest_revision + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: latest_revision + operator: '=' + value: '' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + style: + type: table + row: + type: fields + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: true + disable_automatic_base_fields: false + replica: false + query_tags: { } + relationships: + nid: + id: nid + table: node_field_revision + field: nid + relationship: none + group_type: group + admin_label: nid + entity_type: node + entity_field: nid + plugin_id: standard + required: true + editoria11y_results: + id: editoria11y_results + table: node_field_revision + field: editoria11y_results + relationship: nid + group_type: group + admin_label: 'Editoria11y results' + entity_type: node + plugin_id: standard + required: true + group_by: true + header: { } + footer: { } + display_extenders: + metatag_display_extender: + metatags: { } + tokenize: false + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } + page_1: + id: page_1 + display_title: Page + display_plugin: page + position: 1 + display_options: + display_extenders: + metatag_display_extender: + metatags: { } + tokenize: false + path: admin/report/accessibility-report-for-authors-using-revision + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } diff --git a/docroot/modules/custom/mass_admin_pages/mass_admin_pages.module b/docroot/modules/custom/mass_admin_pages/mass_admin_pages.module index 4836d6c5d3..d4fafd2189 100644 --- a/docroot/modules/custom/mass_admin_pages/mass_admin_pages.module +++ b/docroot/modules/custom/mass_admin_pages/mass_admin_pages.module @@ -159,10 +159,34 @@ function mass_admin_pages_form_node_service_page_edit_form_alter(&$form, &$form_ * Implements hook_views_data_alter(). */ function mass_admin_pages_views_data_alter(array &$data) { - $data['editoria11y_results']['entity_id']['relationship'] = [ - 'base' => 'node_field_data', - 'base field' => 'nid', - 'id' => 'standard', - 'label' => t('Entity ID'), - ]; + // 1) Keep your original relationship: results -> node. + if (isset($data['editoria11y_results']['entity_id'])) { + $data['editoria11y_results']['entity_id']['relationship'] = [ + 'base' => 'node_field_data', // Join TO this table… + 'base field' => 'nid', // …using node_field_data.nid + 'id' => 'standard', + 'label' => t('Node'), + 'title' => t('Node'), + 'help' => t('The node this Editoria11y result belongs to.'), + ]; + } + + // 2) NEW: node revisions -> editoria11y_results. + if (isset($data['node_field_revision'])) { + $data['node_field_revision']['editoria11y_results'] = [ + 'title' => t('Editoria11y results'), + 'help' => t('Editoria11y test results for this node.'), + 'relationship' => [ + 'id' => 'standard', + // Table we are joining TO. + 'base' => 'editoria11y_results', + // Column on editoria11y_results. + 'base field' => 'entity_id', + // Column on node_field_revision we join FROM. + 'field' => 'nid', + 'label' => t('Editoria11y results'), + 'help' => t('Join node revisions to Editoria11y results by nid.'), + ], + ]; + } } From 30f1f366a829324430890c538ce70fc2e826a8be Mon Sep 17 00:00:00 2001 From: Joe Galluccio Date: Thu, 11 Dec 2025 15:47:24 -0500 Subject: [PATCH 2/4] view changes --- ...lity_report_for_authors_using_revision.yml | 326 +++++++++++++++++- 1 file changed, 324 insertions(+), 2 deletions(-) diff --git a/conf/drupal/config/views.view.accessibility_report_for_authors_using_revision.yml b/conf/drupal/config/views.view.accessibility_report_for_authors_using_revision.yml index 91094b4b10..380fae8b8a 100644 --- a/conf/drupal/config/views.view.accessibility_report_for_authors_using_revision.yml +++ b/conf/drupal/config/views.view.accessibility_report_for_authors_using_revision.yml @@ -218,6 +218,71 @@ display: multi_type: separator separator: ', ' field_api_classes: false + type: + id: type + table: node_field_data + field: type + relationship: nid + group_type: group + admin_label: '' + entity_type: node + entity_field: type + plugin_id: field + label: 'Content type' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: target_id + type: entity_reference_label + settings: + link: false + group_column: target_id + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false page_result_count: id: page_result_count table: editoria11y_results @@ -329,7 +394,7 @@ display: click_sort_column: value type: timestamp settings: - date_format: medium + date_format: short custom_date_format: '' timezone: '' tooltip: @@ -401,9 +466,74 @@ display: hide_empty: false empty_zero: false hide_alter_empty: true - date_format: medium + date_format: short custom_date_format: '' timezone: '' + name: + id: name + table: users_field_data + field: name + relationship: uid + group_type: group + admin_label: '' + entity_type: user + entity_field: name + plugin_id: field + label: 'Revised by' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: user_name + settings: + link_to_entity: false + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false pager: type: mini options: @@ -509,6 +639,185 @@ display: default_group: All default_group_multiple: { } group_items: { } + field_organizations_target_id: + id: field_organizations_target_id + table: node__field_organizations + field: field_organizations_target_id + relationship: nid + group_type: group + admin_label: '' + plugin_id: numeric + operator: '=' + value: + min: '' + max: '' + value: '' + group: 1 + exposed: true + expose: + operator_id: field_organizations_target_id_op + label: Organization(s) + description: '' + use_operator: false + operator: field_organizations_target_id_op + operator_limit_selection: false + operator_list: { } + identifier: field_organizations_target_id + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + author: '0' + editor: '0' + emergency_alert_publisher: '0' + executive_orders: '0' + redirect_creators: '0' + content_team: '0' + developer: '0' + administrator: '0' + tester: '0' + doc_deletion: '0' + d2d_redirect_manager: '0' + data_administrator: '0' + collection_administrator: '0' + prototype_design_access: '0' + mmg_editor: '0' + viewer: '0' + bulk_edit: '0' + min_placeholder: '' + max_placeholder: '' + placeholder: '' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + status_1: + id: status_1 + table: node_field_data + field: status + relationship: nid + group_type: group + admin_label: '' + entity_type: node + entity_field: status + plugin_id: boolean + operator: '=' + value: All + group: 1 + exposed: true + expose: + operator_id: '' + label: 'Published status' + description: '' + use_operator: false + operator: status_1_op + operator_limit_selection: false + operator_list: { } + identifier: status_1 + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + author: '0' + editor: '0' + emergency_alert_publisher: '0' + executive_orders: '0' + redirect_creators: '0' + content_team: '0' + developer: '0' + administrator: '0' + tester: '0' + doc_deletion: '0' + d2d_redirect_manager: '0' + data_administrator: '0' + collection_administrator: '0' + prototype_design_access: '0' + mmg_editor: '0' + viewer: '0' + bulk_edit: '0' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + uid: + id: uid + table: users_field_data + field: uid + relationship: uid + group_type: group + admin_label: '' + entity_type: user + entity_field: uid + plugin_id: user_name + operator: in + value: { } + group: 1 + exposed: true + expose: + operator_id: uid_op + label: 'Revised by' + description: '' + use_operator: false + operator: uid_op + operator_limit_selection: false + operator_list: { } + identifier: uid + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + author: '0' + editor: '0' + emergency_alert_publisher: '0' + executive_orders: '0' + redirect_creators: '0' + content_team: '0' + developer: '0' + administrator: '0' + tester: '0' + doc_deletion: '0' + d2d_redirect_manager: '0' + data_administrator: '0' + collection_administrator: '0' + prototype_design_access: '0' + mmg_editor: '0' + viewer: '0' + bulk_edit: '0' + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } style: type: table row: @@ -544,6 +853,17 @@ display: entity_type: node plugin_id: standard required: true + uid: + id: uid + table: node_field_revision + field: uid + relationship: none + group_type: group + admin_label: User + entity_type: node + entity_field: uid + plugin_id: standard + required: false group_by: true header: { } footer: { } @@ -556,6 +876,7 @@ display: contexts: - 'languages:language_content' - 'languages:language_interface' + - url - url.query_args - 'user.node_grants:view' - user.permissions @@ -576,6 +897,7 @@ display: contexts: - 'languages:language_content' - 'languages:language_interface' + - url - url.query_args - 'user.node_grants:view' - user.permissions From 8bcdb8b58a87811075d6998409360065e417d29e Mon Sep 17 00:00:00 2001 From: Joe Galluccio Date: Thu, 11 Dec 2025 16:08:49 -0500 Subject: [PATCH 3/4] more view changes --- ...lity_report_for_authors_using_revision.yml | 523 ++++++++++++++---- 1 file changed, 427 insertions(+), 96 deletions(-) diff --git a/conf/drupal/config/views.view.accessibility_report_for_authors_using_revision.yml b/conf/drupal/config/views.view.accessibility_report_for_authors_using_revision.yml index 380fae8b8a..44fa6030c4 100644 --- a/conf/drupal/config/views.view.accessibility_report_for_authors_using_revision.yml +++ b/conf/drupal/config/views.view.accessibility_report_for_authors_using_revision.yml @@ -4,6 +4,8 @@ status: true dependencies: module: - editoria11y + - mass_bigquery + - mass_views - node - user id: accessibility_report_for_authors_using_revision @@ -153,17 +155,17 @@ display: multi_type: separator separator: ', ' field_api_classes: false - title_1: - id: title_1 - table: node_field_revision - field: title - relationship: none + type: + id: type + table: node_field_data + field: type + relationship: nid group_type: group admin_label: '' entity_type: node - entity_field: title + entity_field: type plugin_id: field - label: Title + label: 'Content type' exclude: false alter: alter_text: false @@ -204,11 +206,11 @@ display: hide_empty: false empty_zero: false hide_alter_empty: true - click_sort_column: value - type: string + click_sort_column: target_id + type: entity_reference_label settings: - link_to_entity: false - group_column: value + link: false + group_column: target_id group_columns: { } group_rows: true delta_limit: 0 @@ -218,17 +220,17 @@ display: multi_type: separator separator: ', ' field_api_classes: false - type: - id: type - table: node_field_data - field: type - relationship: nid + changed: + id: changed + table: node_field_revision + field: changed + relationship: none group_type: group admin_label: '' entity_type: node - entity_field: type + entity_field: changed plugin_id: field - label: 'Content type' + label: Revised exclude: false alter: alter_text: false @@ -248,8 +250,8 @@ display: target: '' nl2br: false max_length: 0 - word_boundary: true - ellipsis: true + word_boundary: false + ellipsis: false more_link: false more_link_text: '' more_link_path: '' @@ -269,11 +271,23 @@ display: hide_empty: false empty_zero: false hide_alter_empty: true - click_sort_column: target_id - type: entity_reference_label + click_sort_column: value + type: timestamp settings: - link: false - group_column: target_id + date_format: short + custom_date_format: '' + timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 + description: '' + group_column: value group_columns: { } group_rows: true delta_limit: 0 @@ -283,15 +297,15 @@ display: multi_type: separator separator: ', ' field_api_classes: false - page_result_count: - id: page_result_count + updated: + id: updated table: editoria11y_results - field: page_result_count + field: updated relationship: editoria11y_results - group_type: sum + group_type: group admin_label: '' - plugin_id: editoria11y_issues_by_page_link - label: 'Page result count' + plugin_id: date + label: 'Accessibility scan date' exclude: false alter: alter_text: false @@ -332,25 +346,20 @@ display: hide_empty: false empty_zero: false hide_alter_empty: true - set_precision: false - precision: 0 - decimal: . - separator: ',' - format_plural: 0 - format_plural_string: !!binary MQNAY291bnQ= - prefix: '' - suffix: '' - changed: - id: changed - table: node_field_revision - field: changed - relationship: none + date_format: short + custom_date_format: '' + timezone: '' + name: + id: name + table: users_field_data + field: name + relationship: uid group_type: group admin_label: '' - entity_type: node - entity_field: changed + entity_type: user + entity_field: name plugin_id: field - label: Revised + label: 'Revised by' exclude: false alter: alter_text: false @@ -370,8 +379,8 @@ display: target: '' nl2br: false max_length: 0 - word_boundary: false - ellipsis: false + word_boundary: true + ellipsis: true more_link: false more_link_text: '' more_link_path: '' @@ -392,21 +401,9 @@ display: empty_zero: false hide_alter_empty: true click_sort_column: value - type: timestamp + type: user_name settings: - date_format: short - custom_date_format: '' - timezone: '' - tooltip: - date_format: '' - custom_date_format: '' - time_diff: - enabled: false - future_format: '@interval hence' - past_format: '@interval ago' - granularity: 2 - refresh: 60 - description: '' + link_to_entity: false group_column: value group_columns: { } group_rows: true @@ -417,15 +414,15 @@ display: multi_type: separator separator: ', ' field_api_classes: false - updated: - id: updated + page_result_count: + id: page_result_count table: editoria11y_results - field: updated + field: page_result_count relationship: editoria11y_results - group_type: group + group_type: sum admin_label: '' - plugin_id: date - label: 'Editoria11y scan date' + plugin_id: editoria11y_issues_by_page_link + label: 'Issue count' exclude: false alter: alter_text: false @@ -466,20 +463,23 @@ display: hide_empty: false empty_zero: false hide_alter_empty: true - date_format: short - custom_date_format: '' - timezone: '' - name: - id: name - table: users_field_data - field: name - relationship: uid + set_precision: false + precision: 0 + decimal: . + separator: ',' + format_plural: 0 + format_plural_string: !!binary MQNAY291bnQ= + prefix: '' + suffix: '' + pageviews: + id: pageviews + table: mass_bigquery_data + field: pageviews + relationship: nid group_type: group admin_label: '' - entity_type: user - entity_field: name - plugin_id: field - label: 'Revised by' + plugin_id: numeric + label: 'Page views' exclude: false alter: alter_text: false @@ -520,20 +520,14 @@ display: hide_empty: false empty_zero: false hide_alter_empty: true - click_sort_column: value - type: user_name - settings: - link_to_entity: false - group_column: value - group_columns: { } - group_rows: true - delta_limit: 0 - delta_offset: 0 - delta_reversed: false - delta_first_last: false - multi_type: separator - separator: ', ' - field_api_classes: false + set_precision: false + precision: 0 + decimal: . + separator: ',' + format_plural: false + format_plural_string: !!binary MQNAY291bnQ= + prefix: '' + suffix: '' pager: type: mini options: @@ -656,7 +650,7 @@ display: exposed: true expose: operator_id: field_organizations_target_id_op - label: Organization(s) + label: 'Organization (direct match)' description: '' use_operator: false operator: field_organizations_target_id_op @@ -818,8 +812,335 @@ display: default_group: All default_group_multiple: { } group_items: { } + result_name: + id: result_name + table: editoria11y_results + field: result_name + relationship: editoria11y_results + group_type: group + admin_label: '' + plugin_id: in_operator + operator: in + value: { } + group: 1 + exposed: true + expose: + operator_id: result_name_op + label: 'Issue type' + description: '' + use_operator: true + operator: result_name_op + operator_limit_selection: false + operator_list: { } + identifier: result_name + required: false + remember: false + multiple: true + remember_roles: + authenticated: authenticated + anonymous: '0' + author: '0' + editor: '0' + emergency_alert_publisher: '0' + executive_orders: '0' + redirect_creators: '0' + content_team: '0' + developer: '0' + administrator: '0' + tester: '0' + doc_deletion: '0' + d2d_redirect_manager: '0' + data_administrator: '0' + collection_administrator: '0' + prototype_design_access: '0' + mmg_editor: '0' + viewer: '0' + bulk_edit: '0' + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + updated: + id: updated + table: editoria11y_results + field: updated + relationship: editoria11y_results + group_type: group + admin_label: '' + plugin_id: date + operator: '>=' + value: + min: '' + max: '' + value: '' + type: date + group: 1 + exposed: true + expose: + operator_id: updated_op + label: 'Editoria11y scan date' + description: 'CCYY-MM-DD HH:MM:SS' + use_operator: true + operator: updated_op + operator_limit_selection: true + operator_list: + '<=': '<=' + '>=': '>=' + between: between + 'not between': 'not between' + identifier: scandate + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + author: '0' + editor: '0' + emergency_alert_publisher: '0' + executive_orders: '0' + redirect_creators: '0' + content_team: '0' + developer: '0' + administrator: '0' + tester: '0' + doc_deletion: '0' + d2d_redirect_manager: '0' + data_administrator: '0' + collection_administrator: '0' + prototype_design_access: '0' + mmg_editor: '0' + viewer: '0' + bulk_edit: '0' + min_placeholder: '' + max_placeholder: '' + placeholder: '' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + changed: + id: changed + table: node_field_revision + field: changed + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: changed + plugin_id: date + operator: '>=' + value: + min: '' + max: '' + value: '' + type: date + group: 1 + exposed: true + expose: + operator_id: changed_op + label: 'Last modified' + description: 'CCYY-MM-DD HH:MM:SS' + use_operator: true + operator: changed_op + operator_limit_selection: true + operator_list: + '<=': '<=' + '>=': '>=' + between: between + 'not between': 'not between' + identifier: revchanged + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + author: '0' + editor: '0' + emergency_alert_publisher: '0' + executive_orders: '0' + redirect_creators: '0' + content_team: '0' + developer: '0' + administrator: '0' + tester: '0' + doc_deletion: '0' + d2d_redirect_manager: '0' + data_administrator: '0' + collection_administrator: '0' + prototype_design_access: '0' + mmg_editor: '0' + viewer: '0' + bulk_edit: '0' + min_placeholder: '' + max_placeholder: '' + placeholder: '' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + node_parent_org_top_filter: + id: node_parent_org_top_filter + table: node_field_data + field: node_parent_org_top_filter + relationship: nid + group_type: group + admin_label: '' + entity_type: node + plugin_id: mass_views_node_org_top_parent_filter + operator: '=' + value: null + group: 1 + exposed: true + expose: + operator_id: node_parent_org_top_filter_op + label: 'Organization (including all suborganizations)' + description: '' + use_operator: false + operator: node_parent_org_top_filter_op + operator_limit_selection: false + operator_list: { } + identifier: node_parent_org_top_filter + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + author: '0' + editor: '0' + emergency_alert_publisher: '0' + executive_orders: '0' + redirect_creators: '0' + content_team: '0' + developer: '0' + administrator: '0' + tester: '0' + doc_deletion: '0' + d2d_redirect_manager: '0' + data_administrator: '0' + collection_administrator: '0' + prototype_design_access: '0' + mmg_editor: '0' + viewer: '0' + bulk_edit: '0' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } style: type: table + options: + grouping: { } + row_class: '' + default_row_class: true + columns: + nid: nid + title: title + type: type + changed: changed + updated: updated + name: name + page_result_count: page_result_count + pageviews: pageviews + default: pageviews + info: + nid: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + title: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + type: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + changed: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + updated: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + name: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + page_result_count: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + pageviews: + sortable: true + default_sort_order: desc + align: '' + separator: '' + empty_column: false + responsive: '' + override: true + sticky: false + summary: '' + empty_table: false + caption: '' + description: '' row: type: fields query: @@ -866,7 +1187,17 @@ display: required: false group_by: true header: { } - footer: { } + footer: + result: + id: result + table: views + field: result + relationship: none + group_type: group + admin_label: '' + plugin_id: result + empty: false + content: 'Displaying @start - @end of @total' display_extenders: metatag_display_extender: metatags: { } From 65929728ae63299f799a6a489af9cba76e46d479 Mon Sep 17 00:00:00 2001 From: Joe Galluccio Date: Thu, 11 Dec 2025 19:28:41 -0500 Subject: [PATCH 4/4] view changes, help text on original view, style adjustments --- ....view.accessibility_report_for_authors.yml | 105 ++++++++- ...lity_report_for_authors_using_revision.yml | 208 +++++++++--------- .../mass_admin_theme/css/components/views.css | 6 +- 3 files changed, 207 insertions(+), 112 deletions(-) diff --git a/conf/drupal/config/views.view.accessibility_report_for_authors.yml b/conf/drupal/config/views.view.accessibility_report_for_authors.yml index e8a6d03385..3de0fc1b0e 100644 --- a/conf/drupal/config/views.view.accessibility_report_for_authors.yml +++ b/conf/drupal/config/views.view.accessibility_report_for_authors.yml @@ -3,6 +3,7 @@ langcode: en status: true dependencies: config: + - field.storage.node.field_organizations - taxonomy.vocabulary.label module: - csv_serialization @@ -402,7 +403,7 @@ display: click_sort_column: value type: timestamp settings: - date_format: short_date_only + date_format: short custom_date_format: '' timezone: '' tooltip: @@ -604,6 +605,69 @@ display: format_plural_string: !!binary MQNAY291bnQ= prefix: '' suffix: '' + field_organizations: + id: field_organizations + table: node__field_organizations + field: field_organizations + relationship: entity_id + group_type: group + admin_label: '' + plugin_id: field + label: Organization(s) + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: target_id + type: entity_reference_label + settings: + link: false + group_column: target_id + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false pager: type: mini options: @@ -654,15 +718,17 @@ display: empty: true title: 'No known issues at this url' sorts: - result_name_count: - id: result_name_count - table: editoria11y_results - field: result_name_count - relationship: none - group_type: sum + nid: + id: nid + table: node_field_data + field: nid + relationship: entity_id + group_type: group admin_label: '' + entity_type: node + entity_field: nid plugin_id: standard - order: DESC + order: ASC expose: label: '' field_identifier: '' @@ -1102,7 +1168,7 @@ display: table: node_field_data field: changed relationship: entity_id - group_type: group + group_type: max admin_label: '' entity_type: node entity_field: changed @@ -1369,7 +1435,20 @@ display: use_more_text: 'All pages with issues' link_display: pages__page link_url: '' - header: { } + header: + area: + id: area + table: views + field: area + relationship: none + group_type: group + admin_label: '' + plugin_id: text + empty: true + content: + value: "

Caution: this data is based on real-time scans done when authors view pages while editing on edit.mass.gov. It should not be considered a complete report for the following reasons.

\r\n
    \r\n
  • Authors are able edit pages in a way that they never view the page after the edit. If they don't view it, it isn't checked.
  • \r\n
  • If Editoria11y finds no issue on a page, it stores nothing. In the data model, there is no way to tell the difference between a page that has no issues and a page that was never checked.
  • \r\n
  • If a page was not viewed by a logged-in author on edit.mass.gov after the Editoria11y feature was released 2/5/2024, it will not appear on the report.
  • \r\n
\r\n

Consider using SiteImprove data for reports. It crawls all author created pages that are not hidden from search with the exception of news and events.

\r\n" + format: basic_html + tokenize: false footer: result: id: result @@ -1393,7 +1472,8 @@ display: - url - url.query_args - user.permissions - tags: { } + tags: + - 'config:field.storage.node.field_organizations' data_export_1: id: data_export_1 display_title: 'Data export' @@ -2092,4 +2172,5 @@ display: - url - url.query_args - user.permissions - tags: { } + tags: + - 'config:field.storage.node.field_organizations' diff --git a/conf/drupal/config/views.view.accessibility_report_for_authors_using_revision.yml b/conf/drupal/config/views.view.accessibility_report_for_authors_using_revision.yml index 44fa6030c4..4e09d74e7c 100644 --- a/conf/drupal/config/views.view.accessibility_report_for_authors_using_revision.yml +++ b/conf/drupal/config/views.view.accessibility_report_for_authors_using_revision.yml @@ -22,7 +22,7 @@ display: display_plugin: default position: 0 display_options: - title: 'Accessibility report for authors using revision' + title: 'Accessibility report for authors based on latest content revision' fields: nid: id: nid @@ -583,44 +583,51 @@ display: exposed: false arguments: { } filters: - status: - id: status - table: node_field_revision - field: status - entity_type: node - entity_field: status - plugin_id: boolean - value: '1' - group: 1 - expose: - operator: '' - latest_revision: - id: latest_revision - table: node_revision - field: latest_revision - relationship: none + node_org_filter: + id: node_org_filter + table: node_field_data + field: node_org_filter + relationship: nid group_type: group admin_label: '' entity_type: node - plugin_id: latest_revision + plugin_id: mass_views_node_org_filter operator: '=' - value: '' + value: null group: 1 - exposed: false + exposed: true expose: - operator_id: '' - label: '' + operator_id: node_org_filter_op + label: 'Organization (direct match)' description: '' use_operator: false - operator: '' + operator: node_org_filter_op operator_limit_selection: false operator_list: { } - identifier: '' + identifier: node_org_filter required: false remember: false multiple: false remember_roles: authenticated: authenticated + anonymous: '0' + author: '0' + editor: '0' + emergency_alert_publisher: '0' + executive_orders: '0' + redirect_creators: '0' + content_team: '0' + developer: '0' + administrator: '0' + tester: '0' + doc_deletion: '0' + d2d_redirect_manager: '0' + data_administrator: '0' + collection_administrator: '0' + prototype_design_access: '0' + mmg_editor: '0' + viewer: '0' + bulk_edit: '0' is_grouped: false group_info: label: '' @@ -633,30 +640,28 @@ display: default_group: All default_group_multiple: { } group_items: { } - field_organizations_target_id: - id: field_organizations_target_id - table: node__field_organizations - field: field_organizations_target_id + node_parent_org_top_filter: + id: node_parent_org_top_filter + table: node_field_data + field: node_parent_org_top_filter relationship: nid group_type: group admin_label: '' - plugin_id: numeric + entity_type: node + plugin_id: mass_views_node_org_top_parent_filter operator: '=' - value: - min: '' - max: '' - value: '' + value: null group: 1 exposed: true expose: - operator_id: field_organizations_target_id_op - label: 'Organization (direct match)' + operator_id: node_parent_org_top_filter_op + label: 'Organization (including all suborganizations)' description: '' use_operator: false - operator: field_organizations_target_id_op + operator: node_parent_org_top_filter_op operator_limit_selection: false operator_list: { } - identifier: field_organizations_target_id + identifier: node_parent_org_top_filter required: false remember: false multiple: false @@ -680,9 +685,56 @@ display: mmg_editor: '0' viewer: '0' bulk_edit: '0' - min_placeholder: '' - max_placeholder: '' - placeholder: '' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + status: + id: status + table: node_field_revision + field: status + entity_type: node + entity_field: status + plugin_id: boolean + value: '1' + group: 1 + expose: + operator: '' + latest_revision: + id: latest_revision + table: node_revision + field: latest_revision + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: latest_revision + operator: '=' + value: '' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated is_grouped: false group_info: label: '' @@ -1005,63 +1057,10 @@ display: default_group: All default_group_multiple: { } group_items: { } - node_parent_org_top_filter: - id: node_parent_org_top_filter - table: node_field_data - field: node_parent_org_top_filter - relationship: nid - group_type: group - admin_label: '' - entity_type: node - plugin_id: mass_views_node_org_top_parent_filter - operator: '=' - value: null - group: 1 - exposed: true - expose: - operator_id: node_parent_org_top_filter_op - label: 'Organization (including all suborganizations)' - description: '' - use_operator: false - operator: node_parent_org_top_filter_op - operator_limit_selection: false - operator_list: { } - identifier: node_parent_org_top_filter - required: false - remember: false - multiple: false - remember_roles: - authenticated: authenticated - anonymous: '0' - author: '0' - editor: '0' - emergency_alert_publisher: '0' - executive_orders: '0' - redirect_creators: '0' - content_team: '0' - developer: '0' - administrator: '0' - tester: '0' - doc_deletion: '0' - d2d_redirect_manager: '0' - data_administrator: '0' - collection_administrator: '0' - prototype_design_access: '0' - mmg_editor: '0' - viewer: '0' - bulk_edit: '0' - is_grouped: false - group_info: - label: '' - description: '' - identifier: '' - optional: true - widget: select - multiple: false - remember: false - default_group: All - default_group_multiple: { } - group_items: { } + filter_groups: + operator: AND + groups: + 1: AND style: type: table options: @@ -1186,7 +1185,20 @@ display: plugin_id: standard required: false group_by: true - header: { } + header: + area: + id: area + table: views + field: area + relationship: none + group_type: group + admin_label: '' + plugin_id: text + empty: false + content: + value: "

Caution: this data is based on real-time scans done when authors view pages while editing on edit.mass.gov. It should not be considered a complete report for the following reasons.

\r\n
    \r\n
  • Authors are able edit pages in a way that they never view the page after the edit. If they don't view it, it isn't checked.
  • \r\n
  • If Editoria11y finds no issue on a page, it stores nothing. In the data model, there is no way to tell the difference between a page that has no issues and a page that was never checked.
  • \r\n
  • If a page was not viewed by a logged-in author on edit.mass.gov after the Editoria11y feature was released 2/5/2024, it will not appear on the report.
  • \r\n
\r\n

Consider using SiteImprove data for reports. It crawls all author created pages that are not hidden from search with the exception of news and events.

\r\n" + format: basic_html + tokenize: false footer: result: id: result diff --git a/docroot/themes/custom/mass_admin_theme/css/components/views.css b/docroot/themes/custom/mass_admin_theme/css/components/views.css index 37ea4d189a..2cfde4f8af 100644 --- a/docroot/themes/custom/mass_admin_theme/css/components/views.css +++ b/docroot/themes/custom/mass_admin_theme/css/components/views.css @@ -40,11 +40,13 @@ .view-accessibility-report-for-authors .js-form-item-result-name { flex: 1 1 30rem; } -.view-accessibility-report-for-authors .js-form-item-result-name .select2-container { +.view-accessibility-report-for-authors .js-form-item-result-name .select2-container, +.view-accessibility-report-for-authors-using-revision .js-form-item-result-name { min-width: 30rem; width: 100%; } -.view-accessibility-report-for-authors .js-form-item-result-name select { +.view-accessibility-report-for-authors .js-form-item-result-name select, +.view-accessibility-report-for-authors-using-revision .js-form-item-result-name .select2-container { min-width: 30rem; width: 100%; }