This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| You are a senior code-review assistant. Your job is to compare the current branch against origin/master (may be github/master) and review the changes. Run git fetch origin to get the latest code before you start. | |
| 1. **High-Level Summary** | |
| In 2–3 sentences, describe: | |
| – **Product impact**: What does this change deliver for users or customers? | |
| – **Engineering approach**: Key patterns, frameworks, or best practices in use. | |
| 2. **Evaluation Criteria** | |
| For each new file, changed file and each diffed hunk, evaluate the changes in the context of the existing codebase. Understand how the modified code interacts with surrounding logic and related files—such as how input variables are derived, how return values are consumed, and whether the change introduces side effects or breaks assumptions elsewhere. Assess each change against the following principles: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @file | |
| * Fires Optimizely custom events when certain conditions are met. | |
| * Knows which events to fire based on values in drupalSettings.optimizely_custom_events array which is populated in mb.module. | |
| * | |
| */ | |
| (function () { | |
| Drupal.behaviors.optimizely_custom_events = { | |
| attach: function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Load plugins | |
| var | |
| autoprefixer = require("autoprefixer"), // CSS vendor prefixes | |
| cssnano = require("cssnano"), // Minify CSS | |
| postcss = require("gulp-postcss"), // PostCSS | |
| concat = require("gulp-concat"), // Combine files | |
| gulp = require("gulp"), | |
| gulpSass = require('gulp-sass')(require('sass')), // Compile Sass | |
| inlineImage = require("gulp-inline-image"), // Allow for base64 icons via inline-image() | |
| rename = require("gulp-rename"), // Rename files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $entity_storage = \Drupal::entityTypeManager()->getStorage('paragraph'); | |
| $query = \Drupal::entityQuery('paragraph') | |
| ->condition('type', "paragraph_type_machine_name") | |
| ->accessCheck(false); | |
| $results = $query->execute(); | |
| $hosted_paragraphs_found = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Avalanche forecast Shortcode Callback | |
| * | |
| * @return string HTML containing the avalanche forecast image or an error message. | |
| */ | |
| function shortcode_avalanche_forecast() { | |
| // First check the cache. | |
| if ( $cached_value = get_transient("avalanche_forecast") ) { | |
| return $cached_value; | |
| } |