Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 3.3.1 #696

Merged
merged 46 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
044144c
Ignore more dev files when exporting
andergmartins Feb 29, 2024
e6f25e6
Update es, fr, and it language files, #685
andergmartins Feb 29, 2024
e2b08c6
Ignore PHPCS warnings about direct DB queries, #682
andergmartins Feb 29, 2024
196ac7e
Add comments for translators, and fix minor issues reported by phpcs
andergmartins Mar 1, 2024
db7a224
Improve text for terms field in the future action metabox, #664
andergmartins Mar 1, 2024
eaf9c00
Commit dev versions of js scripts
andergmartins Mar 1, 2024
d57c065
Change the message when there is no action do display, #666;
andergmartins Mar 1, 2024
0ecb477
Fix inconsistent filter. "Pending" is now "Scheduled", #673
andergmartins Mar 1, 2024
028ea24
Implement data validation in the quick-edit panel, #587
andergmartins Mar 6, 2024
90ef3e4
Fix taxonomy name in the quick edit
andergmartins Mar 6, 2024
e1e8971
Simplify form control for form validation and implement it on bulk-ed…
andergmartins Mar 7, 2024
abda79a
Implement form validation for the classic and block editors, #587
andergmartins Mar 7, 2024
b3f67ac
Move the data validation callback to the main component, #587
andergmartins Mar 7, 2024
44a8494
Merge branch 'main' into release-3.3.1
andergmartins Mar 7, 2024
9e3cbe7
Add structure for adding validation to the post types settings page
andergmartins Mar 7, 2024
48efd69
Update default action taxonomy labels when the taxonomy changes, #676
andergmartins Mar 7, 2024
0ea3d88
Remove deprecated constant PostExpirator_Facade::DEFAULT_CAPABILITY_E…
andergmartins Mar 8, 2024
7fc7aa4
Add the $unique param to the method PostModel::addMeta
andergmartins Mar 8, 2024
17d64db
Refactor metadata hash flag adding prefix "_", #695;
andergmartins Mar 11, 2024
de91812
Move the code that removes the legacy metadata hash to another method
andergmartins Mar 11, 2024
347f17a
Bump version to 3.3.1-beta.1
andergmartins Mar 11, 2024
e06e9a9
Convert actions that change post status into one action with argument…
andergmartins Mar 13, 2024
6a88c98
Mark legacy post status actions as deprecated
andergmartins Mar 13, 2024
3698e95
Add filter to the list of post statuses
andergmartins Mar 13, 2024
ef7983a
Add debug statement for the list of statuses in the panel
andergmartins Mar 13, 2024
47e326d
Add new debug statement
andergmartins Mar 13, 2024
ee6f1f2
Fix the list of statuses
andergmartins Mar 13, 2024
2c1879b
Do not register the metabox JS script if the metabox will not exist
andergmartins Mar 13, 2024
2de46fb
Fix support for new post status meta on import
andergmartins Mar 13, 2024
4b0c84e
Fix issue on quick edit to not submit the form when enter is pressed,…
andergmartins Mar 13, 2024
6a8624c
Add date validation to block submitting date in the past, #443
andergmartins Mar 13, 2024
2367e54
Improve feedback while validating the default date offset field
andergmartins Mar 14, 2024
de6c723
Separate custom size for spinner from the spinner definition
andergmartins Mar 14, 2024
f3764ce
Update the changelog
andergmartins Mar 14, 2024
da10933
Split the exec command into separated commands
andergmartins Mar 14, 2024
17f8374
Upgrade dev dependencies
andergmartins Mar 14, 2024
45de02e
Add a date preview to the default date/time offset field
andergmartins Mar 14, 2024
3e7f9d8
Update the changelog
andergmartins Mar 14, 2024
0518912
Update the style of form validation error messages in settings and panel
andergmartins Mar 14, 2024
c19a20f
Remove the ! icon from the error messages in the settings and panel
andergmartins Mar 14, 2024
ea90a33
Update the changelog
andergmartins Mar 19, 2024
5056234
Update composer files, for dev dependencies
andergmartins Mar 19, 2024
9f7b567
Update js files for production versions
andergmartins Mar 19, 2024
3ebf666
Fix escape functions on html attributes
andergmartins Mar 19, 2024
41f8ae6
Update version number to 3.3.1
andergmartins Mar 19, 2024
133f9f0
Update language files
andergmartins Mar 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ ray.php export-ignore
tests export-ignore
webpack.config.js export-ignore
yarn.lock export-ignore
phpstan.neon export-ignore
CHANGELOG.md export-ignore
codeception.yml export-ignore
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

