Skip to content

Commit

Permalink
Continue to sync playground-ready with newest PRs on main (#129)
Browse files Browse the repository at this point in the history
* Prevent Recursion on certain Host name patterns (#69)

---------

Signed-off-by: Namith Jawahar <48271037+namithj@users.noreply.github.com>

* Playground ready updating into main (#71)

* Update blueprint.json

Switching to default theme of 2022 to support minimum WP Playground support for WordPress version as 5.9.9

Signed-off-by: Namith Jawahar <48271037+namithj@users.noreply.github.com>

* Switching blueprint.json to 2022 theme

Signed-off-by: Alex Sirota <alex@newpathconsulting.com>

---------

Signed-off-by: Alex Sirota <alex@newpathconsulting.com>
Signed-off-by: Namith Jawahar <48271037+namithj@users.noreply.github.com>

* `Add New Plugin`: Remove 'Featured' and 'Favorites' tabs when API rewrite is enabled. (#80)

* Add class for overriding plugins screens.

* Remove unused tabs when API rewrite is enabled.

* `Add New Theme`: Remove 'Favorites' filter tab when API rewrite is enabled. (#82)

* Add class for overriding themes screens.

* Hide unsupported filters.

* Redirect unsupported filters to `theme-install.php`.

---------

Signed-off-by: Alex Sirota <alex@newpathconsulting.com>
Co-authored-by: Alex Sirota <alex@newpathconsulting.com>

* Add PHPUnit. (#87)

* Add PHPUnit scaffolding.

* Add Composer files for dependencies and test script.

* Add `.gitignore`.

* Add sample test for `Admin_Settings::get_setting()`.

* Add PHP 8.3 to the test matrix.

* Add `.cache/*` to `.gitignore`.

* Limit testing to PHP 7.4 (minimum) and 8.3 (latest).

* `Plugins Screens`: Initialize in `Controller::__construct()`. (#89)

* `Workflows`: Fix PHP version and add more workflow triggers. (#92)

* Fix PHP version.

* Add `push` and `workflow_dispatch` workflow triggers.

* `Tests`: Ensure options are not set when tests run. (#95)

* Introduce a test constant.

* Don't initialize when the tests are running.

* Use a new object for testing `Admin_Settings::get_setting()`.

* Warning when debug-aspire-update.log doesnt exist (#109)

* `Tests`: Add default coverage settings. (#97)

* Improve I18N Issues Based on version 0.5 (#104)

* Fixes Settings not getting saved when rewrites were turned off (#108)

* Add French Translation (#105)

* I18n fr fr (#113)

* Translations loading fix112 (#114)

* Add French translations. 

* load any available translations with code in the plugin

* #110 (#116)

Fixes #110

* Add nonce verification and sanitize `$_REQUEST/$_GET` values. (#115)

Signed-off-by: Colin Stewart <79332690+costdev@users.noreply.github.com>

* Added German Translation (#111)

* added German translation

* added gitignore for .DS_Store


Signed-off-by: Harikrishnan R <harikrishnanr994@gmail.com>

* Voltron has landed. (#117)

The Voltron has landed. See if you can find where.

* `Admin Settings`: Delete all settings when the plugin is uninstalled. (#118)

* `Admin Settings`: Add multisite-safe deletion of all settings.

* Delete all settings when the plugin is uninstalled.

* add multisite support (#102)

* accidentally deleted (#124)

Fixed typo in code deleted when addressing #102

* Add `.editorconfig`. (#123)

* create zip with each new tagged release (#121)

* create zip with each new tagged release

* update .gitattributes

* Cleanup after `.editorconfig` was added to the repository. (#126)

* Add coding standard. (#127)

* Add Coding Standard.

* Add PHPCS cache directory.

* Coding Standards: Apply PHPCBF to codebase.

* Coding Standards: Add GitHub workflow.

---------

Signed-off-by: Alex Sirota <alex@newpathconsulting.com>
Co-authored-by: Alex Sirota <alex@newpathconsulting.com>

---------

Signed-off-by: Namith Jawahar <48271037+namithj@users.noreply.github.com>
Signed-off-by: Alex Sirota <alex@newpathconsulting.com>
Signed-off-by: Colin Stewart <79332690+costdev@users.noreply.github.com>
Signed-off-by: Harikrishnan R <harikrishnanr994@gmail.com>
Co-authored-by: Namith Jawahar <48271037+namithj@users.noreply.github.com>
Co-authored-by: Colin Stewart <79332690+costdev@users.noreply.github.com>
Co-authored-by: Alex Lion <learnwithalex@gmail.com>
Co-authored-by: Sébastien SERRE <sebastien@thivinfo.com>
Co-authored-by: Harikrishnan R <harikrishnanr994@gmail.com>
Co-authored-by: Andy Fragen <andy@thefragens.com>
  • Loading branch information
7 people authored Nov 5, 2024
1 parent ccd03ce commit 6845ffa
Show file tree
Hide file tree
Showing 21 changed files with 1,049 additions and 466 deletions.
Empty file added .cache/.gitkeep
Empty file.
85 changes: 85 additions & 0 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: PHP coding standards

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
# Runs the PHP coding standards checks.
#
# Violations are reported inline with annotations.
#
# Performs the following steps:
# - Checks out the repository.
# - Sets up PHP.
# - Configures caching for PHPCS scans.
# - Installs Composer dependencies.
# - Make Composer packages available globally.
# - Runs PHPCS on the full codebase (warnings excluded).
# - Generate a report for displaying issues as pull request annotations.
# - Runs PHPCS on the `tests` directory without (warnings included).
# - Generate a report for displaying `test` directory issues as pull request annotations.
# - Ensures version-controlled files are not modified or deleted.
phpcs:
name: Run coding standards checks
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 20

steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Set up PHP
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with:
coverage: none
tools: cs2pr

# This date is used to ensure that the PHPCS cache is cleared at least once every week.
# http://man7.org/linux/man-pages/man1/date.1.html
- name: "Get last Monday's date"
id: get-date
run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT

- name: Cache PHPCS scan cache
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: |
.cache/phpcs-src.json
.cache/phpcs-tests.json
key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-php-${{ inputs.php-version }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }}

- name: Install Composer dependencies
uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0

- name: Make Composer packages available globally
run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH

- name: Run PHPCS on all files
id: phpcs-files
if: ${{ ! inputs.old-branch }}
run: phpcs -n --report-full --cache=./.cache/phpcs-src.json --report-checkstyle=./.cache/phpcs-report.xml

- name: Show PHPCS results in PR
if: ${{ always() && steps.phpcs-files.outcome == 'failure' }}
run: cs2pr ./.cache/phpcs-report.xml

- name: Check test suite files for warnings
id: phpcs-tests
run: phpcs tests --report-full --cache=./.cache/phpcs-tests.json --report-checkstyle=./.cache/phpcs-tests-report.xml

- name: Show test suite scan results in PR
if: ${{ always() && steps.phpcs-tests.outcome == 'failure' }}
run: cs2pr ./.cache/phpcs-tests-report.xml

- name: Ensure version-controlled files are not modified during the tests
run: git diff --exit-code
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
/tests/cache
/tests/coverage
.DS_Store

# Track placeholders so that empty directories stay in the repo.
!.gitkeep
127 changes: 64 additions & 63 deletions assets/css/aspire-update.css
Original file line number Diff line number Diff line change
@@ -1,63 +1,64 @@
@keyframes glow {
0% {
background-color: rgba(255, 223, 0, 0.1);
}

100% {
background-color: none;
}
}

.glow-reveal {
animation: glow 0.5s ease-in-out;
}

.aspireupdate-settings-field-hosts-wrapper .aspireupdate-settings-field-hosts-row {
margin: 0 0 10px;
}

#aspireupdate-generate-api-key {
display: inline-block;
width: 30px;
height: 30px;
background: url(../images/icon-key.svg) no-repeat center center / 24px 24px;
background-color: #cbcbcb;
border: 1px solid #8c8f94;
border-radius: 3px;
clip-path: inset(0 0 0 0);
color: transparent;
cursor: pointer;
transition: background-color 0.3s ease;
}

#aspireupdate-generate-api-key:hover {
background-color: #e3e3e3;
}

.aspireupdate-settings-field-wrapper p.error {
color: #bc3b3b;
display: none;
}

#voltron {
color: transparent;
font-size: 8px;
line-height: 6px;
display: inline-block;
cursor: default;
}

#voltron:hover {
animation: blink 1.8s ease-in-out infinite;
animation-delay: 5s;
}

@keyframes blink {
0%,
100% {
color: inherit;
}
50% {
color: transparent;
}
}

@keyframes glow {
0% {
background-color: rgba(255, 223, 0, 0.1);
}

100% {
background-color: none;
}
}

.glow-reveal {
animation: glow 0.5s ease-in-out;
}

.aspireupdate-settings-field-hosts-wrapper .aspireupdate-settings-field-hosts-row {
margin: 0 0 10px;
}

#aspireupdate-generate-api-key {
display: inline-block;
width: 30px;
height: 30px;
background: url(../images/icon-key.svg) no-repeat center center / 24px 24px;
background-color: #cbcbcb;
border: 1px solid #8c8f94;
border-radius: 3px;
clip-path: inset(0 0 0 0);
color: transparent;
cursor: pointer;
transition: background-color 0.3s ease;
}

#aspireupdate-generate-api-key:hover {
background-color: #e3e3e3;
}

.aspireupdate-settings-field-wrapper p.error {
color: #bc3b3b;
display: none;
}

#voltron {
color: transparent;
font-size: 8px;
line-height: 6px;
display: inline-block;
cursor: default;
}

#voltron:hover {
animation: blink 1.8s ease-in-out infinite;
animation-delay: 5s;
}

@keyframes blink {
0%,
100% {
color: inherit;
}
50% {
color: transparent;
}
}
Loading

0 comments on commit 6845ffa

Please sign in to comment.