From 62a1438df597c0e7cdd3c21884a470fa6101e84e Mon Sep 17 00:00:00 2001 From: cahdeemer Date: Thu, 23 May 2024 14:53:34 -0400 Subject: [PATCH 1/6] remove cutoff date from post block --- blocks/post/edit.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/blocks/post/edit.tsx b/blocks/post/edit.tsx index a9f6dac9..2ad22d18 100644 --- a/blocks/post/edit.tsx +++ b/blocks/post/edit.tsx @@ -78,9 +78,6 @@ export default function Edit({ [], ); - const cutoff = new Date(); - cutoff.setMonth(cutoff.getMonth() - 3); - // TODO: Pass template and allowed blocks from PHP so they can be filtered. const MY_TEMPLATE = [ ['wp-newsletter-builder/post-featured-image', {}], @@ -121,7 +118,7 @@ export default function Edit({ onUpdate={handleSelect} allowedTypes={allowedPostTypes} onReset={() => handleSelect(0)} - params={{ after: cutoff.toISOString(), per_page: 20 }} + params={{ per_page: 20 }} title={__('Please select a post', 'wp-newsletter-builder')} value={postId} // @ts-ignore From 11f4a57ad631a473ba083614de85ed34a9708f2e Mon Sep 17 00:00:00 2001 From: cahdeemer Date: Thu, 23 May 2024 15:19:59 -0400 Subject: [PATCH 2/6] use standard display for post picker results --- blocks/post/edit.tsx | 3 --- components/postPickerResult/index.scss | 1 - 2 files changed, 4 deletions(-) diff --git a/blocks/post/edit.tsx b/blocks/post/edit.tsx index 2ad22d18..39650c3c 100644 --- a/blocks/post/edit.tsx +++ b/blocks/post/edit.tsx @@ -21,7 +21,6 @@ import { */ import { useBlockProps, InspectorControls, InnerBlocks } from '@wordpress/block-editor'; -import PostPickerResult from '@/components/postPickerResult'; /** * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. * Those files can contain any CSS code that gets applied to the editor. @@ -121,8 +120,6 @@ export default function Edit({ params={{ per_page: 20 }} title={__('Please select a post', 'wp-newsletter-builder')} value={postId} - // @ts-ignore - searchRender={PostPickerResult} /> ) : null} diff --git a/components/postPickerResult/index.scss b/components/postPickerResult/index.scss index c171dea2..7f10875a 100644 --- a/components/postPickerResult/index.scss +++ b/components/postPickerResult/index.scss @@ -2,7 +2,6 @@ .alley-scripts-post-picker__post-list .alley-scripts-post-picker__post { height: auto; padding: 0 5px 0 0; - width: 99%; } .nb-post-picker-result { From fc377ef469e4beea3bb406032be9e7777cb48935 Mon Sep 17 00:00:00 2001 From: cahdeemer Date: Thu, 23 May 2024 15:29:53 -0400 Subject: [PATCH 3/6] fix list item styles --- blocks/post/style.scss | 4 ++++ scss/core-blocks/list.scss | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/blocks/post/style.scss b/blocks/post/style.scss index 458df710..61dc69df 100644 --- a/blocks/post/style.scss +++ b/blocks/post/style.scss @@ -63,4 +63,8 @@ table { width: 100%; } + + li { + font-size: 16px; + } } diff --git a/scss/core-blocks/list.scss b/scss/core-blocks/list.scss index b287103d..42380f84 100644 --- a/scss/core-blocks/list.scss +++ b/scss/core-blocks/list.scss @@ -1,3 +1,4 @@ li { - font-family: Geogria, serif; + font-family: Georgia, serif; + font-size: 16px; } From 6beffdee62ebcc36c972f33acc4b68ab9e7d2a8f Mon Sep 17 00:00:00 2001 From: cahdeemer Date: Thu, 23 May 2024 15:46:48 -0400 Subject: [PATCH 4/6] remove ad fields from email types --- src/class-email-types.php | 50 --------------------------------------- 1 file changed, 50 deletions(-) diff --git a/src/class-email-types.php b/src/class-email-types.php index acbff76b..7ade1d7c 100644 --- a/src/class-email-types.php +++ b/src/class-email-types.php @@ -92,56 +92,6 @@ public function presave( $value, $current_value = [] ) { 'options' => $from_names, ] ), - 'safe_rtb' => new \Fieldmanager_TextArea( - [ - 'label' => __( 'SafeRTB Ad Tag', 'wp-newsletter-builder' ), - 'sanitize' => function ( $value ) { - return $value; - }, - ], - ), - 'ad_tags' => new \Fieldmanager_Group( - [ - 'label' => __( 'Tags', 'wp-newsletter-builder' ), - 'children' => [ - 'tag_code' => new \Fieldmanager_TextArea( - [ - 'label' => __( 'Ad Tag', 'wp-newsletter-builder' ), - 'sanitize' => function ( $value ) { - return $value; - }, - ], - ), - ], - 'limit' => 0, - 'add_more_label' => __( 'Add another tag', 'wp-newsletter-builder' ), - ] - ), - 'roadblock' => new \Fieldmanager_Checkbox( - [ - 'label' => __( 'Enable Ad Roadblock', 'wp-newsletter-builder' ), - ] - ), - 'key_values' => new \Fieldmanager_Group( - [ - 'label' => __( 'Key/Value Pairs', 'wp-newsletter-builder' ), - 'children' => [ - 'key' => new \Fieldmanager_TextField( - [ - 'label' => __( 'Key', 'wp-newsletter-builder' ), - ] - ), - 'value' => new \Fieldmanager_TextField( - [ - 'label' => __( 'Value', 'wp-newsletter-builder' ), - ] - ), - ], - 'limit' => 0, - 'add_more_label' => __( 'Add another key/value pair', 'wp-newsletter-builder' ), - 'one_label_per_item' => false, - ] - ), ], 'limit' => 0, 'add_more_label' => __( 'Add Another Email Type', 'wp-newsletter-builder' ), From ad79ce585c45e1a94ca033f117e272605257e19f Mon Sep 17 00:00:00 2001 From: cahdeemer Date: Thu, 23 May 2024 15:48:59 -0400 Subject: [PATCH 5/6] bump version --- plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.php b/plugin.php index 1a84d061..1c11b7ba 100644 --- a/plugin.php +++ b/plugin.php @@ -3,7 +3,7 @@ * Plugin Name: Newsletter Builder * Plugin URI: https://github.com/alleyinteractive/wp-newsletter-builder * Description: Interface to manage email newsletters - * Version: 0.3.12 + * Version: 0.3.13 * Author: Alley Interactive * Author URI: https://github.com/alleyinteractive/wp-newsletter-builder * Requires at least: 6.2 From f9e7c0360a100c82d948d5f346f0340c74edf3cb Mon Sep 17 00:00:00 2001 From: cahdeemer Date: Thu, 23 May 2024 16:33:22 -0400 Subject: [PATCH 6/6] lint --- src/class-email-types.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/class-email-types.php b/src/class-email-types.php index 7ade1d7c..b2a445d7 100644 --- a/src/class-email-types.php +++ b/src/class-email-types.php @@ -52,7 +52,7 @@ public function register_fields(): void { [ 'name' => static::SETTINGS_KEY, 'children' => [ - 'uuid4' => new class() extends \Fieldmanager_Hidden { + 'uuid4' => new class() extends \Fieldmanager_Hidden { /** * Ensure that each group has a unique ID. * @@ -64,14 +64,14 @@ public function presave( $value, $current_value = [] ) { return $current_value ?: wp_generate_uuid4(); } }, - 'label' => new \Fieldmanager_TextField( __( 'Label', 'wp-newsletter-builder' ) ), - 'image' => new \Fieldmanager_Media( + 'label' => new \Fieldmanager_TextField( __( 'Label', 'wp-newsletter-builder' ) ), + 'image' => new \Fieldmanager_Media( [ 'label' => __( 'Image', 'wp-newsletter-builder' ), 'preview_size' => 'full', ] ), - 'templates' => new \Fieldmanager_Checkboxes( + 'templates' => new \Fieldmanager_Checkboxes( 'Checkboxes', [ 'datasource' => new \Fieldmanager_Datasource_Post( @@ -86,7 +86,7 @@ public function presave( $value, $current_value = [] ) { ), ] ), - 'from_name' => new \Fieldmanager_Select( + 'from_name' => new \Fieldmanager_Select( __( 'From Name', 'wp-newsletter-builder' ), [ 'options' => $from_names,