New York Senate Technical Services

nysenate.gov the website for the New York Senate strives to increase public participation in the legislative process. By facilitating efficient communication between individual New Yorkers and their senators.

Legislation

Implemented the Legislation section of the web site as the Law content type. Law pages are regularly synchronized with and mirror legislation.nysenate.gov the official system of record for nys laws.

Implemented the nys_statute module to display New York State Laws for the Law content type’s approximately 42000 pages.

Implemented the nys_statute_import module, a series of drush commands for managing and reporting on Law pages. The modules update-all-statutes command imports and updates pages in the Law content type.

Implemented the nys_statute_delete module to delete some or all Law pages before are re-importing and syncing. This is needed periodically to remove a whole law id because of a structural data changes.

Created the nys_statutes_feature drupal features module containing the configuration of the Law content type and its associated fields.

Schools

Implemented the School content type and a data importer for school data. School data is used in student submission forms.

Created the nys_schools drupal features module containing the configuration of the School content type and its associated fields.

Implemented the nys_school_importer module to import or update batches of schools into the School Content Type. The Source of the import is a set of .csv files. Senate district data on each school comes from the nys sage system.

Responsive Images

Implemented a sub system of modules and configuration that provides Adaptive Images and Lazy Loading, as well as Retina and webp enhanced images on supported web browsers.

Created the nys_pictures drupal features module which contains the configurations for the 175 Breakpoints, 18 Breakpoint Groups, 175 Image Styles and 18 Picture Mappings used by the Breakpoints and Picture modules for the 18 supported image sizes.

Implemented the nys_picture custom drupal module. The module contains commands that run each day looking for newly added webp images and converts them from jpeg or whatever format they are in to the webp format so they can be downloaded faster and reduce page loading time. The module also contains several reports and commands to identify and manage image files.

Created a Patch to add support for the images mime type in the html5 picture markup generated by the contributed Picture module.

Migration Research

Research on Drupal 8 migration requirements for the nysenate.gov site. Identified and documented available migration tools and methods in the nys wiki. Experimentally migrated nodes, field data and taxonomies.

Quality Initiatives

Removal of miscellaneous warnings.
Repeatedly repaired groups of warning and error messages emanating from nys custom drupal modules and theme templates. The sheer number of warning messages was diluting the ability to use the dblog to find more serious problems because of hundreds or thousands of duplicate warning messages.
The process used was to use the
workout and exerciser modules to load and render pages. This would create lots of error and warning messages. The grouper reporting module was then used to aggregate all the similar warning and error messages and to identify and repeat the most prevalent issues which were then repaired. The exerciser, workout and grouper modules were contributed by Seth Snyder to drupal.org for any drupal site to utilize (see below) in the issue identification process.

Elimination of duplicate url aliases
Developed set of sql commands to eliminate of duplicate url aliases which were making up 70% of the url alias table in the database.

Developed Modules or commands that that are diagnostic, reports or audit quality.
The audit-report command in the
nys_statute_import module is a set of seven reports about statutes. The audit-all-statutes command compares the quantity of laws of each Law ID between the 2 systems The identify command in the nys_picture module reports on property’s of image files like size etc.
The enhanced-styles-report command in the
nys_picture module reports on enhanced image styles. The enhanced-file-report command in the nys_picture module reports on style derivatives of images. The enhanced-styles-summary-report command in the nys_picture module reports on image types. The not-on-server command in the file_audit module reports Managed Files not on the server.
The not-in-db command in the file_audit module reports on files that are not Managed Files.
The statutes-report in the
nys_statute_import Compares the number of laws for each Law ID between the openly system of record and the nays web sites law pages. Differences are displayed.

Maintenance

Ongoing site development and maintenance on the nysenate.gov website.