Skip to content

Commit

Permalink
Updates for v1.4.0 (#18)
Browse files Browse the repository at this point in the history
* Add WordPress 5.0 to travis build

* Add element filter API, link notes, bitly report, additional tests

* Add code standards fixes

* Add version increment

* Fix link label concatenation for batch created links with multiple labels

* Fix notes label

* Add support for showing note previews in link list

* Add dependency updates

* Remove unused method

* Add new test

* Add new test

* Increment version number

* Add full length notes support

* Fix spacing

* Add network updates

* Add updated pot language file

* Fix test version number

* Add additional check to filter test

* Change filter ui test

* Add assertions to settings register test

* Update README

* Fix output test api usage
  • Loading branch information
chrislarrycarl authored Dec 16, 2018
1 parent 9325908 commit e16d57c
Show file tree
Hide file tree
Showing 25 changed files with 956 additions and 141 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
sudo: false
dist: trusty

language: php
Expand All @@ -25,6 +24,8 @@ matrix:
env: WP_VERSION=4.8 CODE_STYLES=phpcs
- php: 7.2
env: WP_VERSION=4.9 CODE_STYLES=phpcs
- php: 7.2
env: WP_VERSION=5.0 CODE_STYLES=phpcs
- php: 7.2
env: WP_VERSION=nightly CODE_STYLES=phpcs
- php: 7.1
Expand All @@ -37,6 +38,8 @@ matrix:
env: WP_VERSION=4.8
- php: 5.6
env: WP_VERSION=4.9
- php: 5.6
env: WP_VERSION=5.0
- php: 5.6
env: WP_VERSION=nightly

Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
# utm.codes Developer Repository
<p align="center" style="padding-bottom:20px"><img src="img/utm-dot-codes-logo.png" width="400"></p><p>&nbsp;</p>

[![Build Status](https://travis-ci.org/christopherldotcom/utm.codes.svg?branch=master)](https://travis-ci.org/christopherldotcom/utm.codes) [![codecov](https://codecov.io/gh/christopherldotcom/utm.codes/branch/master/graph/badge.svg)](https://codecov.io/gh/christopherldotcom/utm.codes) [![RIPS CodeRisk](https://coderisk.com/wp/plugin/utm-dot-codes/badge "RIPS CodeRisk")](https://coderisk.com/wp/plugin/utm-dot-codes) [![StackShare](https://img.shields.io/badge/tech-stack-0690fa.svg?style=flat)](https://stackshare.io/christopherl/utm-codes)

This is the developer repository for utm.codes, a WordPress plugin.
Welcome to the developer repository for utm.codes, a WordPress plugin that makes creating analytics friendly marketing links quick and easy.

For more information about this plugin [visit utm.codes](https://utm.codes).

To download just the plugin (without the developer extras in this repo) check out [utm.codes on WordPress.org](https://wordpress.org/plugins/utm-dot-codes/).

### Compatibility

[![WordPress Compatibility](https://img.shields.io/badge/WordPress-4.7_to_5.0-blue.svg?logo=wordpress)](https://wordpress.org/) [![PHP Compatibility](https://img.shields.io/badge/PHP-5.6_to_7.2-%238892BF.svg?logo=php)](https://php.net/)

utm.codes is developed for, and tested with, a variety of recent platform versions, including:

- WordPress 4.7, 4.8, 4.9, and 5.0
- PHP 5.6, 7.0, 7.1, and 7.2

## Branches

**master** - Contains the latest usable code and will mirror the code available for download from WordPress.org.
Expand Down
22 changes: 16 additions & 6 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Contributors: chrislarrycarl
Donate link: https://utm.codes/pricing/
Tags: analytics, utm codes, google analytics, tracking links, campaign marketing, link generator
Requires at least: 4.7.0
Tested up to: 5.0.0
Tested up to: 5.0.1
Requires PHP: 5.6.0
Stable tag: 1.3.1
Stable tag: 1.4.0
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand All @@ -25,6 +25,8 @@ For more information, videos, and helpful tips [visit the utm.codes website](htt
- Search, filter, and easily find existing links using familiar WordPress admin controls
- Link builder automatically detects url error responses to prevent creating bad links
- One click shortening with Bitly for easier link sharing
- Save notes with link for team communication, usage context, future reference, and more
- Link element API for custom utm code formatting
- Supports adding additional custom parameters to links for improved versatility
- Multi-user access to share creation and management responsibilities
- See your current link count in the admin dashboard "At a Glance"
Expand Down Expand Up @@ -75,24 +77,32 @@ Simply add the parameter to your Link URL (e.g. https://example.com/?param=value

== Changelog ==

= 1.4.0 =

- New API filter for custom link element formats (examples in the wiki)
- New Notes field - save notes with your links for contextual reference
- New link to Bitly report in links list for shortened links
- Additional Code Standards Improvements
- Fix link labels for batch social links to support security release changes

= 1.3.1 =

This release does not add new functionality, however, it does meaningfully improve utm.codes adherence to WordPress coding standards and improves the overall quality of the plugin.

= 1.3 =
= 1.3.0 =

- Supports WordPress 5.0
- Fix filter label
- Replace gulp build with webpack
- Improved test coverage

= 1.2 =
= 1.2.0 =

- Replace Goo.gl with Bitly url shortener
- New "Labels" taxonomy
- New link tester

= 1.1 =
= 1.1.0 =

- New link formatting options
- New Logo
Expand All @@ -101,6 +111,6 @@ This release does not add new functionality, however, it does meaningfully impro

Fixes bug in batch link creation where source/medium were omitted from first generated link.

= 1.0 =
= 1.0.0 =

Initial release
11 changes: 11 additions & 0 deletions _build/javascript/editor/textarea-size.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
;(function ($) {

$(function () {

if($('#utmdclink_notes').length) {
$('#utmdclink_notes').height( $('#utmdclink_notes')[0].scrollHeight );
}

});

})(jQuery);
2 changes: 2 additions & 0 deletions _build/javascript/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import './editor/batch-toggle'
import './editor/textarea-size'
import './editor/url-tester'
import './postlist/link-copy'
import './settings/slider'
25 changes: 25 additions & 0 deletions _build/javascript/settings/slider.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
;(function ($) {

$(function () {

if($('.utmdclinks-settings-slider input').length) {
$('.utmdclinks-settings-slider input').siblings('output').html(
$('.utmdclinks-settings-slider input').val()
);
}

$('.utmdclinks-settings-slider input').on('input', function(event){
$(this).siblings('output').html($(this).val());
});

$('#utmdclink_notes_show').on('change', function(event){
if( $(this).attr('checked') == 'checked' ) {
$('#utmdclinks_notes_preview_row').removeClass('hidden');
} else {
$('#utmdclinks_notes_preview_row').addClass('hidden');
}
});

});

})(jQuery);
6 changes: 5 additions & 1 deletion _build/styles/_/_settings.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// colors
// WordPress Colors
$wp_gray_dark: #23282d;
$wp_gray: #f1f1f1;
$wp_green: #46b450;
$wp_red: #dc3232;
$wp_blue: #0084c4;

// Base Colors
$white: #ffffff;
2 changes: 1 addition & 1 deletion _build/styles/core.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Mixins
@import 'mixins/_toggle.scss';
@import 'mixins/*';

// Settings & Globals
@import '_/settings';
Expand Down
96 changes: 96 additions & 0 deletions _build/styles/mixins/_slider.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
@mixin css-slider($background_color: #ffffff, $slider_color: #0084c4, $track_width: 140px, $track_height: 28px, $button_width: 28px, $button_height: 28px) {

input[type=range] {
background: transparent;
-webkit-appearance: none;
margin: 0;
padding: 0;
width: $track_width;
vertical-align: middle;

&:focus {
outline: 0;
-moz-outline-style: 0;

&::-webkit-slider-runnable-track,
&::-ms-fill-lower,
&::-ms-fill-upper {
background: $slider_color;
}

}

&::-webkit-slider-runnable-track {
width: 100%;
height: $track_height;
cursor: pointer;
background: $slider_color;
border: 2px solid $slider_color;
}

&::-webkit-slider-thumb {
width: $button_width;
height: $button_height;
margin-top: -2px;
background: $background_color;
cursor: pointer;
-webkit-appearance: none;
border-top: 2px solid $slider_color;
border-bottom: 2px solid $slider_color;
border-radius: 0;
}

&::-moz-focus-outer {
border: 0;
}

&::-moz-range-track {
width: 100%;
height: $track_height;
cursor: pointer;
background: $slider_color;
border: 2px solid $slider_color;
}

&::-moz-range-thumb {
width: $button_width;
height: $button_height;
background: $background_color;
cursor: pointer;
-webkit-appearance: none;
border: 0;
border-radius: 0;
}

&::-ms-track {
width: 100%;
height: $track_height;
cursor: pointer;
background: transparent;
border-color: transparent;
color: transparent;
}

&::-ms-fill-lower {
background: $slider_color;
border: 0;
}

&::-ms-fill-upper {
background: $slider_color;
border: 0;
}

&::-ms-thumb {
width: $button_width;
height: calc(#{$button_height} - 2px);
background: $background_color;
cursor: pointer;
margin-top: 0;
border: 1px solid $slider_color;
border-radius: 0;
}

}

}
15 changes: 15 additions & 0 deletions _build/styles/partials/_meta-box.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,19 @@

}

.utmdclink {

&_notes {

textarea {
width: 100%;
min-height: 200px;
padding: 10px;
resize: vertical;
}

}

}

}
1 change: 1 addition & 0 deletions _build/styles/partials/_post-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
&-copy {
width: 100%;
max-width: 100%;
margin-bottom: 10px;
}

}
55 changes: 54 additions & 1 deletion _build/styles/partials/_settings.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
#utm-dot-codes-logo {
#utm_dot_codes_logo {
width: 250px;
margin: auto;
display: block;
}

#utmdclinks_notes_preview_row {

&.hidden {
display: none;
}

}

.utmdclinks {

&-settings {
Expand Down Expand Up @@ -42,6 +50,51 @@
&-toggle {
@include css-toggle();
}

&-slider {
@include css-slider();

output {
position: relative;
display: inline-block;
margin-left: 25px;
padding: 7px;
margin-top:-5px;
width: 20px;
text-align: center;
background: $white;
border: solid 2px $wp_blue;

&::before,
&::after {
right: 100%;
top: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}

&::before {
border-color: transparent;
border-right-color: $wp_blue;
border-width: 13px;
margin-top: -13px;
}

&::after {
border-color: transparent;
border-right-color: $white;
border-width: 10px;
margin-top: -10px;
}

}

}

}

}
8 changes: 4 additions & 4 deletions _test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-http.
PHPUnit 6.5.13 by Sebastian Bergmann and contributors.
................................... 35 / 35 (100%)
......................................... 41 / 41 (100%)
Time: 16.78 seconds, Memory: 36.00MB
Time: 22.53 seconds, Memory: 40.00MB
OK (37 tests, 343 assertions)
OK (41 tests, 381 assertions)
Generating code coverage report in Clover XML format ... done
```
Expand Down Expand Up @@ -99,7 +99,7 @@ From the project root running the following command will test the project PHP fi
From the project root running the following command will test utm.codes for compatibility with PHP 5.6+

```
./vendor/bin/phpcs --standard=PHPCompatibility -p --runtime-set testVersion 5.4- --report=summary ./index.php ./utm-dot-codes.php ./classes
./vendor/bin/phpcs --standard=PHPCompatibility -p --runtime-set testVersion 5.6- --report=summary ./index.php ./utm-dot-codes.php ./classes
```

## Travis Build
Expand Down
Loading

0 comments on commit e16d57c

Please sign in to comment.