Releases: mcclatchy/zones
1.0.17
1.0.16
Testing Non Subs in two markets
This release enables the VIP concept for non-subs on kansas.com and kentucky.com. We are limiting ourselves to these two markets for a short time to fully understand the revenue impact. The VIP cadence for non-subs is set to 3.
Subscriber updates
We evaluated a subscriber VIP cadence of 4 during the Super Bowl and overall it's a better balance. This release changes it to 4 for all markets.
Under the hood
I've refactored the zones.js library to allow for insertion of new zones after the initial Map has been created. This will allow us to better organize logic trees as they get more complex. I also added before(id) and after(id) functions to the Zone class, allowing for zones to position themselves relative to each other.
Not only will this make the logic easier to maintain, it was necessary because I removed all functionality to delete, alter or replace existing zones. After discussions with multiple development groups and stakeholders, it's better if we never do this. Other than zones not rendering due to there not being enough valid insertion points, all changes to anything coming from WPS should be additive.
Lastly, I added the functionality on story pages to reflect the allow_ads configuration. If ads are disabled on a story page, this code bails out and adds a single entry to the mi.zones.changes map with the message, "ads are disabled for this page"
1.0.15
1.0.14
Zephr
Zones can now communicate with Zephr features, and can also pass custom inputs available in Yozons like market or taxonomy. HTML snippets returned from Zephr will be injected into the zone.
Featured Carousels
This release includes the supporting logic to display the featured carousels after zone-el-101 for subscribers. Actually launching this feature will require a section parameter configuration in the future and re-enabling the feature in Zephr.
Temporary updates
We've tightened the valid insertion point (VIP) cadence from five to four for kansascity.com subscribers. This is a temporary change for the Super Bowl.
1.0.13
Bug fixes
I apologize but I messed up the cadence in the distribute function in the last release that caused space to increase between zones. This fixes that.
Zones API
I added the getValidInsertionPoints method to the zones API to provide a single source of truth across multiple applications.
1.0.12
Communication bridge
Zone changes are now communicated properly in the window.mi.zones.changes object. Big thanks to Joe Whetzel for helping me understand the lockers a bit better. The property is a Map() with the zone ID attribute for each zone changed as the key and a general message. Check release 1.0.6 for notes on the specific messages.
VIP rule changes
After reviewing typical sports writing patterns, I've removed the rule to check for the previous paragraph length because quotes are shorter on average. The first paragraph is now automatically valid no matter the length, and I've simplified the cadence for subscribers to inject a zone every 5 valid points.
The new rules are:
- Anything that is not a paragraph is invalid
- The first paragraph is always valid
- Paragraphs less that 100 characters are invalid
- Paragraphs not preceded by another paragraph are invalid
1.0.10
1.0.9
1.0.8
1.0.6
The Communication Bridge
I refactored the code and moved the map logic into the zones module, including some new methods to interact with the map. This let me set up consistent messaging, which is the real point of this release. The zones module now creates a Map at mi.zones.changes and each change gets a new entry whenever it is manipulated. The zone ID is the key and the value is the action that was taken. I've also removed all console logging.
Here's a list of possible messages and what they mean:
- zone moved into new location | this zone was successfully moved
- null zone element | the zone could neither find nor create the
<div>(uncommon) - zone disabled | the zone was never assigned a vip (uncommon)
- no valid insertion point | there were not enough valid points for this zone
- zone removed | the zone was intentionally removed by us
I've started a function to handle type changes, but for now that doesn't do anything. I'll keep progressing on this after talking to the performance team. Those will have another message which I'll list here for reference.
- zone changed to xxx | we intentionally changed a zone type