= [3.3.1] - 19 Mar, 2024 =

* ADDED: Add validation for the date and time offset in the settings page, #683;
* ADDED: Add form validation to the settings panel;
* ADDED: Add form validation to the metabox panel;
* ADDED: Add a date preview to the date/time offset setting field;
* CHANGED: The actions to move posts to another status where grouped in a single action, with a dropdown to select the status, #668;
* CHANGED: The actions "draft", "private" and "trash" are deprecated in favor of "change-status", #668;
* CHANGED: The metadata hash key has now a prefix "_" marking it as a private key, #695;
* CHANGED: Improved the name of some actions;
* CHANGED: Change the label of the field to select terms when "Replace all terms" is selected, #664;
* FIXED: Make it impossible to choose dates in the past, #443;
* FIXED: Enter key submits quick-edit panel when selecting a taxonomy term, #586;
* FIXED: The name of the taxonomy in the actions field is now updated in the settings panel when the taxonomy is changed, #676;
* FIXED: Possible to add an action using an empty category setting, #587;
* FIXED: Fix language files for ES, IT, FR, #685;
* FIXED: Fix inconsistent text in the filter for "Pending" actions, #673;
* FIXED: Improve the message when no actions are found: "No Future Actions", #666;

= [3.3.0] - 28 Fev, 2024 =

* ADDED: Add new filter for filtering the list of post types supported by the plugin: publishpressfuture_supported_post_types, #677;
Expand Down
21 changes: 21 additions & 0 deletions assets/css/edit.css
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,24 @@ div.pe-qe-fields > div {
padding: 14px;
background: #dae1f0;
}

.post-expirator-panel .future-action-error {
line-height: 20px;
width: 100%;
background-color: #b15b5b;
color: white;
padding: 12px;
}

.future-action-panel .new-status .components-base-control {
width: 100%;
}

.future-action-panel .notice {
padding-top: 14px;
width: 100%;
}

.future-action-panel .notice .dashicons {
line-height: 30px;
}
75 changes: 75 additions & 0 deletions assets/css/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,78 @@ p.description,
opacity: .5;
}
}

#publishpress-future-settings-post-types .notice {
padding-top: 14px;
width: 100%;
}

.future-action-pending input {
background-color: #f0ad4e;
}


/**
* Spinner
*/

.publishpress-future-loading {
position: relative;
}

.publishpress-future-spinner {
display: inline-block;
position: absolute;
width: 80px;
height: 80px;
}

.publishpress-future-spinner div {
box-sizing: border-box;
display: block;
position: absolute;
width: 64px;
height: 64px;
margin: 8px;
border: 8px solid #916ba6;
border-radius: 50%;
animation: publishpress-future-spinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
border-color: #916ba6 transparent transparent transparent;
}

.publishpress-future-spinner div:nth-child(1) {
animation-delay: -0.45s;
}

.publishpress-future-spinner div:nth-child(2) {
animation-delay: -0.3s;
}

.publishpress-future-spinner div:nth-child(3) {
animation-delay: -0.15s;
}

@keyframes publishpress-future-spinner {
0% {
transform: rotate(0deg);
}

100% {
transform: rotate(360deg);
}
}

.publishpress-future-loading-input .publishpress-future-spinner {
position: absolute;
top: 8px;
right: 2px;
width: 20px;
height: 20px;
}

.publishpress-future-loading-input .publishpress-future-spinner div {
width: 14px;
height: 14px;
margin: 0;
border-width: 3px;
}
2 changes: 1 addition & 1 deletion assets/js/block-editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/block-editor.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/bulk-edit.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/bulk-edit.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/classic-editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/classic-editor.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/quick-edit.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/quick-edit.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/settings-post-types.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/settings-post-types.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion assets/jsx/block-editor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import {
strings,
taxonomyName,
postTypeDefaultConfig,
defaultDate
defaultDate,
statusesSelectOptions
} from "&config.block-editor";

