<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[8611] sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks: WordCamp Blocks: Apply coding standards.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/8611">8611</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/8611","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>iandunn</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2019-04-09 00:40:59 +0000 (Tue, 09 Apr 2019)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>WordCamp Blocks: Apply coding standards.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblockseslintrcjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/.eslintrc.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcorganizersblockcontentjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/block-content.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcorganizerseditjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/edit.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcorganizersindexjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/index.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcorganizersorganizersselectjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/organizers-select.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsessionsblockcontentjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/block-content.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsessionsindexjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/index.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsessionsinspectorcontrolsjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/inspector-controls.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsessionssessionsselectjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/sessions-select.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsharedavatarinspectorcontrolsjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/avatar/inspector-controls.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsharedfeaturedimageindexjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/featured-image/index.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsharedfeaturedimageinspectorcontroljs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/featured-image/inspector-control.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsharedgridlayoutblockcontentjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/grid-layout/block-content.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcspeakerseditjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/edit.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcspeakersindexjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/index.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcspeakerstoolbarjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/toolbar.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsponsorsblockcontentjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/block-content.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsponsorsblockcontrolsjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/block-controls.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsponsorseditjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/edit.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsponsorsindexjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/index.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsponsorsinspectorcontrolsjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/inspector-controls.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblockswebpackconfigjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/webpack.config.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblockseslintrcjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/.eslintrc.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/.eslintrc.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/.eslintrc.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,10 +1,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = {
</span><span class="cx" style="display: block; padding: 0 10px"> extends : 'plugin:@wordpress/eslint-plugin/recommended',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> globals : {
</span><span class="cx" style="display: block; padding: 0 10px"> wp : true,
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> rules : {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- /**
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
</ins><span class="cx" style="display: block; padding: 0 10px"> * Instead of turning this off altogether, we should safelist the parameters that are coming in from
</span><span class="cx" style="display: block; padding: 0 10px"> * the REST API. However, the `allow` config for this rule is only available in eslint 5+. Currently
</span><span class="cx" style="display: block; padding: 0 10px"> * the @wordpress/scripts package uses eslint 4.x, but the next version will bump it up to 5.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -24,8 +26,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * ],
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> 'camelcase' : 'off',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- /**
- * Copied from our previous custom .eslintrc.js file.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /*
+ * Align object parameters on their assignment operator (:), just like assignment statements are
+ * aligned on `=`.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> 'key-spacing' : [ 'error', {
</span><span class="cx" style="display: block; padding: 0 10px"> 'align' : {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -34,13 +38,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'on' : 'colon',
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> } ],
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- /**
- * Copied from our previous custom .eslintrc.js file.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /*
+ * Allow multiple spaces in a row.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Ideally this should be on, because we don't want to allow things like `const foo == bar;`, but the rule
</span><span class="cx" style="display: block; padding: 0 10px"> * currently isn't flexible enough to allow all the exceptions we need. Specifically, there are times where
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * readability is vastly improved by aligning attributes in consecutive lines, like the
- * `padding-line-between-statements` objects in this file.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * readability is vastly improved by aligning attributes in consecutive lines.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Alternate configuration if we ever want to re-enable this:
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcorganizersblockcontentjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/block-content.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/block-content.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/block-content.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6,7 +6,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * WordPress dependencies
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-const { Disabled } = wp.components;
</del><span class="cx" style="display: block; padding: 0 10px"> const { Component } = wp.element;
</span><span class="cx" style="display: block; padding: 0 10px"> const { decodeEntities } = wp.htmlEntities;
</span><span class="cx" style="display: block; padding: 0 10px"> const { __ } = wp.i18n;
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcorganizerseditjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/edit.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/edit.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/edit.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -47,7 +47,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> fetchOrganizerDetails() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> const allOrganizerPosts = apiFetch( {
</span><span class="cx" style="display: block; padding: 0 10px"> path: addQueryArgs( '/wp/v2/organizers', ALL_POSTS_QUERY ),
</span><span class="cx" style="display: block; padding: 0 10px"> } );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -113,8 +112,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- blockData,
- organizerPosts: getEntityRecords( 'postType', 'wcb_organizer', organizersQuery ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ blockData : blockData,
+ organizerPosts : getEntityRecords( 'postType', 'wcb_organizer', organizersQuery ),
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcorganizersindexjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/index.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/index.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/index.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6,10 +6,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Internal dependencies
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-import { edit } from './edit';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+import { edit } from './edit';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-export const name = 'wordcamp/organizers';
-export const LABEL = __( 'Organizers', 'wordcamporg' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+export const name = 'wordcamp/organizers';
+export const LABEL = __( 'Organizers', 'wordcamporg' );
</ins><span class="cx" style="display: block; padding: 0 10px"> export const ICON = 'groups';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> export const settings = {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,8 +17,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> description : __( 'Add a list of organizers.', 'wordcamporg' ),
</span><span class="cx" style="display: block; padding: 0 10px"> icon : ICON,
</span><span class="cx" style="display: block; padding: 0 10px"> category : 'wordcamp',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- edit,
- save : function() {
- return null;
- },
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ edit : edit,
+ save : () => null,
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcorganizersorganizersselectjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/organizers-select.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/organizers-select.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/organizers-select.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -33,7 +33,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> fetchSelectOptions( props ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> const { allOrganizerPosts, allOrganizerTerms } = props;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> const parsedPosts = allOrganizerPosts.then(
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsessionsblockcontentjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/block-content.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/block-content.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/block-content.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7,7 +7,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * WordPress dependencies
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-const { Disabled } = wp.components;
</del><span class="cx" style="display: block; padding: 0 10px"> const { Component } = wp.element;
</span><span class="cx" style="display: block; padding: 0 10px"> const { decodeEntities } = wp.htmlEntities;
</span><span class="cx" style="display: block; padding: 0 10px"> const { __ } = wp.i18n;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -24,7 +23,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> let speakerData = get( session, '_embedded.speakers', [] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> speakerData = speakerData.map( ( speaker ) => {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- let { link = '', title = {} } = speaker;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ const { link = '' } = speaker;
+ let { title = {} } = speaker;
+
</ins><span class="cx" style="display: block; padding: 0 10px"> title = title.rendered || __( 'Unnamed', 'wordcamporg' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! link ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -70,7 +71,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> decodeEntities( session.session_date_time.date ),
</span><span class="cx" style="display: block; padding: 0 10px"> decodeEntities( session.session_date_time.time ),
</span><span class="cx" style="display: block; padding: 0 10px"> (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <span className={ classnames( 'wordcamp-session-track', 'wordcamp-session-track-' + decodeEntities( firstTrack.slug.trim() ) ) }>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <span
+ key={ firstTrack.id }
+ className={ classnames( 'wordcamp-session-track', 'wordcamp-session-track-' + decodeEntities( firstTrack.slug.trim() ) ) }
+ >
</ins><span class="cx" style="display: block; padding: 0 10px"> { decodeEntities( firstTrack.name.trim() ) }
</span><span class="cx" style="display: block; padding: 0 10px"> </span>
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsessionsindexjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/index.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/index.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/index.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,8 +17,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> description : __( 'Add a list of sessions.', 'wordcamporg' ),
</span><span class="cx" style="display: block; padding: 0 10px"> icon : ICON,
</span><span class="cx" style="display: block; padding: 0 10px"> category : 'wordcamp',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- edit,
- save : function() {
- return null;
- },
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ edit : edit,
+ save : () => null,
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsessionsinspectorcontrolsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/inspector-controls.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/inspector-controls.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/inspector-controls.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,7 +3,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> const { PanelBody, PanelRow, SelectControl, ToggleControl } = wp.components;
</span><span class="cx" style="display: block; padding: 0 10px"> const { InspectorControls } = wp.editor;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-const { Component, Fragment } = wp.element;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+const { Component } = wp.element;
</ins><span class="cx" style="display: block; padding: 0 10px"> const { __ } = wp.i18n;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsessionssessionsselectjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/sessions-select.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/sessions-select.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/sessions-select.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -32,7 +32,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> fetchSelectOptions( props ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> const { allSessionPosts, allSessionTracks, allSessionCategories } = props;
</span><span class="cx" style="display: block; padding: 0 10px"> const promises = [];
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsharedavatarinspectorcontrolsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/avatar/inspector-controls.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/avatar/inspector-controls.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/avatar/inspector-controls.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -49,7 +49,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> this.state = {
</span><span class="cx" style="display: block; padding: 0 10px"> value : props.value,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- onChange : debounce( props.onChange, 10 ) // higher values lead to a noticeable degradation in visual feedback.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ onChange : debounce( props.onChange, 10 ), // higher values lead to a noticeable degradation in visual feedback.
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> this.onChange = this.onChange.bind( this );
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsharedfeaturedimageindexjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/featured-image/index.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/featured-image/index.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/featured-image/index.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -15,19 +15,22 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> export default class FeaturedImage extends Component {
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param props Props for function.
- * @param props.wpMediaDetails Available sizes of images in the format as returned by WP API. This is the `sizes` object inside `media_details` inside `wp:featuredMedia` object.
- * @param props.width Width in pixels for image.
- * @param props.className Classname for image element
- * @param props.alt Alt text for image
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param {Object} props
+ * @param {Array} props.wpMediaDetails Available sizes of images in the format as returned by WP API. This is the `sizes` object inside `media_details` inside `wp:featuredMedia` object.
+ * @param {number} props.width Width in pixels for image.
+ * @param {string} props.className Class name for image element
+ * @param {string} props.alt Alt text for image
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> constructor( props ) {
</span><span class="cx" style="display: block; padding: 0 10px"> super( props );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> this.state = {};
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Get 'full' size image to be displayed in editor. Or get the widest one.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
+ * @return {Object}
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> getFullImage() {
</span><span class="cx" style="display: block; padding: 0 10px"> const { getOwnPropertyDescriptors } = Object;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -47,7 +50,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> let widestImage = { source_url: '' };
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> for ( const size in getOwnPropertyDescriptors( availableSizes ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( availableSizes[ size ].width > ( widestImage[ 'width' ] || 0 ) && availableSizes[ size ].hasOwnProperty( 'source_url' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( availableSizes[ size ].width > ( widestImage.width || 0 ) && availableSizes[ size ].hasOwnProperty( 'source_url' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> widestImage = availableSizes[ size ];
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -60,7 +63,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Renders FeaturedImage component.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return {*}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return {Element}
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> render() {
</span><span class="cx" style="display: block; padding: 0 10px"> const { className, alt, width = 150, imageLink } = this.props;
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsharedfeaturedimageinspectorcontroljs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/featured-image/inspector-control.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/featured-image/inspector-control.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/featured-image/inspector-control.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,9 +1,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * WordPress dependencies.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * WordPress dependencies
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> const { Component } = wp.element;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-const { PanelBody, PanelRow, TextControl, BaseControl, SelectControl, ToggleControl } = wp.components;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+const { PanelBody, PanelRow, TextControl, BaseControl, SelectControl } = wp.components;
</ins><span class="cx" style="display: block; padding: 0 10px"> const { __ } = wp.i18n;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+/**
+ * Internal dependencies
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> import './style.scss';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,7 +44,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Implements inspector control for FeaturedImage component defined in ./index.js. Uses and sets attribute `featured_image_height` and `featured_image_width`.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> class FeaturedImageInspectorControls extends Component {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> constructor( props ) {
</span><span class="cx" style="display: block; padding: 0 10px"> super( props );
</span><span class="cx" style="display: block; padding: 0 10px"> this.availableSizes = sizePresets.map( ( size ) => size.value );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -55,7 +58,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> render() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- const { attributes, setAttributes, title, help, selectLabel, cropLabel } = this.props;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ const { attributes, setAttributes, title, help, selectLabel } = this.props;
</ins><span class="cx" style="display: block; padding: 0 10px"> const { featured_image_width } = attributes;
</span><span class="cx" style="display: block; padding: 0 10px"> const selectedValue = this.availableSizes.indexOf( featured_image_width.toString() ) === -1 ? '' : featured_image_width.toString();
</span><span class="cx" style="display: block; padding: 0 10px"> return (
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsharedgridlayoutblockcontentjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/grid-layout/block-content.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/grid-layout/block-content.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/grid-layout/block-content.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,15 +1,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * External dependencies.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * External dependencies
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> import classnames from 'classnames';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * WordPress dependencies.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * WordPress dependencies
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> const { Component } = wp.element;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Internal dependencies.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Internal dependencies
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> import './style.scss';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -38,6 +38,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ( childComponent ) => {
</span><span class="cx" style="display: block; padding: 0 10px"> return (
</span><span class="cx" style="display: block; padding: 0 10px"> <li
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ key={ childComponent.key }
</ins><span class="cx" style="display: block; padding: 0 10px"> className={ classnames( 'wordcamp-grid-layout-item', 'wordcamp-block-post-list-item', 'wordcamp-clearfix' ) }
</span><span class="cx" style="display: block; padding: 0 10px"> >
</span><span class="cx" style="display: block; padding: 0 10px"> { childComponent }
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcspeakerseditjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/edit.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/edit.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/edit.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -105,7 +105,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> const speakersQuery = pickBy( args, ( value ) => ! isUndefined( value ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- blockData,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ blockData : blockData,
</ins><span class="cx" style="display: block; padding: 0 10px"> speakerPosts : getEntityRecords( 'postType', 'wcb_speaker', speakersQuery ),
</span><span class="cx" style="display: block; padding: 0 10px"> tracks : getEntityRecords( 'taxonomy', 'wcb_track', { per_page: MAX_POSTS } ),
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcspeakersindexjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/index.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/index.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/index.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,8 +17,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> description : __( 'Add a list of speakers.', 'wordcamporg' ),
</span><span class="cx" style="display: block; padding: 0 10px"> icon : ICON,
</span><span class="cx" style="display: block; padding: 0 10px"> category : 'wordcamp',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- edit,
- save : function() {
- return null;
- },
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ edit : edit,
+ save : () => null,
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcspeakerstoolbarjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/toolbar.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/toolbar.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/toolbar.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,15 +1,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * WordPress dependencies
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-const { Toolbar } = wp.components;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+const { Toolbar } = wp.components;
</ins><span class="cx" style="display: block; padding: 0 10px"> const { BlockControls } = wp.editor;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-const { Component } = wp.element;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+const { Component } = wp.element;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> class SpeakersToolbar extends Component {
</span><span class="cx" style="display: block; padding: 0 10px"> render() {
</span><span class="cx" style="display: block; padding: 0 10px"> const { attributes, setAttributes, blockData } = this.props;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- const { layout } = attributes;
- const { layout: layoutOptions = {} } = blockData.options;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ const { layout } = attributes;
+ const { layout: layoutOptions = {} } = blockData.options;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> const controls = layoutOptions.map( ( option ) => {
</span><span class="cx" style="display: block; padding: 0 10px"> const icon = `${ option.value }-view`;
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsponsorsblockcontentjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/block-content.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/block-content.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/block-content.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,37 +1,33 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * External dependencies.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * External dependencies
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> import { get, difference } from 'lodash';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-import classnames from 'classnames';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+import classnames from 'classnames';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * WordPress dependencies.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * WordPress dependencies
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-const { Component } = wp.element;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+const { Component } = wp.element;
</ins><span class="cx" style="display: block; padding: 0 10px"> const { escapeAttribute } = wp.escapeHtml;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-const { __ } = wp.i18n;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+const { __ } = wp.i18n;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Internal dependencies.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Internal dependencies
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-import FeaturedImage from '../shared/featured-image';
-import GridContentLayout from '../shared/grid-layout/block-content';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+import FeaturedImage from '../shared/featured-image';
+import GridContentLayout from '../shared/grid-layout/block-content';
</ins><span class="cx" style="display: block; padding: 0 10px"> import { ItemTitle, ItemHTMLContent } from '../shared/block-content';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Renders individual sponsor post inside editor.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param sponsorPost
- * @param attributes
- * @param onFeatureImageChange
- * @return {*}
- * @constructor
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param {Object} sponsorPost
+ * @param {Object} attributes
+ *
+ * @return {Element}
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function SponsorDetail( { sponsorPost, attributes, onFeatureImageChange } ) {
- const {
- show_name, show_logo, show_desc, content, excerpt_more, featured_image_width
- } = attributes;
-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function SponsorDetail( { sponsorPost, attributes } ) {
+ const { show_name, show_logo, content, excerpt_more, featured_image_width } = attributes;
</ins><span class="cx" style="display: block; padding: 0 10px"> const featuredImageSizes = get( sponsorPost, '_embedded.wp:featuredmedia[0].media_details.sizes', {} );
</span><span class="cx" style="display: block; padding: 0 10px"> const displayContent = 'full' === content ? sponsorPost.content.rendered.trim() : sponsorPost.excerpt.rendered.trim();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -46,6 +42,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> link={ sponsorPost.link }
</span><span class="cx" style="display: block; padding: 0 10px"> />
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> { ( show_logo || show_logo === undefined ) &&
</span><span class="cx" style="display: block; padding: 0 10px"> <FeaturedImage
</span><span class="cx" style="display: block; padding: 0 10px"> className={ 'wordcamp-sponsor-featured-image wordcamp-sponsor-logo' }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -55,6 +52,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> imageLink={ sponsorPost.link }
</span><span class="cx" style="display: block; padding: 0 10px"> />
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> { ( 'none' !== content ) &&
</span><span class="cx" style="display: block; padding: 0 10px"> <ItemHTMLContent
</span><span class="cx" style="display: block; padding: 0 10px"> className={ classnames( 'wordcamp-sponsor-content' ) }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -79,6 +77,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> sortBy : 'name_asc',
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Call back for when featured image URL is changed for a post.
</span><span class="cx" style="display: block; padding: 0 10px"> * We are storing the URL object as JSON stringified value because I was
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -85,17 +84,20 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * not able to get object type to work properly. Maybe its not supported in
</span><span class="cx" style="display: block; padding: 0 10px"> * Gutenberg yet.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param sponsorId
- * @param imageURL
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param {number} sponsorId
+ * @param {string} imageURL
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> setFeaturedImageURL( sponsorId, imageURL ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- const sponsor_image_urls = this.sponsorImageUrl || {};
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ const sponsor_image_urls = this.sponsorImageUrl || {};
</ins><span class="cx" style="display: block; padding: 0 10px"> sponsor_image_urls[ sponsorId ] = imageURL;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- this.sponsorImageUrl = sponsor_image_urls;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ this.sponsorImageUrl = sponsor_image_urls;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- const { setAttributes } = this.props;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ const { setAttributes } = this.props;
</ins><span class="cx" style="display: block; padding: 0 10px"> const sponsor_image_urls_latest = this.sponsorImageUrl;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- setAttributes( { sponsor_image_urls: encodeURIComponent( JSON.stringify( sponsor_image_urls_latest ) ) } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ setAttributes( {
+ sponsor_image_urls: encodeURIComponent( JSON.stringify( sponsor_image_urls_latest ) ),
+ } );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> componentWillReceiveProps( nextProps ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -142,18 +144,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } );
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- this.setState(
- {
- selectedPosts : sortedPosts,
- sortBy : newSortBy,
- }
- );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ this.setState( {
+ selectedPosts : sortedPosts,
+ sortBy : newSortBy,
+ } );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Renders Sponsor Block content inside editor.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return {*}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return {Element}
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> render() {
</span><span class="cx" style="display: block; padding: 0 10px"> const { attributes } = this.props;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -160,13 +161,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> const { selectedPosts } = this.state;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <GridContentLayout
- { ...this.props }
- >
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <GridContentLayout { ...this.props } >
</ins><span class="cx" style="display: block; padding: 0 10px"> {
</span><span class="cx" style="display: block; padding: 0 10px"> selectedPosts.map( ( post ) => {
</span><span class="cx" style="display: block; padding: 0 10px"> return (
</span><span class="cx" style="display: block; padding: 0 10px"> <SponsorDetail
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ key={ post.id }
</ins><span class="cx" style="display: block; padding: 0 10px"> sponsorPost={ post }
</span><span class="cx" style="display: block; padding: 0 10px"> attributes={ attributes }
</span><span class="cx" style="display: block; padding: 0 10px"> />
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsponsorsblockcontrolsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/block-controls.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/block-controls.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/block-controls.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,13 +1,16 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * External dependencies
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> import { get, includes, intersection } from 'lodash';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * WordPress dependencies.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * WordPress dependencies
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> const { decodeEntities } = wp.htmlEntities;
</span><span class="cx" style="display: block; padding: 0 10px"> const { __ } = wp.i18n;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Internal dependencies.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Internal dependencies
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> import { BlockControls, PlaceholderNoContent } from '../shared/block-controls';
</span><span class="cx" style="display: block; padding: 0 10px"> import SponsorBlockContent from './block-content';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,14 +20,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> const { Button, Placeholder } = wp.components;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function SponsorOption( option ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ let sponsorOption;
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( 'post' === option.type ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return SponsorPostOption( option );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ sponsorOption = SponsorPostOption( option );
+ } else {
+ sponsorOption = SponsorLevelOption( option );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return SponsorLevelOption( option );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ return sponsorOption;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function SponsorPostOption( sponsor ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- const imageUrl = get( sponsor.featuredImageData, 'sizes.thumbnail.source_url', false );
</del><span class="cx" style="display: block; padding: 0 10px"> return (
</span><span class="cx" style="display: block; padding: 0 10px"> <span>
</span><span class="cx" style="display: block; padding: 0 10px"> { sponsor.label }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -47,9 +54,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Implements sponsor block controls.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> class SponsorBlockControls extends BlockControls {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> constructor( props ) {
</span><span class="cx" style="display: block; padding: 0 10px"> super( props );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> this.state = {
</span><span class="cx" style="display: block; padding: 0 10px"> posts : [],
</span><span class="cx" style="display: block; padding: 0 10px"> terms : [],
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -65,37 +72,42 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Set selectedPosts in state so that SponsorsContentBlock can use them.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> setSelectedPosts() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- const { fetchedPosts, sponsorTermOrder } = this.state;
- const { attributes } = this.props;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ const { fetchedPosts } = this.state;
+ const { attributes } = this.props;
</ins><span class="cx" style="display: block; padding: 0 10px"> const { post_ids, term_ids, mode } = attributes;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ const selectedPosts = [];
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! fetchedPosts || ! fetchedPosts.length ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- const selectedPosts = [];
</del><span class="cx" style="display: block; padding: 0 10px"> for ( const post of fetchedPosts ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! post.hasOwnProperty( 'id' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> continue;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> switch ( mode ) {
</span><span class="cx" style="display: block; padding: 0 10px"> case 'all':
</span><span class="cx" style="display: block; padding: 0 10px"> selectedPosts.push( post );
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> case 'specific_posts':
</span><span class="cx" style="display: block; padding: 0 10px"> if ( -1 !== post_ids.indexOf( post.id ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> selectedPosts.push( post );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> case 'specific_terms':
</span><span class="cx" style="display: block; padding: 0 10px"> if ( intersection( term_ids, post.sponsor_level || [] ).length ) {
</span><span class="cx" style="display: block; padding: 0 10px"> selectedPosts.push( post );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- default :
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ default:
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> this.setState( { selectedPosts } );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -102,6 +114,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Initialize posts and terms arrays and sets loading state till promises
</span><span class="cx" style="display: block; padding: 0 10px"> * are not resolved. We will also set posts and terms in array that we want to display.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
+ * @param {Object} props
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> fetchSelectOptions( props ) {
</span><span class="cx" style="display: block; padding: 0 10px"> const { sponsorPosts, sponsorLevels, siteSettings } = props;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -110,16 +124,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ( fetchedPosts ) => {
</span><span class="cx" style="display: block; padding: 0 10px"> const posts = fetchedPosts.map(
</span><span class="cx" style="display: block; padding: 0 10px"> ( post ) => {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ const label = decodeEntities( post.title.rendered.trim() ) || __( '(Untitled)', 'wordcamporg' );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> return {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- label: decodeEntities( post.title.rendered.trim() ) ||
- __( '(Untitled)', 'wordcamporg' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ label : label,
</ins><span class="cx" style="display: block; padding: 0 10px"> value : post.id,
</span><span class="cx" style="display: block; padding: 0 10px"> type : 'post',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- featuredImageData : get( post,
- '_embedded.wp:featuredmedia[0].media_details', '' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ featuredImageData : get( post, '_embedded.wp:featuredmedia[0].media_details', '' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> this.setState( { fetchedPosts } );
</span><span class="cx" style="display: block; padding: 0 10px"> this.setState( { posts } );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -148,6 +163,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> const parsedSettings = siteSettings.then(
</span><span class="cx" style="display: block; padding: 0 10px"> ( fetchedSettings ) => {
</span><span class="cx" style="display: block; padding: 0 10px"> const sponsorTermOrder = fetchedSettings.wcb_sponsor_level_order;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> this.setState( { sponsorTermOrder } );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -154,7 +170,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> Promise.all( [ parsedPosts, parsedTerms, parsedSettings ] ).then( () => {
</span><span class="cx" style="display: block; padding: 0 10px"> this.setState( { loading: false } );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Enqueue set selected posts in next event loop, so that state is up to date when `setSelectedPosts` method actually runs.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ // Enqueue selected posts in next event loop, so that state is up to date when `setSelectedPosts` method actually runs.
</ins><span class="cx" style="display: block; padding: 0 10px"> setTimeout( () => this.setSelectedPosts() );
</span><span class="cx" style="display: block; padding: 0 10px"> } );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -163,12 +180,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Sets `mode`, `term_ids` and `post_ids` attribute when `Apply` button is
</span><span class="cx" style="display: block; padding: 0 10px"> * clicked. Pass `onChange` prop to override.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param selectedOptions Array of values, type of selected options
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param {Array} selectedOptions Array of values, type of selected options
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> onChange( selectedOptions = {} ) {
</span><span class="cx" style="display: block; padding: 0 10px"> const { setAttributes } = this.props;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- const newValue = selectedOptions.item_ids;
- const chosen = selectedOptions.mode;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ const newValue = selectedOptions.item_ids;
+ const chosen = selectedOptions.mode;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( newValue && chosen ) {
</span><span class="cx" style="display: block; padding: 0 10px"> switch ( chosen ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -199,6 +216,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Generate options array to be passed to select2.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
+ * @return {Array}
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> buildSelectOptions() {
</span><span class="cx" style="display: block; padding: 0 10px"> const { posts, terms } = this.state;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -219,6 +238,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Renders Sponsor Block Control view
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
+ * @return {Element}
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> render() {
</span><span class="cx" style="display: block; padding: 0 10px"> const { icon, attributes, setAttributes, sponsorPosts } = this.props;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -259,7 +280,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return (
</span><span class="cx" style="display: block; padding: 0 10px"> <div>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> <SponsorBlockContent
</span><span class="cx" style="display: block; padding: 0 10px"> selectedPosts={ selectedPosts }
</span><span class="cx" style="display: block; padding: 0 10px"> sponsorTermOrder={ sponsorTermOrder }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -285,6 +305,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> { __( 'List all sponsors', 'wordcamporg' ) }
</span><span class="cx" style="display: block; padding: 0 10px"> </Button>
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <div className="wordcamp-block-edit-mode-option">
</span><span class="cx" style="display: block; padding: 0 10px"> <ItemSelect
</span><span class="cx" style="display: block; padding: 0 10px"> buildSelectOptions={
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -294,8 +315,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> isLoading={ this.state.loading }
</span><span class="cx" style="display: block; padding: 0 10px"> onChange={
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ( selectedOptions ) => {
- return this.onChange( selectedOptions );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ( newOptions ) => {
+ return this.onChange( newOptions );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> selectProps={
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -307,8 +328,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- label={ __( 'Or, choose specific sponsors or levels',
- 'wordcamporg' ) }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ label={ __( 'Or, choose specific sponsors or levels', 'wordcamporg' ) }
</ins><span class="cx" style="display: block; padding: 0 10px"> value={ selectedOptions }
</span><span class="cx" style="display: block; padding: 0 10px"> { ...this.props }
</span><span class="cx" style="display: block; padding: 0 10px"> />
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsponsorseditjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/edit.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/edit.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/edit.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,18 +1,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Displays sponsor block.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Internal dependencies
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> import SponsorInspectorControls from './inspector-controls';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-import SponsorBlockControls from './block-controls';
-import GridToolbar from '../shared/grid-layout/toolbar';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+import SponsorBlockControls from './block-controls';
+import GridToolbar from '../shared/grid-layout/toolbar';
</ins><span class="cx" style="display: block; padding: 0 10px"> import { ICON } from './index';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- WordPress dependencies.
- **/
-const { withSelect } = wp.data;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * WordPress dependencies
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> const { Component, Fragment } = wp.element;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-const apiFetch = wp.apiFetch;
-const { addQueryArgs } = wp.url;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+const apiFetch = wp.apiFetch;
+const { addQueryArgs } = wp.url;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> const MAX_PAGE = 100;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -20,7 +19,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Constructor for SponsorsEdit block.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param props
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param {Array} props
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> constructor( props ) {
</span><span class="cx" style="display: block; padding: 0 10px"> super( props );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -47,16 +46,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> sponsorPosts : apiFetch( { path: addQueryArgs( '/wp/v2/sponsors', sponsorQuery ) } ),
</span><span class="cx" style="display: block; padding: 0 10px"> sponsorLevels : apiFetch( { path: addQueryArgs( '/wp/v2/sponsor_level', sponsorLevelQuery ) } ),
</span><span class="cx" style="display: block; padding: 0 10px"> siteSettings : apiFetch( { path: addQueryArgs( '/wp/v2/settings', {} ) } ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ };
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Renders SponsorEdit component.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
+ * @return {Element}
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> render() {
</span><span class="cx" style="display: block; padding: 0 10px"> const { sponsorPosts, sponsorLevels, siteSettings } = this.state;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- const { attributes } = this.props;
- const { mode } = attributes;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ const { attributes } = this.props;
+ const { mode } = attributes;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return (
</span><span class="cx" style="display: block; padding: 0 10px"> <Fragment>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -75,10 +76,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> sponsorLevels={ sponsorLevels }
</span><span class="cx" style="display: block; padding: 0 10px"> { ...this.props }
</span><span class="cx" style="display: block; padding: 0 10px"> />
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> { mode &&
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <GridToolbar
- { ...this.props }
- />
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <GridToolbar
+ { ...this.props }
+ />
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> </Fragment>
</span><span class="cx" style="display: block; padding: 0 10px"> </Fragment>
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsponsorsindexjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/index.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/index.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/index.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4,12 +4,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> const { __ } = wp.i18n;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Internal dependencies.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Internal dependencies
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> import { edit } from './edit.js';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-export const name = 'wordcamp/sponsors';
-export const LABEL = __( 'Sponsors', 'wordcamporg' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+export const name = 'wordcamp/sponsors';
+export const LABEL = __( 'Sponsors', 'wordcamporg' );
</ins><span class="cx" style="display: block; padding: 0 10px"> export const ICON = 'heart';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> export const settings = {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,8 +17,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> description : __( "We wouldn't have WordCamp without their support.", 'wordcamporg' ),
</span><span class="cx" style="display: block; padding: 0 10px"> icon : ICON,
</span><span class="cx" style="display: block; padding: 0 10px"> category : 'wordcamp',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- edit,
- save : function() {
- return null;
- },
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ edit : edit,
+ save : () => null,
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsponsorsinspectorcontrolsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/inspector-controls.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/inspector-controls.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/inspector-controls.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,15 +1,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * WordPress dependencies.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-const { Component } = wp.element;
-const { InspectorControls } = wp.editor;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+const { Component } = wp.element;
+const { InspectorControls } = wp.editor;
</ins><span class="cx" style="display: block; padding: 0 10px"> const { PanelBody, PanelRow, ToggleControl, SelectControl } = wp.components;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-const { __ } = wp.i18n;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+const { __ } = wp.i18n;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Internal dependencies
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-import GridInspectorControl from '../shared/grid-layout/inspector-control';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+import GridInspectorControl from '../shared/grid-layout/inspector-control';
</ins><span class="cx" style="display: block; padding: 0 10px"> import FeaturedImageInspectorControls from '../shared/featured-image/inspector-control';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -18,24 +18,24 @@
</span><span class="cx" style="display: block; padding: 0 10px"> class SponsorInspectorControls extends Component {
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Renders inspector controls.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
+ * @return {Element}
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> render() {
</span><span class="cx" style="display: block; padding: 0 10px"> const sortOptions = [
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- { label: __( 'Name (A to Z)', 'wordcamporg' ), value: 'name_asc' },
- { label: __( 'Name (Z to A)', 'wordcamporg' ), value: 'name_desc' },
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ { label: __( 'Name (A to Z)', 'wordcamporg' ), value: 'name_asc' },
+ { label: __( 'Name (Z to A)', 'wordcamporg' ), value: 'name_desc' },
</ins><span class="cx" style="display: block; padding: 0 10px"> { label: __( 'Sponsor Level', 'wordcamporg' ), value: 'sponsor_level' },
</span><span class="cx" style="display: block; padding: 0 10px"> ];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> const contentOptions = [
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- { label: __( 'Full', 'wordcamporg' ), value: 'full' },
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ { label: __( 'Full', 'wordcamporg' ), value: 'full' },
</ins><span class="cx" style="display: block; padding: 0 10px"> { label: __( 'Excerpt', 'wordcamporg' ), value: 'excerpt' },
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- { label: __( 'None', 'wordcamporg'), value: 'none' },
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ { label: __( 'None', 'wordcamporg' ), value: 'none' },
</ins><span class="cx" style="display: block; padding: 0 10px"> ];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- const { attributes, setAttributes } = this.props;
- const {
- show_name, show_logo, sort_by, excerpt_more, content
- } = attributes;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ const { attributes, setAttributes } = this.props;
+ const { show_name, show_logo, sort_by, excerpt_more, content } = attributes;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return (
</span><span class="cx" style="display: block; padding: 0 10px"> <InspectorControls>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -42,6 +42,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <GridInspectorControl
</span><span class="cx" style="display: block; padding: 0 10px"> { ...this.props }
</span><span class="cx" style="display: block; padding: 0 10px"> />
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <PanelBody
</span><span class="cx" style="display: block; padding: 0 10px"> title={ __( 'Content Settings', 'wordcamporg' ) }
</span><span class="cx" style="display: block; padding: 0 10px"> initialOpen={ true }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -54,6 +55,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> onChange={ ( value ) => setAttributes( { show_name: value } ) }
</span><span class="cx" style="display: block; padding: 0 10px"> />
</span><span class="cx" style="display: block; padding: 0 10px"> </PanelRow>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <PanelRow>
</span><span class="cx" style="display: block; padding: 0 10px"> <ToggleControl
</span><span class="cx" style="display: block; padding: 0 10px"> label={ __( 'Logo', 'wordcamporg' ) }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -62,6 +64,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> onChange={ ( value ) => setAttributes( { show_logo: value } ) }
</span><span class="cx" style="display: block; padding: 0 10px"> />
</span><span class="cx" style="display: block; padding: 0 10px"> </PanelRow>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <PanelRow>
</span><span class="cx" style="display: block; padding: 0 10px"> <SelectControl
</span><span class="cx" style="display: block; padding: 0 10px"> label={ __( 'Description', 'wordcamporg' ) }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -71,16 +74,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> onChange={ ( value ) => setAttributes( { content: value } ) }
</span><span class="cx" style="display: block; padding: 0 10px"> />
</span><span class="cx" style="display: block; padding: 0 10px"> </PanelRow>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> { 'excerpt' === content &&
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <PanelRow>
- <ToggleControl
- label={ __( 'Read More Link', 'wordcamporg' ) }
- help={ __( 'Show a link at the end of the excerpt (some themes already include this)', 'wordcamporg' ) }
- checked={ excerpt_more }
- onChange={ ( value ) => setAttributes( { excerpt_more: value } ) }
- />
- </PanelRow>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <PanelRow>
+ <ToggleControl
+ label={ __( 'Read More Link', 'wordcamporg' ) }
+ help={ __( 'Show a link at the end of the excerpt (some themes already include this)', 'wordcamporg' ) }
+ checked={ excerpt_more }
+ onChange={ ( value ) => setAttributes( { excerpt_more: value } ) }
+ />
+ </PanelRow>
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <PanelRow>
</span><span class="cx" style="display: block; padding: 0 10px"> <SelectControl
</span><span class="cx" style="display: block; padding: 0 10px"> label={ __( 'Sort by', 'wordcamporg' ) }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -91,6 +96,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> />
</span><span class="cx" style="display: block; padding: 0 10px"> </PanelRow>
</span><span class="cx" style="display: block; padding: 0 10px"> </PanelBody>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <FeaturedImageInspectorControls
</span><span class="cx" style="display: block; padding: 0 10px"> title={ __( 'Logo size', 'wordcamporg' ) }
</span><span class="cx" style="display: block; padding: 0 10px"> help={ __( 'Specify logo width, or select a predefined size.', 'wordcamporg' ) }
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblockswebpackconfigjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/webpack.config.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/webpack.config.js 2019-04-09 00:40:52 UTC (rev 8610)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/webpack.config.js 2019-04-09 00:40:59 UTC (rev 8611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -25,25 +25,24 @@
</span><span class="cx" style="display: block; padding: 0 10px"> entry: {
</span><span class="cx" style="display: block; padding: 0 10px"> blocks: path.resolve( __dirname, 'assets/src/blocks.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> output: {
</span><span class="cx" style="display: block; padding: 0 10px"> filename : '[name].min.js',
</span><span class="cx" style="display: block; padding: 0 10px"> path : path.resolve( __dirname, 'assets' ),
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> module: {
</span><span class="cx" style="display: block; padding: 0 10px"> rules: [
</span><span class="cx" style="display: block; padding: 0 10px"> {
</span><span class="cx" style="display: block; padding: 0 10px"> test : /\.jsx?$/,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- exclude : [
- /node_modules/,
- ],
- use: 'babel-loader',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ use : 'babel-loader',
+ exclude : [ /node_modules/ ],
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> {
</span><span class="cx" style="display: block; padding: 0 10px"> test : /\.(sc|sa|c)ss$/,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- exclude : [
- /node_modules/,
- ],
- use: [
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ exclude : [ /node_modules/ ],
+ use : [
</ins><span class="cx" style="display: block; padding: 0 10px"> MiniCssExtractPlugin.loader,
</span><span class="cx" style="display: block; padding: 0 10px"> 'css-loader',
</span><span class="cx" style="display: block; padding: 0 10px"> 'sass-loader',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -51,15 +50,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> ],
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> plugins: [
</span><span class="cx" style="display: block; padding: 0 10px"> new MiniCssExtractPlugin( {
</span><span class="cx" style="display: block; padding: 0 10px"> filename: '[name].min.css',
</span><span class="cx" style="display: block; padding: 0 10px"> } ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> new webpack.DefinePlugin( {
</span><span class="cx" style="display: block; padding: 0 10px"> 'process.env.NODE_ENV': JSON.stringify( NODE_ENV ),
</span><span class="cx" style="display: block; padding: 0 10px"> } ),
</span><span class="cx" style="display: block; padding: 0 10px"> ],
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- externals,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ externals: externals,
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = webpackConfig;
</span></span></pre>
</div>
</div>
</body>
</html>