Skip to content

Commit

Permalink
Merge branch 'development' into bugfix/pro/464
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Feb 1, 2024
2 parents 1ca3f6c + 8d89541 commit baec1e6
Show file tree
Hide file tree
Showing 58 changed files with 64,958 additions and 98,475 deletions.
48 changes: 25 additions & 23 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
module.exports = {
root: true,
env: {
browser: true,
node: true
},
extends: 'plugin:vue/recommended',
// required to lint *.vue files
plugins: [
'html',
'vue',
],
// add your custom rules here
rules: {
"indent": ["error", "tab"],
"no-tabs": 0,
"space-in-parens": ["error", "always"],
"camelcase": [2,{"properties":"never"}],
},
"parserOptions":{
"parser": "babel-eslint"
},
globals: {}
}
root: true,
env: {
browser: true,
node: true,
},
extends: ['plugin:vue/recommended'],
// required to lint *.vue files
plugins: ['vue'],
// add your custom rules here
rules: {
'vue/no-dupe-keys': 'warn',
'vue/no-unused-components': 'warn',
'vue/no-side-effects-in-computed-properties': 'warn',
'vue/return-in-computed-property': 'warn',
'vue/no-unused-vars': 'warn',
'vue/no-textarea-mustache': 'warn',
'vue/require-valid-default-prop': 'warn',
'vue/multi-word-component-names': 'warn',
'vue/no-mutating-props': 'warn',
},
parserOptions: {
parser: 'babel-eslint',
},
globals: {},
};
20 changes: 11 additions & 9 deletions .github/workflows/build-dev-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ name: Build Artifact

on:
pull_request:
branches:
- master
types: [opened, synchronize, ready_for_review]

branches-ignore:
- "update_dependencies"

jobs:
dev-zip:

name: Build ZIP and Upload To S3
if: github.event.pull_request.draft == false && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
Expand All @@ -21,8 +19,8 @@ jobs:
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
with:
php-version: "7.4"
- name: Get Composer Cache Directory
id: composer-cache
run: |
Expand All @@ -39,13 +37,17 @@ jobs:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
run: |
composer install --no-dev --prefer-dist --no-progress
- name: Create dev build file
run: |
npm ci
npm run build-dev
- name: Create Zip file
run: npm run dist
- name: Retrieve branch name
id: retrieve-branch-name
run: |
echo "::set-output name=branch_name::$(REF=${GITHUB_HEAD_REF:-$GITHUB_REF} && echo ${REF#refs/heads/} | sed 's/\//-/g')"
echo "branch name: $(REF=${GITHUB_HEAD_REF:-$GITHUB_REF} && echo ${REF#refs/heads/} | sed 's/\//-/g')"
echo "::set-output name=branch_name::$(REF=${GITHUB_HEAD_REF:-$GITHUB_REF} && echo ${REF#refs/heads/} | sed 's/\//-/g')"
echo "branch name: $(REF=${GITHUB_HEAD_REF:-$GITHUB_REF} && echo ${REF#refs/heads/} | sed 's/\//-/g')"
- name: Retrieve git SHA-8 string
id: retrieve-git-sha-8
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
Expand Down Expand Up @@ -101,4 +103,4 @@ jobs:
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
edit-mode: replace
body: ${{ steps.get-comment-body.outputs.body }}
body: ${{ steps.get-comment-body.outputs.body }}
5 changes: 3 additions & 2 deletions .github/workflows/deploy-to-wporg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
php-version: '7.4'
- name: Run Composer Install
run: |
npm ci
npm run build
composer install --no-dev --prefer-dist --no-progress --no-suggest
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@master
env:
SVN_PASSWORD: ${{ secrets.SVN_THEMEISLE_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_THEMEISLE_USERNAME }}
SVN_USERNAME: ${{ secrets.SVN_THEMEISLE_USERNAME }}
64 changes: 64 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: E2E

on:
pull_request:
types: [synchronize, ready_for_review]
branches-ignore:
- "update_dependencies"

jobs:
e2e:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"

# run composer install
- name: Install composer
run: composer install --prefer-dist --no-progress --quiet

# setup the node cache (node_modules) with github actions cache
- name: Cache Node - npm
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-cache-
- name: npm ci
run: |
npm ci
- name: Make build
run: |
npm run build
- name: Setup WP Env
run: |
npm run wp-env start
- name: Install Playwright
run: |
npm install -g playwright-cli
npx playwright install
- name: Playwright Blocks
run: |
npm run test:e2e:playwright
continue-on-error: true

- name: Upload tests artifacts
if: always()
uses: actions/upload-artifact@v2
with:
name: artifact
path: ./artifacts
retention-days: 1
28 changes: 28 additions & 0 deletions .github/workflows/test-js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test JS

on:
pull_request:
types: [opened, synchronize, ready_for_review]

