<!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>[8526] sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src: WordCamp Blocks: Make icons and labels DRY for consistency.</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/8526">8526</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/8526","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-03-25 23:27:12 +0000 (Mon, 25 Mar 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: Make icons and labels DRY for consistency.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsessionsblockcontrolsjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/block-controls.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsessionseditjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/edit.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_htmlwpcontentmupluginsblocksassetssrcsessionssessionsselectjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/sessions-select.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcspeakersblockcontrolsjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/block-controls.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_htmlwpcontentmupluginsblocksassetssrcspeakersspeakersselectjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/speakers-select.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>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcsessionsblockcontrolsjs"></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-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/block-controls.js 2019-03-25 22:24:51 UTC (rev 8525)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/block-controls.js 2019-03-25 23:27:12 UTC (rev 8526)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -15,9 +15,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> import { BlockControls, PlaceholderNoContent, PlaceholderSpecificMode } from '../shared/block-controls';
</span><span class="cx" style="display: block; padding: 0 10px"> import SessionsBlockContent from './block-content';
</span><span class="cx" style="display: block; padding: 0 10px"> import SessionsSelect from './sessions-select';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+import { LABEL } from './index';
</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 LABEL = __( 'Sessions', 'wordcamporg' );
-
</del><span class="cx" style="display: block; padding: 0 10px"> class SessionsBlockControls extends BlockControls {
</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, sessionPosts } = this.props;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -82,6 +81,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><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"> <SessionsSelect
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ icon={ icon }
</ins><span class="cx" style="display: block; padding: 0 10px"> label={ __( 'Choose specific sessions, tracks, or categories', 'wordcamporg' ) }
</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_htmlwpcontentmupluginsblocksassetssrcsessionseditjs"></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/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/sessions/edit.js 2019-03-25 22:24:51 UTC (rev 8525)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/edit.js 2019-03-25 23:27:12 UTC (rev 8526)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,10 +17,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> import SessionsBlockControls from './block-controls';
</span><span class="cx" style="display: block; padding: 0 10px"> import SessionsInspectorControls from './inspector-controls';
</span><span class="cx" style="display: block; padding: 0 10px"> import GridToolbar from '../shared/grid-layout/toolbar';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+import { SESSIONS_ICON } from './index';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> const blockData = window.WordCampBlocks.sessions || {};
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-const SESSIONS_ICON = 'list-view';
</del><span class="cx" style="display: block; padding: 0 10px"> const MAX_POSTS = 100;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> const ALL_POSTS_QUERY = {
</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-03-25 22:24:51 UTC (rev 8525)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/index.js 2019-03-25 23:27:12 UTC (rev 8526)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,11 +9,13 @@
</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><span class="cx" style="display: block; padding: 0 10px"> export const name = 'wordcamp/sessions';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+export const LABEL = __( 'Sessions', 'wordcamporg' );
+export const SESSIONS_ICON = 'list-view';
</ins><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="cx" style="display: block; padding: 0 10px"> title : __( 'Sessions', 'wordcamporg' ),
</span><span class="cx" style="display: block; padding: 0 10px"> description : __( 'Add a list of sessions.', 'wordcamporg' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- icon : 'list-view',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ icon : SESSIONS_ICON,
</ins><span class="cx" style="display: block; padding: 0 10px"> category : 'wordcamp',
</span><span class="cx" style="display: block; padding: 0 10px"> edit,
</span><span class="cx" style="display: block; padding: 0 10px"> save : function() {
</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-03-25 22:24:51 UTC (rev 8525)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/sessions-select.js 2019-03-25 23:27:12 UTC (rev 8526)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -106,7 +106,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 { label, attributes, setAttributes } = this.props;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ const { icon, label, attributes, setAttributes } = this.props;
</ins><span class="cx" style="display: block; padding: 0 10px"> const { mode, item_ids } = attributes;
</span><span class="cx" style="display: block; padding: 0 10px"> const options = this.buildSelectOptions( mode );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -139,7 +139,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> formatOptionLabel: ( optionData ) => {
</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">- <SessionsOption { ...optionData } />
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <SessionsOption
+ icon={ icon }
+ { ...optionData }
+ />
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -148,7 +151,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">-function SessionsOption( { type, label = '', image = '', count = 0 } ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function SessionsOption( { type, icon, label = '', image = '', count = 0 } ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> let optImage, optContent;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> switch ( type ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -168,7 +171,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <div className="wordcamp-item-select-option-icon-container">
</span><span class="cx" style="display: block; padding: 0 10px"> <Dashicon
</span><span class="cx" style="display: block; padding: 0 10px"> className="wordcamp-item-select-option-icon"
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- icon={ 'list-view' }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ icon={ icon }
</ins><span class="cx" style="display: block; padding: 0 10px"> size={ 16 }
</span><span class="cx" style="display: block; padding: 0 10px"> />
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -187,7 +190,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <div className="wordcamp-item-select-option-icon-container">
</span><span class="cx" style="display: block; padding: 0 10px"> <Dashicon
</span><span class="cx" style="display: block; padding: 0 10px"> className="wordcamp-item-select-option-icon"
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- icon={ 'list-view' }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ icon={ icon }
</ins><span class="cx" style="display: block; padding: 0 10px"> size={ 16 }
</span><span class="cx" style="display: block; padding: 0 10px"> />
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcspeakersblockcontrolsjs"></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/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/speakers/block-controls.js 2019-03-25 22:24:51 UTC (rev 8525)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/block-controls.js 2019-03-25 23:27:12 UTC (rev 8526)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -15,9 +15,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> import { BlockControls, PlaceholderNoContent, PlaceholderSpecificMode } from '../shared/block-controls';
</span><span class="cx" style="display: block; padding: 0 10px"> import SpeakersBlockContent from './block-content';
</span><span class="cx" style="display: block; padding: 0 10px"> import SpeakersSelect from './speakers-select';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+import { LABEL } from './index';
</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 LABEL = __( 'Speakers', 'wordcamporg' );
-
</del><span class="cx" style="display: block; padding: 0 10px"> class SpeakersBlockControls extends BlockControls {
</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, speakerPosts } = this.props;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -81,6 +80,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><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"> <SpeakersSelect
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ icon={ icon }
</ins><span class="cx" style="display: block; padding: 0 10px"> label={ __( 'Choose specific speakers or groups', 'wordcamporg' ) }
</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_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-03-25 22:24:51 UTC (rev 8525)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/edit.js 2019-03-25 23:27:12 UTC (rev 8526)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,10 +17,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> import SpeakersBlockControls from './block-controls';
</span><span class="cx" style="display: block; padding: 0 10px"> import SpeakersInspectorControls from './inspector-controls';
</span><span class="cx" style="display: block; padding: 0 10px"> import SpeakersToolbar from './toolbar';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+import { SPEAKERS_ICON } from './index';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> const blockData = window.WordCampBlocks.speakers || {};
</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 SPEAKERS_ICON = 'megaphone';
</del><span class="cx" style="display: block; padding: 0 10px"> const MAX_POSTS = 100;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> const ALL_POSTS_QUERY = {
</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-03-25 22:24:51 UTC (rev 8525)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/index.js 2019-03-25 23:27:12 UTC (rev 8526)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,11 +9,13 @@
</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><span class="cx" style="display: block; padding: 0 10px"> export const name = 'wordcamp/speakers';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+export const LABEL = __( 'Speakers', 'wordcamporg' );
+export const SPEAKERS_ICON = 'megaphone';
</ins><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="cx" style="display: block; padding: 0 10px"> title : __( 'Speakers', 'wordcamporg' ),
</span><span class="cx" style="display: block; padding: 0 10px"> description : __( 'Add a list of speakers.', 'wordcamporg' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- icon : 'megaphone',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ icon : SPEAKERS_ICON,
</ins><span class="cx" style="display: block; padding: 0 10px"> category : 'wordcamp',
</span><span class="cx" style="display: block; padding: 0 10px"> edit,
</span><span class="cx" style="display: block; padding: 0 10px"> save : function() {
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcspeakersspeakersselectjs"></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/speakers-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/speakers/speakers-select.js 2019-03-25 22:24:51 UTC (rev 8525)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/speakers-select.js 2019-03-25 23:27:12 UTC (rev 8526)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -99,7 +99,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 { label, attributes, setAttributes } = this.props;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ const { label, icon, attributes, setAttributes } = this.props;
</ins><span class="cx" style="display: block; padding: 0 10px"> const { mode, item_ids } = attributes;
</span><span class="cx" style="display: block; padding: 0 10px"> const options = this.buildSelectOptions( mode );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -132,7 +132,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> formatOptionLabel: ( optionData ) => {
</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">- <SpeakersOption { ...optionData } />
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <SpeakersOption
+ icon={ icon }
+ { ...optionData }
+ />
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -141,7 +144,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">-function SpeakersOption( { type, label = '', avatar = '', count = 0 } ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function SpeakersOption( { type, icon, label = '', avatar = '', count = 0 } ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> let image, content;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> switch ( type ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -166,7 +169,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <div className="wordcamp-item-select-option-icon-container">
</span><span class="cx" style="display: block; padding: 0 10px"> <Dashicon
</span><span class="cx" style="display: block; padding: 0 10px"> className="wordcamp-item-select-option-icon"
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- icon={ 'megaphone' }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ icon={ icon }
</ins><span class="cx" style="display: block; padding: 0 10px"> size={ 16 }
</span><span class="cx" style="display: block; padding: 0 10px"> />
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</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-03-25 22:24:51 UTC (rev 8525)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/block-controls.js 2019-03-25 23:27:12 UTC (rev 8526)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -12,10 +12,10 @@
</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="cx" style="display: block; padding: 0 10px"> import ItemSelect from '../shared/item-select'
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+import { LABEL } from './index';
+
</ins><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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-const LABEL = __( 'Sponsors', 'wordcamporg' );
-
</del><span class="cx" style="display: block; padding: 0 10px"> function SponsorOption( option ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'post' === option.type ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return SponsorPostOption( option );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -242,7 +242,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Renders Sponsor Block Control view
</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 { sponsorPosts, attributes, setAttributes } = this.props;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ const { icon, attributes, setAttributes, sponsorPosts } = this.props;
</ins><span class="cx" style="display: block; padding: 0 10px"> const { mode, post_ids, term_ids } = attributes;
</span><span class="cx" style="display: block; padding: 0 10px"> const { fetchedPosts, posts, terms, selectedPosts, sponsorTermOrder } = this.state;
</span><span class="cx" style="display: block; padding: 0 10px"> const hasPosts = Array.isArray( fetchedPosts ) && fetchedPosts.length;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -289,7 +289,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> {'all' !== mode &&
</span><span class="cx" style="display: block; padding: 0 10px"> <Placeholder
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- icon='heart'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ icon={ icon }
</ins><span class="cx" style="display: block; padding: 0 10px"> label = { __('Sponsors', 'wordcamporg') }
</span><span class="cx" style="display: block; padding: 0 10px"> >
</span><span class="cx" style="display: block; padding: 0 10px"> <div className='' >
</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-03-25 22:24:51 UTC (rev 8525)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/edit.js 2019-03-25 23:27:12 UTC (rev 8526)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4,6 +4,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> import SponsorInspectorControls from './inspector-controls';
</span><span class="cx" style="display: block; padding: 0 10px"> import SponsorBlockControls from './block-controls';
</span><span class="cx" style="display: block; padding: 0 10px"> import GridToolbar from '../shared/grid-layout/toolbar';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+import { SPONSORS_ICON } from './index';
</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"> WordPress dependencies.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -64,6 +65,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <Fragment>
</span><span class="cx" style="display: block; padding: 0 10px"> {
</span><span class="cx" style="display: block; padding: 0 10px"> <SponsorBlockControls
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ icon={ SPONSORS_ICON }
</ins><span class="cx" style="display: block; padding: 0 10px"> sponsorPosts = { sponsorPosts }
</span><span class="cx" style="display: block; padding: 0 10px"> sponsorLevels = { sponsorLevels }
</span><span class="cx" style="display: block; padding: 0 10px"> siteSettings = { siteSettings }
</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-03-25 22:24:51 UTC (rev 8525)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/index.js 2019-03-25 23:27:12 UTC (rev 8526)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,11 +9,13 @@
</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><span class="cx" style="display: block; padding: 0 10px"> export const name = 'wordcamp/sponsors';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+export const LABEL = __( 'Sponsors', 'wordcamporg' );
+export const SPONSORS_ICON = 'heart';
</ins><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="cx" style="display: block; padding: 0 10px"> title : __( 'Sponsors', 'wordcamporg' ),
</span><span class="cx" style="display: block; padding: 0 10px"> description : __( "We wouldn't have WordCamp without their support.", 'wordcamporg' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- icon : 'heart',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ icon : SPONSORS_ICON,
</ins><span class="cx" style="display: block; padding: 0 10px"> category : 'wordcamp',
</span><span class="cx" style="display: block; padding: 0 10px"> edit,
</span><span class="cx" style="display: block; padding: 0 10px"> save : function() {
</span></span></pre>
</div>
</div>
</body>
</html>