const storeName = 'publishpress-future/future-action';
Expand All @@ -20,6 +21,7 @@ createStore({
defaultState: {
autoEnable: postTypeDefaultConfig.autoEnable,
action: postTypeDefaultConfig.expireType,
newStatus: postTypeDefaultConfig.newStatus,
date: defaultDate,
taxonomy: postTypeDefaultConfig.taxonomy,
terms: postTypeDefaultConfig.terms,
Expand All @@ -32,6 +34,7 @@ const BlockEditorFutureActionPlugin = () => {
postType={select('core/editor').getCurrentPostType()}
isCleanNewPost={select('core/editor').isCleanNewPost()}
actionsSelectOptions={actionsSelectOptions}
statusesSelectOptions={statusesSelectOptions}
is12Hour={is12Hour}
timeFormat={timeFormat}
startOfWeek={startOfWeek}
Expand Down
44 changes: 21 additions & 23 deletions assets/jsx/bulk-edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import {
startOfWeek,
strings,
taxonomyName,
nonce
nonce,
statusesSelectOptions
} from "&config.bulk-edit";
import { render } from "&ReactDOM";

const storeName = 'publishpress-future/future-action-bulk-edit';
const delayToUnmountAfterSaving = 1000;
Expand Down Expand Up @@ -58,6 +58,7 @@ inlineEditPost.setBulk = function (id) {
name: storeName,
defaultState: {
action: postTypeDefaultConfig.expireType,
newStatus: postTypeDefaultConfig.newStatus,
date: defaultDate,
taxonomy: postTypeDefaultConfig.taxonomy,
terms: postTypeDefaultConfig.terms,
Expand All @@ -67,12 +68,24 @@ inlineEditPost.setBulk = function (id) {
}

const container = document.getElementById("publishpress-future-bulk-edit");
const root = createRoot(container);

const saveButton = document.querySelector('#bulk_edit');
if (saveButton) {
saveButton.onclick = function() {
setTimeout(() => {
root.unmount();
}, delayToUnmountAfterSaving);
};
}

const component = (
<FutureActionPanelBulkEdit
storeName={storeName}
postType={postType}
isNewPost={isNewPost}
actionsSelectOptions={actionsSelectOptions}
statusesSelectOptions={statusesSelectOptions}
is12Hour={is12Hour}
timeFormat={timeFormat}
startOfWeek={startOfWeek}
Expand All @@ -82,27 +95,12 @@ inlineEditPost.setBulk = function (id) {
/>
);

if (createRoot) {
const root = createRoot(container);

root.render(component);
root.render(component);

const saveButton = document.querySelector('#bulk_edit');
if (saveButton) {
saveButton.onclick = function() {
setTimeout(() => {
root.unmount();
}, delayToUnmountAfterSaving);
};
}
inlineEditPost.revert = function () {
root.unmount();

inlineEditPost.revert = function () {
root.unmount();

// Call the original WP revert function.
wpInlineEditRevert.apply(this, arguments);
};
} else {
render(component, container);
}
// Call the original WP revert function.
wpInlineEditRevert.apply(this, arguments);
};
};
11 changes: 5 additions & 6 deletions assets/jsx/classic-editor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import {
strings,
taxonomyName,
postTypeDefaultConfig,
defaultDate
defaultDate,
statusesSelectOptions
} from "&config.classic-editor";
import { render } from "&ReactDOM";

Expand All @@ -26,6 +27,7 @@ if (! isGutenbergEnabled()) {
defaultState: {
autoEnable: postTypeDefaultConfig.autoEnable,
action: postTypeDefaultConfig.expireType,
newStatus: postTypeDefaultConfig.newStatus,
date: defaultDate,
taxonomy: postTypeDefaultConfig.taxonomy,
terms: postTypeDefaultConfig.terms,
Expand All @@ -40,6 +42,7 @@ if (! isGutenbergEnabled()) {
postType={postType}
isNewPost={isNewPost}
actionsSelectOptions={actionsSelectOptions}
statusesSelectOptions={statusesSelectOptions}
is12Hour={is12Hour}
timeFormat={timeFormat}
startOfWeek={startOfWeek}
Expand All @@ -48,9 +51,5 @@ if (! isGutenbergEnabled()) {
/>
);

if (createRoot) {
createRoot(container).render(component);
} else {
render(component, container);
}
createRoot(container).render(component);
}
Loading
Loading