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

V0.1 #441

Merged
merged 41 commits into from
Mar 28, 2020
Merged

V0.1 #441

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
baedfa9
clean-up from old bundler
bologer Feb 14, 2020
460e03d
#440, migrated to ParcelJS bundler [ci skip]
bologer Feb 14, 2020
6e0c9ab
package upgrade, #440
bologer Feb 14, 2020
e72a27f
added typescript configuration file
bologer Feb 14, 2020
67d61aa
react readme clean-up
bologer Feb 15, 2020
bce72fa
Added "Development" section on how to work with code locally
bologer Feb 15, 2020
f2c4974
(WIP): first steps towards TypeScript refactoring:
bologer Feb 19, 2020
c18493d
Nonce should be available for all
bologer Feb 21, 2020
41a1273
removed line above comment form
bologer Feb 21, 2020
9ee640d
settings provider update
bologer Feb 21, 2020
0ab883f
remove unused constants from App.tsx
bologer Feb 21, 2020
6d789ca
- refactored more components to TypeScript
bologer Feb 22, 2020
001d16c
- replaced toastify with notistack (notifications in store), changed …
bologer Feb 24, 2020
94ee2e8
- fixed problem when debug.log file did not create
bologer Mar 14, 2020
c6e1561
Merge branch 'master' into v1.0.0
bologer Mar 14, 2020
1747655
fixed problem with quotes
bologer Mar 14, 2020
5d0ed72
CHANGELOG.md update [ci skip]
bologer Mar 14, 2020
051762f
- a lot of components refactored to TypeScript & Redux
bologer Mar 15, 2020
2682f2b
- added `init` event firing when comments bootstrapped
bologer Mar 15, 2020
f681d42
- refactored more components to ts
bologer Mar 21, 2020
5a23445
formatting
bologer Mar 21, 2020
16a7b72
- Added new reducer type for extensions
bologer Mar 21, 2020
20306fe
fixed small storage problem when number wasn't acceptable
bologer Mar 22, 2020
ea39ce4
page rating starts UI correction
bologer Mar 22, 2020
80e4ffa
- comment attachment refactoring to ts
bologer Mar 22, 2020
0c051ad
- updated scss file for client to match new root class name
bologer Mar 23, 2020
1ae2ecd
- tooltip refactored
bologer Mar 23, 2020
ad20e85
- filter update + docs for it update
bologer Mar 23, 2020
2f4674a
- small embed script change
bologer Mar 23, 2020
e6a3867
- added comment text clean-up on success creation
bologer Mar 23, 2020
99028be
moved readme to wiki
bologer Mar 24, 2020
d69e6d0
- added .env file to handle development environment
bologer Mar 26, 2020
d385908
CHANGELOG.md and README.md update, fixed broken api.ts [ci skip]
bologer Mar 26, 2020
9db5720
fixed incorrect links
bologer Mar 26, 2020
92455d8
readme + core file updated
bologer Mar 27, 2020
fde136e
build script update
bologer Mar 27, 2020
bb259ac
fixed issue when theming wasn't update automatically for customization
bologer Mar 27, 2020
a06bc30
missing btn in themeing
bologer Mar 27, 2020
a697599
- fixed issue when deleting didn't work
bologer Mar 28, 2020
820292c
- version update
bologer Mar 28, 2020
efa07d0
fixed issue with uploading attachments
bologer Mar 28, 2020
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env
.sass-cache
node_modules
cache/*
Expand All @@ -8,3 +9,4 @@ static/css/main-custom-*.min.css
static/css/*css.map
static/js/*js.map
vendor
.idea
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Changelog

## 0.1.0 - 28.03.2020

**Fixes:**
- Fixed error when when flushing cache
- Fixed issue when debug file was never created
- Fixed deprecation notice: "Array and string offset access syntax with curly braces" in AnyCommentGenericSettings.php
- Fixed problem when quotes in title was breaking cloud script launcher

**Enhancements:**
- Added `init` event, see repository Wiki for more information
- Now only one form displayed on 'Reply' or 'Update' actions
- Comments: completely rewritten to React Hooks
- Comments: data management rewritten to Redux
- Comments: rewritten to TypeScript
- Comments: changed bundle builder to ParcelJS
- Comments: using Formik to manage forms
- Comments: website settings now propagated using React Context
- Comments: now send button is always active. Previously button was changed to active when user started typing.
- Comments: moved back to classic editor, no more needed to highlight text to see bold, italic, etc
- Comments: removed redundant "Guest" sign from guest users
- Comments: comment form is now standardized with cloud version which proved to have better UI/UX
- Comments: replaced Google+ icon with generic Google one, as it was deprecated

**Others:**
- Dropping Email/chart support for plugin, now only Telegram, GitHub & WordPress Forum

## 0.0.99 – 04.01.2020

**Enhancements:**
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ AnyComment is blazing-fast commenting plugin for WordPress based on React.

It stands for simplicity & speed. We value feedback, so open new [issue](https://github.com/bologer/anycomment.io/issues) if you have any failures.

Feel free to use [this demo page](https://anycomment.io/demo/).
Feel free to use [this demo page](https://plugin.anycomment.io/demo/).

# Installation
In order to start, you need:
Expand All @@ -18,10 +18,14 @@ In order to start, you need:
# Coding Standard
AnyComment source conforms to [PSR2](https://www.php-fig.org/psr/psr-2/).


# Resources
* [Official website](http://anycomment.io/en/)
* [All guides](https://anycomment.io/en/category/tutorials/)
* [Configure socials](https://anycomment.io/en/category/tutorials/socials/)
* [Official website](http://plugin.anycomment.io/en/)
* [All guides](https://plugin.anycomment.io/en/category/tutorials/)
* [Configure socials](https://plugin.anycomment.io/en/category/tutorials/socials/)
* [VK.com group](http://vk.com/anycomment)
* [Telegram group](https://t.me/anycomment)

## Contribution
- Clone project to `wp-content/plugins/anycomment` folder of your docker or local WordPress directory
- Go to cloned directory
- Run `./scripts/init.sh` and follow instructions
10 changes: 8 additions & 2 deletions anycomment.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: AnyComment
* Plugin URI: https://anycomment.io
* Description: AnyComment is an advanced commenting system for WordPress.
* Version: 0.0.99
* Version: 0.1
* Author: Bologer
* Author URI: http://bologer.ru
* Requires at least: 4.4
Expand All @@ -25,12 +25,18 @@
require __DIR__ . '/vendor/autoload.php';
}

$dotenv = Dotenv\Dotenv::createImmutable( __DIR__ );
$dotenv->load();

function anycomment() {
defined( 'ANYCOMMENT_PLUGIN_FILE' ) or define( 'ANYCOMMENT_PLUGIN_FILE', __FILE__ );
defined( 'ANYCOMMENT_LANG' ) or define( 'ANYCOMMENT_LANG', __FILE__ );
defined( 'ANYCOMMENT_ABSPATH' ) or define( 'ANYCOMMENT_ABSPATH', dirname( __FILE__ ) );
defined( 'ANYCOMMENT_PLUGIN_BASENAME' ) or define( 'ANYCOMMENT_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
defined( 'ANYCOMMENT_DEBUG' ) or define( 'ANYCOMMENT_DEBUG', false );

$enableDebug = getenv( 'ENV' ) === 'dev';

defined( 'ANYCOMMENT_DEBUG' ) or define( 'ANYCOMMENT_DEBUG', $enableDebug );

return \AnyComment\AnyCommentCore::instance();
}
Expand Down
2 changes: 1 addition & 1 deletion assets/theming/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
@import "custom/buttons";
@import "custom/comments";
@import "custom/gallery";
@import "custom/editor-bubble";
@import "custom/editor";
@import "custom/global-header";
// Comment form
@import "custom/comment-form";
Expand Down
2 changes: 1 addition & 1 deletion assets/theming/custom/_buttons.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#{$root} {
.anycomment-app {
.anycomment-btn,
.input[type="submit"],
input + .input[type="button"] {
Expand Down
19 changes: 4 additions & 15 deletions assets/theming/custom/_comment-form.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
#{$root} {
.anycomment-app {
// Send comment
.anycomment-form {
width: 100%;
margin-bottom: 20px;

form {
border-top: 1px solid $semi-hidden-color;
margin-top: 16px;
padding-top: 15px;
}

// Terms
&__terms {
display: flex;
Expand Down Expand Up @@ -65,14 +59,13 @@
// List of inputs: name, email, website
&__inputs {
display: flex;
flex-direction: row;
flex-direction: column;
flex-grow: 2;
justify-content: space-between;
margin-bottom: 20px;

&-item {
flex-grow: 1;
padding-right: 5px;
margin-bottom: 4px;

&:last-of-type {
padding-right: 0;
Expand Down Expand Up @@ -274,9 +267,6 @@
.anycomment-form-authorized {
.anycomment-form-body-outliner {
&__avatar {
position: absolute;
top: 15px;
left: 27px;
@include avatar();
@include avatar_child();
z-index: 1;
Expand Down Expand Up @@ -304,7 +294,6 @@
}

&__inputs {
flex-direction: column;
margin-bottom: 10px;

&-item {
Expand All @@ -314,4 +303,4 @@
}
}
}
}
}
4 changes: 2 additions & 2 deletions assets/theming/custom/_comment-summary.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#{$root} {
.anycomment-app {
.anycomment-summary {
width: 100%;
position: relative;
Expand Down Expand Up @@ -28,4 +28,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion assets/theming/custom/_common.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#{$root} {
.anycomment-app {
&,
& *,
*:before,
Expand Down
5 changes: 3 additions & 2 deletions assets/theming/custom/_global-header.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#{$root} {
.anycomment-app {
.anycomment-global-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;

// Rating
.anycomment-rating {
Expand Down Expand Up @@ -62,4 +63,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion assets/theming/custom/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ $tooltip-background-color: $editor-bubble-color;
$tooltip-text-color: #747B7E !default;
$tooltip-border-radius: 10px !default;

$root: '#anycomment-root' !default;
$root: '.anycomment-app' !default;
12 changes: 3 additions & 9 deletions assets/theming/custom/comments.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#{$root} {
.anycomment-app {
display: flex;
flex-grow: 1;
flex-direction: column;
Expand All @@ -8,12 +8,6 @@
background-color: $global-background-color;
border-radius: $global-background-border-radius;

&-inner {
display: flex;
flex-grow: 1;
flex-direction: column;
}

// Footer
.anycomment-copy-footer {
margin-top: $big-space;
Expand Down Expand Up @@ -480,7 +474,7 @@
}
}

&-inner > .anycomment-list {
& > .anycomment-list {

ul.anycomment-list-child {
.comment-single-body {
Expand Down Expand Up @@ -511,4 +505,4 @@
}
}
}
}
}
13 changes: 7 additions & 6 deletions assets/theming/custom/editor.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#{$root} {
.anycomment-app {
.ql-container {
box-sizing: border-box;
font-family: $font-family;
font-size: $font-size - 2;
height: 100%;
margin: 0;
position: relative;
padding: 10px;
}
.ql-container.ql-disabled .ql-tooltip {
visibility: hidden;
Expand All @@ -25,16 +26,15 @@
padding: 0;
}
.ql-editor {
margin-left: $comment-parent-space;
min-height: $comment-field-default-height;
min-height: 120px;
box-sizing: border-box;
line-height: 1.42;
height: 100%;
outline: none;
overflow-y: auto;
padding: 12px 15px;
tab-size: 4;
-moz-tab-size: 4;
font-size: $font-size;
text-align: left;
white-space: pre-wrap;
word-wrap: break-word;
Expand All @@ -60,7 +60,7 @@

.ql-editor {
p {
line-height: 1.6;
line-height: 1.5;
margin: 0 0 5px 0;
}
}
Expand Down Expand Up @@ -397,7 +397,7 @@
.ql-editor.ql-blank::before {
color: $semi-hidden-color;
content: attr(data-placeholder);
font-style: italic;
font-style: normal;
pointer-events: none;
position: absolute;
}
Expand Down Expand Up @@ -954,6 +954,7 @@
}
.ql-container.ql-snow {
background-color: $form-field-background-color;
@include border-radius($global-radius);
}

.anycomment-lang-ru {
Expand Down
4 changes: 2 additions & 2 deletions assets/theming/custom/gallery.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#{$root} {
.anycomment-app {
.anycomment-uploads {
margin: 5px 0;
padding: 5px 0;
Expand Down Expand Up @@ -69,4 +69,4 @@
justify-content: flex-end;
}
}
}
}
7 changes: 3 additions & 4 deletions assets/theming/custom/mobile.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#{$root} {

.anycomment-app {
@import '../common/mobile_variables';

@mixin avatar() {
Expand Down Expand Up @@ -307,7 +306,7 @@
}
}

&-inner > .anycomment-list {
& > .anycomment-list {

ul.anycomment-list-child {
.comment-single-body {
Expand Down Expand Up @@ -346,4 +345,4 @@
font-size: $font-size - 3;
}
}
}
}
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@
"AnyComment\\": "includes/"
}
},
"scripts": {
"init": "./scripts/init.sh",
"init-dev": "./scripts/init-env.sh dev",
"init-prod": "./scripts/init-env.sh prod"
},
"minimum-stability": "stable",
"require": {
"tedivm/stash": "0.14.*",
"leafo/scssphp": "^0.7.7",
"hybridauth/hybridauth": "v3.0.0-rc.9",
"monolog/monolog": "^1.0"
"monolog/monolog": "^1.0",
"vlucas/phpdotenv": "^4.1"
}
}
Loading