Skip to content

Various tweaks - #118

Merged
jdevalk merged 20 commits into
developfrom
various-tweaks
Jan 23, 2024
Merged

jdevalk merged 20 commits into
developfrom
various-tweaks

Conversation

@aristath

@aristath aristath commented Jan 23, 2024 •

Copy link
Copy Markdown
Member

Context

This PR contains various tweaks and improvements:

  • Removes the grunt task. Our CSS & JS files are so small and basic that we don't need build processes, minification etc.
  • Fixes errors in VSCode due to PHPCompatibility checks (tweaked the PHPCS ruleset)
  • Code readability tweaks, especially in places where we print HTML in admin pages. The structure didn't change there, just separating long lines etc.
  • Made a few strings translatable
  • Fixed a bug where a variable was undefined
  • Changed the enqueue functions to point to the correct JS & CSS files
  • Replaced the yst prefix with epch (Emilia Projects Comment Hacks)
  • Removed the Composer autoloader and added a new custom one with a hardcoded classmap

Relevant technical choices:

Test instructions

  • Activate the plugin - ensure there are no fatalities in the autoloader
  • Go the the admin page - check that the page appears correctly and tabs work as expected

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Block/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Documentation

  • I have written documentation for this change.

Quality assurance

  • I have tested this code to the best of my abilities.
  • I have added unit tests to verify the code works as intended.
  • I have checked that the base branch is correctly set.

Fixes #

@aristath
aristath changed the base branch from trunk to develop January 23, 2024 09:53
Comment thread .phpcs.xml.dist Resolved
Comment thread admin/admin.php
Comment on lines -190 to +213
$roles = \apply_filters( 'EmiliaProjects\WP\Comment\notification_roles', $roles );
$roles = \apply_filters(
'EmiliaProjects\WP\Comment\notification_roles',
[ 'contributor', 'author', 'editor', 'administrator', 'super-admin' ]
);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$roles was undefined here. The doc for this filter was saying "Defaults to contributor and up", so the array used here contains these roles.

@aristath
aristath marked this pull request as ready for review January 23, 2024 10:59
@aristath
aristath requested a review from jdevalk January 23, 2024 10:59
@aristath aristath mentioned this pull request Jan 23, 2024
6 of 9 tasks

@jdevalk jdevalk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of remarks above.

I also think we should update composer.json to be all Emilia not joost.blog?

Comment thread admin/assets/css/comment-hacks.css Resolved
Comment thread admin/views/comment-parent-box.php Resolved
Comment thread inc/clean-emails.php Resolved
Comment thread inc/clean-emails.php Resolved

@jdevalk jdevalk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few more comments.

Comment thread .phpcs.xml.dist Resolved
Comment thread .phpcs.xml.dist Resolved
@aristath

Copy link
Copy Markdown
Member Author

I also think we should update composer.json to be all Emilia not joost.blog?

I changed the homepage to point to https://emilia.capital. The authors array however has your name and personal blog, I don't think we have to change that, should be fine to keep it since it describes the author 🤔

Comment thread admin/admin.php Resolved
Comment thread admin/admin.php Resolved
@github-actions

github-actions Bot commented Jan 23, 2024 •

Copy link
Copy Markdown

WordPress Playground

You can easily test this pull request on the WordPress Playground.

@jdevalk
jdevalk merged commit 100ec2b into develop Jan 23, 2024
@jdevalk
jdevalk deleted the various-tweaks branch January 23, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants