Skip to content

Commit

Permalink
Form flow view and impression notes added, Workbox updated, Opcache D…
Browse files Browse the repository at this point in the history
…ev Metabox check, CF7 invalid order fix
  • Loading branch information
chrisblakley committed May 7, 2024
1 parent 8f27d1b commit e9a8b8f
Show file tree
Hide file tree
Showing 16 changed files with 60 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nebula-wp",
"title": "Nebula",
"description": "Advanced Starter WordPress Theme for Developers",
"version": "12.0.1.008",
"version": "12.0.7.435",
"homepage": "https://gearside.com/nebula/",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion Nebula-Child/assets/css/admin.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Nebula-Child/resources/sw.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
//BEGIN automated edits. These will be automatically overwritten.
const THEME_NAME = 'nebula-child';
const NEBULA_VERSION = 'v12.0.1.008'; //Wednesday, May 1, 2024 12:12:13 AM
const NEBULA_VERSION = 'v12.0.7.435'; //Tuesday, May 7, 2024 10:26:15 AM
const OFFLINE_URL = 'https://nebula.gearside.com/offline/';
const OFFLINE_IMG = 'https://nebula.gearside.com/wp-content/themes/Nebula-main/assets/img/offline.svg';
const META_ICON = 'https://nebula.gearside.com/wp-content/themes/Nebula-main/assets/img/meta/android-chrome-512x512.png';
const MANIFEST = 'https://nebula.gearside.com/wp-content/themes/Nebula-main/inc/manifest.json';
const HOME_URL = 'https://nebula.gearside.com/';
//END automated edits

importScripts('https://cdn.jsdelivr.net/npm/workbox-sw@7.0.0/build/workbox-sw.min.js'); //DO NOT FORGET: Update Workbox Window in the optimization.js module!
importScripts('https://cdn.jsdelivr.net/npm/workbox-sw@7.1.0/build/workbox-sw.min.js'); //DO NOT FORGET: Update Workbox Window in the optimization.js module!
workbox.setConfig({debug: false}); //https://developers.google.com/web/tools/workbox/guides/troubleshoot-and-debug
//The Service Worker console can be inspected by visiting chrome://inspect/#service-workers

Expand Down
4 changes: 2 additions & 2 deletions Nebula-Child/style.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions assets/css/admin.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/critical.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/login.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/css/pre.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion assets/js/modules/forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ nebula.cf7Functions = async function(){
return false;
}

//Indicate a form page on all CF7 forms
jQuery('.wpcf7').each(function(){
let formID = jQuery(this).attr('id');
nebula.updateFormFlow(formID, '[Form Page View]');
});

jQuery('.wpcf7-form p:empty').remove(); //Remove empty <p> tags within CF7 forms

let formStarted = {};
Expand All @@ -22,15 +28,19 @@ nebula.cf7Functions = async function(){
let cf7Observer = new IntersectionObserver(function(entries){
entries.forEach(function(entry){
if ( entry.intersectionRatio > 0 ){
let formID = jQuery(entry.target).closest('.wpcf7').attr('id') || jQuery(entry.target).attr('id');

let thisEvent = {
event_name: 'cf7_form_impression',
event_category: 'CF7 Form',
event_action: 'Impression',
event_label: jQuery(entry.target).closest('.wpcf7').attr('id') || jQuery(entry.target).attr('id'),
form_id: jQuery(entry.target).closest('.wpcf7').attr('id') || jQuery(entry.target).attr('id'),
form_id: formID,
non_interaction: true
};

thisEvent.form_flow = nebula.updateFormFlow(formID, '[Impression]');

nebula.dom.document.trigger('nebula_event', thisEvent);
if ( typeof gaEventObject === 'function' ){ //If the page is loaded pre-scrolled this may not be available for the very first intersection
gtag('event', thisEvent.event_name, nebula.gaEventObject(thisEvent));
Expand Down Expand Up @@ -449,6 +459,10 @@ nebula.updateFormFlow = function(formID, field, info = ''){
nebula.formFlow = {};
}

if ( !formID ){
return false;
}

if ( info !== '' ){
if ( info.length > 25 ){
info = info.substring(0, 25) + '...'; //Truncate long info text
Expand Down
2 changes: 1 addition & 1 deletion assets/js/modules/optimization.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ nebula.workbox = async function(){
window.performance.mark('(Nebula) SW Registration [Start]');

//Dynamically import Workbox-Window
import('https://cdn.jsdelivr.net/npm/workbox-window@7.0.0/build/workbox-window.prod.mjs').then(async function(module){
import('https://cdn.jsdelivr.net/npm/workbox-window@7.1.0/build/workbox-window.prod.mjs').then(async function(module){
const Workbox = module.Workbox;
const workbox = new Workbox(nebula.site.sw_url);

Expand Down
3 changes: 3 additions & 0 deletions assets/scss/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ th#id {width: 50px;}

//Dev Metabox
#nebula_developer_info {
.highlight-good {color: $success_color;}
.highlight-bad {color: $danger_color;}

.secured-connection {
i, svg {color: $success_color;}
}
Expand Down
Loading

0 comments on commit e9a8b8f

Please sign in to comment.