Skip to content

Commit

Permalink
release 1.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
michelegiorgi committed Aug 8, 2021
1 parent 39f8df4 commit db5f7ae
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 35 deletions.
6 changes: 6 additions & 0 deletions admin/class-formality-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,10 @@ public function prevent_classic_editor($can_edit, $post) {
return $can_edit;
}

public function remove_editor_styles() {
global $current_screen;
if('formality_form' == $current_screen->post_type) {
remove_editor_styles();
}
}
}
8 changes: 7 additions & 1 deletion assets/styles/admin/widget.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
}
}

.formality__cta-wrap {
a.formality__cta {
pointer-events: none !important;
}
}

form.formality {
pointer-events: none !important;
max-height: 400px;
Expand All @@ -38,4 +44,4 @@ form.formality {
height: 10em;
}
}
}
}
24 changes: 16 additions & 8 deletions assets/styles/public/common/_embed.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,6 @@ body {
.formality__cta-wrap {
display: block;
margin-bottom: 2em;
&--hidden {
display: none !important;
}
&--align {
&-center { text-align: center; }
&-left { text-align: left; }
&-right { text-align: right; }
}
a.formality__cta {
border: none;
all: initial;
Expand Down Expand Up @@ -186,5 +178,21 @@ body {
}
}
}
&--hidden {
display: none !important;
}
&--align {
&-center { text-align: center; }
&-left { text-align: left; }
&-right { text-align: right; }
&-wide,
&-full {
a.formality__cta {
width: 100%;
text-align: center;
display: block;
}
}
}
}
}
19 changes: 0 additions & 19 deletions assets/styles/public/common/_global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,25 +77,6 @@
z-index: 0;
}
}
&.formality--first-loading {
cursor: wait !important;
* {
cursor: wait !important
}
&:after {
position: absolute;
top: calc(50% - 1em);
left: calc(50% - 1em);
display: block;
border: .2em solid var(--formality_bg);
border-top: .2em solid var(--formality_col1);
border-radius: 50%;
width: 2em;
height: 2em;
animation: spin 0.6s linear infinite;
box-sizing: content-box;
}
}
p,
input,
textarea,
Expand Down
17 changes: 17 additions & 0 deletions assets/styles/public/modifiers/_loading.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@
}
}
&.formality--first-loading {
cursor: wait !important;
* {
cursor: wait !important
}
&:after {
position: absolute;
top: calc(50% - 1em);
left: calc(50% - 1em);
display: block;
border: .2em solid var(--formality_bg);
border-top: .2em solid var(--formality_col1);
border-radius: 50%;
width: 2em;
height: 2em;
animation: spin 0.6s linear infinite;
box-sizing: content-box;
}
.formality__body .formality__nav__list {
backdrop-filter: none !important;
}
Expand Down
4 changes: 2 additions & 2 deletions formality.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Plugin Name: Formality
* Plugin URI: https://formality.dev
* Description: Forms made simple (and cute). Designless, multistep, conversational, secure, all-in-one WordPress forms plugin.
* Version: 1.3.5
* Version: 1.3.6
* Author: Michele Giorgi
* Author URI: https://giorgi.io
* License: GPLv3
Expand Down Expand Up @@ -51,7 +51,7 @@
/**
* Currently plugin version.
*/
define( 'FORMALITY_VERSION', '1.3.5' );
define( 'FORMALITY_VERSION', '1.3.6' );
define( 'FORMALITY_PATH', plugin_dir_path( __FILE__ ));

/**
Expand Down
1 change: 1 addition & 0 deletions includes/class-formality-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public function post_types() {
'show_ui' => true,
'supports' => array( 'title', 'author', 'editor', 'custom-fields' ),
'show_in_menu' => 'formality_menu',
'show_in_nav_menus' => true,
)
);
$result_labels = array(
Expand Down
3 changes: 2 additions & 1 deletion includes/class-formality.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Formality {
*/
public function __construct() {

$this->version = defined( 'FORMALITY_VERSION' ) ? FORMALITY_VERSION : '1.3.5';
$this->version = defined( 'FORMALITY_VERSION' ) ? FORMALITY_VERSION : '1.3.6';
$this->formality = 'formality';
$this->fse = class_exists('WP_Block_Editor_Context');

Expand Down Expand Up @@ -160,6 +160,7 @@ private function define_admin_hooks() {
$this->loader->add_filter( 'use_block_editor_for_post_type', $plugin_editor, 'prevent_classic_editor', PHP_INT_MAX, 2 );
$this->loader->add_filter( 'gutenberg_can_edit_post_type', $plugin_editor, 'prevent_classic_editor', PHP_INT_MAX, 2 );
$this->loader->add_action( 'rest_api_init', $plugin_editor, 'templates_endpoint' );
//$this->loader->add_action( 'admin_init', $plugin_editor, 'remove_editor_styles' );

}

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": "Formality",
"version": "1.3.5",
"version": "1.3.6",
"author": "Michele Giorgi <[email protected]>",
"homepage": "https://giorgi.io",
"private": true,
Expand Down
11 changes: 9 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Contributors: michelegiorgi
Donate link: https://www.paypal.me/michelegiorgi/
Tags: form, conversational, multistep, design form, gutenberg, block editor
Requires at least: 5.6
Requires at least: 5.7
Tested up to: 5.8
Stable tag: 1.3.5
Stable tag: 1.3.6
Requires PHP: 7.0
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
Expand Down Expand Up @@ -61,6 +61,13 @@ You will find **Formality** menu in your WordPress admin screen.

== Changelog ==

= 1.3.6 =
Release Date: Aug 8th, 2021

* Formality block is now available on Widget block editor
* Bump minimum WordPress required version to v5.7
* Minor UI fixes

= 1.3.5 =
Release Date: Jul 21th, 2021

Expand Down
2 changes: 1 addition & 1 deletion webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mix
.js('assets/scripts/public.js', 'scripts/formality-public.js')
.js('assets/scripts/editor.js', 'scripts/formality-editor.js')
.js('assets/scripts/admin.js', 'scripts/formality-admin.js')
.banner({ banner: 'Formality v1.3.4' });
.banner({ banner: 'Formality v1.3.6' });

mix
.copyWatched('assets/images/admin/**', 'dist/images/admin')
Expand Down

0 comments on commit db5f7ae

Please sign in to comment.