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

v1.5.0 #22

Merged
merged 84 commits into from Jun 29, 2017
Merged

v1.5.0 #22

merged 84 commits into from Jun 29, 2017

Conversation

JoryHogeveen
Copy link
Collaborator

@JoryHogeveen JoryHogeveen commented Jun 19, 2017

Ready for testing!

This PR will address version 1.5.0, fixing mutiple issues:

Changelog

Core changes:

  • Refactoring for CC fixes
  • Added setting handlers in the library to make sure settings are always of the correct type and format
    • Also added a unit test for this.
  • Simplified code where possible
  • Improved inline PHPdocs

Tests:

Settingpage & Widget form

  • Check saving and displaying options.
  • Try to save wrong stuff by manually edit the form content in the console.
    • Add some malicious stuff in there.

Widget form

  • Test capability filters
    • Existing settings should save even if the input isn't shown
    • Disallowing predefined select should also hide the custom CSS input

Frontend

  • Check correct rendering of all set classes (custom, predefined and other)
  • Check order of predefined classes
  • Check params fix option (register sidebar with empty before and after parameters to test)
  • Check appending classes with double and single quote format attributes.
  • Removing duplicates

ImportExport

  • Import from current version after fresh export
  • Import from older versions (see update method in library)
    • 1.1
    • 1.2
    • 1.4

Updating

  • Configure plugin in an older version and update to the new version. All settings should stay the same and the front-end should work without changes (excerpt for class order)
    • 1.1
    • 1.2
    • 1.4

@JoryHogeveen JoryHogeveen added this to the 1.4.1 milestone Jun 19, 2017
@JoryHogeveen JoryHogeveen self-assigned this Jun 19, 2017
@JoryHogeveen
Copy link
Collaborator Author

@cleverness
Let me know if you see anything you don't like or you would like to change.

Also, with the patches for the mentioned issues (new hooks for example) it might be good to set the version to 1.5.0. Let me know what you think.


// Add first, last, even, and odd classes
if ( 1 === (int) $widget_css_classes['show_number'] || 1 === (int) $widget_css_classes['show_location'] || 1 === (int) $widget_css_classes['show_evenodd'] ) {
if ( ! $widget_number ) {
$widget_number = array();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@cleverness
At the start of this method $widget_number is declared as a global variable. Is there a specific reason to make it a global variable? It doesn't look like it's supposed to be modified externally so maybe it's better to declare it as a static variable inside this method.
Let me know!

Copy link
Owner

Choose a reason for hiding this comment

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

I don't think there is a reason it needs to global, but again, that was in the initial build in 2012 I did so the details on why are pretty fuzzy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed!

@cleverness
Copy link
Owner

I did some quick basic testing from just the previous version to this. I didn't run into any issues.

@JoryHogeveen
Copy link
Collaborator Author

Alrighty, I'll make some time today or this weekend to test some more and if that's all good that I think it's good to go!

@JoryHogeveen
Copy link
Collaborator Author

@cleverness
If/when you have the time, can you test again? Also frontend display etc?
I've added another new option "remove duplicate classes" and enhanced the code a bit more.
All tests in the tasklist are done and checked in two of my test sites but an extra pair of eyes is always good!

I'm going to wrap it up for this release, other stuff will need to go in a next one. If you can think of anything I should check/fix/change for 1.5 let me know!

@JoryHogeveen JoryHogeveen merged commit 0ccf09e into cleverness:master Jun 29, 2017
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.

None yet

3 participants