Skip to content

Commit

Permalink
Merge branch 'develop' into filip/init-in-dashboard-only
Browse files Browse the repository at this point in the history
  • Loading branch information
ilicfilip committed Jan 6, 2025
2 parents 9ef688d + 40ade9d commit ca811c3
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 13 deletions.
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

Fixed:

* Duplicate weekly suggested tasks.
* The REST API endpoint for getting stats.
* Scrollable monthly badges widget height on page load.
* 2026 monthly badges showing up
* Remove duplicated weekly suggested tasks.
* The REST API endpoint for getting stats was broken, causing the weekly emails not to work.
* Scrollable monthly badges widget was the wrong height on page load.
* 2026 monthly badges were showing up and shouldn't (yet).

Enhancements:

* Refocus the "add new task" input after a to-do item is added.

= 1.0.1 =

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Progress Planner

![Progress Planner - Powering your website's progress](https://repository-images.githubusercontent.com/753019432/24c42936-cd56-4192-8f28-503073087bd1)
![Progress Planner - Powering your website's progress](https://repository-images.githubusercontent.com/753019432/5ca27f0c-4380-4b01-a18c-1c7633262659)

## What does this plugin do?

Expand Down
1 change: 1 addition & 0 deletions assets/css/page-widgets/whats-new.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,5 @@
border-radius: var(--prpl-border-radius);
box-shadow: 5px 5px 5px var(--prpl-color-gray-2);
border: 1px solid var(--prpl-color-gray-2);
background-color: var(--prpl-color-gray-1); /* Fallback, if remote host image is not accessible */
}
3 changes: 3 additions & 0 deletions assets/js/web-components/prpl-badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ customElements.define(
}"
alt="Badge"
${ false === complete ? 'style="filter: grayscale(1);opacity: 0.25;"' : '' }
onerror="this.onerror=null;this.src='${
progressPlannerBadge.placeholderImageUrl
}';"
/>
`;
}
Expand Down
8 changes: 3 additions & 5 deletions assets/js/widgets/todo.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ const progressPlannerInjectTodoItem = ( content, done, addToStart, save ) => {
document.getElementById( 'todo-list' ).appendChild( todoItemElement );
}

// Focus the new task's content element after it is added to the DOM
setTimeout( () => {
todoItemElement.querySelector( 'input[type="checkbox"]' ).focus();
}, 0 );

if ( save ) {
progressPlannerSaveTodoList();
}
Expand Down Expand Up @@ -91,5 +86,8 @@ prplDocumentReady( () => {
);

document.getElementById( 'new-todo-content' ).value = '';

// Focus the new task input element.
document.getElementById( 'new-todo-content' ).focus();
} );
} );
1 change: 1 addition & 0 deletions classes/admin/class-scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public function localize_script( $handle ) {
'progressPlannerBadge',
[
'remoteServerRootUrl' => \progress_planner()->get_remote_server_root_url(),
'placeholderImageUrl' => \progress_planner()->get_placeholder_svg(),
]
);
break;
Expand Down
12 changes: 12 additions & 0 deletions classes/class-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,18 @@ public function get_remote_server_root_url() {
: 'https://progressplanner.com';
}

/**
* Get the placeholder SVG.
*
* @param int $width The width of the placeholder image.
* @param int $height The height of the placeholder image.
*
* @return string
*/
public function get_placeholder_svg( $width = 1200, $height = 675 ) {
return 'data:image/svg+xml;base64,' . base64_encode( sprintf( '<svg width="%1$d" height="%2$d" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2" width="%3$d" height="%4$d" style="fill:#F6F5FB;stroke:#534786;stroke-width:2"/><text x="50%%" y="50%%" font-size="20" text-anchor="middle" alignment-baseline="middle" font-family="monospace" fill="#534786">progressplanner.com</text></svg>', $width, $height, ( $width - 4 ), ( $height - 4 ) ) );
}

/**
* Get the activation date.
*
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "progress-planner",
"version": "1.0.0",
"version": "1.0.2",
"private": true,
"description": "WordPress plugin",
"author": "Team Emilia Projects",
Expand Down
2 changes: 1 addition & 1 deletion progress-planner.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Description: A plugin to help you fight procrastination and get things done.
* Requires at least: 6.3
* Requires PHP: 7.4
* Version: 1.0.1
* Version: 1.0.2
* Author: Team Emilia Projects
* Author URI: https://prpl.fyi/about
* License: GPL-3.0+
Expand Down
15 changes: 14 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: planning, maintenance, writing, blogging
Requires at least: 6.3
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.0.1
Stable tag: 1.0.2
License: GPL3+
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html

Expand Down Expand Up @@ -78,6 +78,19 @@ https://youtu.be/e1bmxZYyXFY

== Changelog ==

= 1.0.2 =

Fixed:

* Remove duplicated weekly suggested tasks.
* The REST API endpoint for getting stats was broken, causing the weekly emails not to work.
* Scrollable monthly badges widget was the wrong height on page load.
* 2026 monthly badges were showing up and shouldn't (yet).

Enhancements:

* Refocus the "add new task" input after a to-do item is added.

= 1.0.1 =

Fixed:
Expand Down
1 change: 1 addition & 0 deletions views/page-widgets/latest-badge.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
alt="<?php echo \esc_attr( $prpl_latest_badge->get_name() ); ?>"
width="1200"
height="675"
onerror="this.onerror=null;this.src='<?php echo \esc_url( \progress_planner()->get_placeholder_svg() ); ?>';"
/>
<?php if ( 'no-license' !== \get_option( 'progress_planner_license_key', 'no-license' ) && ! \progress_planner()->is_local_site() ) : ?>
<?php
Expand Down

0 comments on commit ca811c3

Please sign in to comment.