jobs:
run:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
strategy:
matrix:
node-version: [18.x]
name: JS Lint
steps:
- uses: actions/checkout@master
with:
persist-credentials: false
- name: Build files using ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Lint js files
run: |
npm ci
npm run lint
env:
CI: true
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ node_modules
logs
dist
artifact
artifacts
vendor
tweet-old-post.zip
assets/.DS_Store
.DS_Store
temp-images
.vscode
.vscode
assets/js/build
8 changes: 8 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"core": "WordPress/WordPress",
"plugins": [ "." ],
"env": {
"tests": {
}
}
}
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
##### [Version 9.0.21](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.20...v9.0.21) (2023-09-27)

- Implemented post-sharing limit API to prevent sharing errors

##### [Version 9.0.20](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.19...v9.0.20) (2023-09-19)

- Fixed Facebook login issue by upgrading Graph API version v7.0 to v12.0

##### [Version 9.0.19](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.18...v9.0.19) (2023-08-23)

- Fixed LinkedIn sharing (API version changed)

##### [Version 9.0.18](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.17...v9.0.18) (2023-08-17)

- Added new authentication permissions scope for LinkedIn

##### [Version 9.0.17](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.16...v9.0.17) (2023-08-03)

PHP version required updated to 7.4

##### [Version 9.0.16](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.15...v9.0.16) (2023-08-03)

- Updated the required PHP version to 7.4

##### [Version 9.0.15](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.14...v9.0.15) (2023-07-28)

- Fixed post-sharing issue with post image
- Added Twitter v2 API support

##### [Version 9.0.14](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.13...v9.0.14) (2023-06-06)

- Added LinkedIn new API support
Expand Down
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# How to contribute to the project.

## Development Setup

This projects requires you to have Node.js (with npm) and Composer.

- You can run `npm ci` & `composer install` to install dependencies.
- Once done, you can run `npm run build` to generate build files.
- You can also use `npm run dev` to generate dev build if you are working on the files.

> [!NOTE]
> The minimum Node version is 16. The version recommended is 18 or higher (tested up to 21). For PHP, use 7.4.
## E2E Testing

We use Playwright to write the E2E together with WordPress tool set.

Use `npm run wp-env start` to start the testing environment.

> [!NOTE]
> The testing instance has a port that need to be free to work with setup (usually the port 8889).
Install Playwright with `npm install -g playwright-cli` and `npx playwright install`.

Use `npm run test:e2e:playwright:ui` to lunch it in UI mode for easy development.
48 changes: 41 additions & 7 deletions assets/css/rop_core.css
Original file line number Diff line number Diff line change
Expand Up @@ -692,9 +692,9 @@ a.active {
}

#rop_core .btn.btn-twitter {
border-color: #47a5ed;
border-color: #000;
color: #fff;
background: #55acee;
background: #000;
}

#rop_core .btn.btn-twitter:focus {
Expand All @@ -703,9 +703,9 @@ a.active {

#rop_core .btn.btn-twitter:focus,
#rop_core .btn.btn-twitter:hover {
border-color: #3ea1ec;
border-color: #14171A;
color: #fff;
background: #0074ab;
background: #14171A;
}

#rop_core .btn.btn-twitter:active,
Expand All @@ -720,6 +720,10 @@ a.active {
border-left-color: #fff;
}

#rop_core .btn.btn-twitter svg {
margin-bottom: -2px;
}

#rop_core .btn.btn-tumblr {
border-color: #304d69;
color: #fff;
Expand Down Expand Up @@ -974,7 +978,7 @@ a.active {
}

#rop_core .form-group:not(:last-child) {
margin-bottom: 0.4rem;
margin-bottom: 0.8rem;
}

#rop_core fieldset {
Expand Down Expand Up @@ -2874,7 +2878,6 @@ a.active {
}

#rop_core .modal-container .modal-body {
overflow-y: auto;
position: relative;
max-height: 50vh;
padding: 0.8rem;
Expand Down Expand Up @@ -4460,6 +4463,11 @@ a.active {
text-overflow: initial;
}

#rop_core .no-wrap-tooltip.tooltip::after {
white-space: initial;
text-overflow: initial;
}

#rop_core .rop-queue-post .card-top-header.columns {
position: absolute;
top: 0;
Expand Down Expand Up @@ -4799,4 +4807,30 @@ padding: 0 20px;
.tile-action div {
display: inline-block;
vertical-align: middle;
}
}

#rop_core .tw-signin-advanced-config {
position: relative;
max-width: 205px;
margin: 0 auto;
}
#rop_core .tw-signin-advanced-config > .wpr-tooltip {
padding: 0;
top: 5px;
}

#rop_core .tw-signin-advanced-config > .wpr-tooltip > .wpr-tooltip {
background-color: rgba( 0, 0, 0, 0.8 );
text-align: left;
font-size: 12px;
padding: 8px 12px;
}

#rop_core .tw-signin-advanced-config > .wpr-tooltip > .wpr-tooltip a {
color: #fff;
text-decoration: underline;
}

#rop_core .uppercase {
text-transform: uppercase;
}
Loading

0 comments on commit baec1e6

Please sign in to comment.