-
Notifications
You must be signed in to change notification settings - Fork 4.2k
ECOM-7388 Program details page redesign #14773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
48aac30 to
2794c5f
Compare
7acf353 to
a2f5723
Compare
| @@ -0,0 +1 @@ | |||
| <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1524.05 150.17"><defs><style>.cls-1{fill:#005585;}</style></defs><title>micromasters-icon</title><path class="cls-1" d="M31.57,65.82a3,3,0,0,0,.72.09,3,3,0,0,0,2.91-2.28,74.73,74.73,0,0,1,14-28.45A143.33,143.33,0,0,0,63.68,39a75.1,75.1,0,0,0-8.46,23.65,3,3,0,1,0,5.91,1.06A68,68,0,0,1,70,40.24a216.58,216.58,0,0,0,36.87,3.29V63.18a3,3,0,1,0,6,0V43.48a224.37,224.37,0,0,0,35.75-3.67,67.78,67.78,0,0,1,9,23.66,3,3,0,1,0,5.91-1.06A74.82,74.82,0,0,0,155,38.54q6.81-1.46,13.86-3.43a74.71,74.71,0,0,1,14,28.43,3,3,0,1,0,5.82-1.45,82.24,82.24,0,0,0-159.27.1A3,3,0,0,0,31.57,65.82Zm42.2-31.16c11.14-15,26.08-23.14,33.12-26.39V37.41A217.27,217.27,0,0,1,73.77,34.67Zm39.12,2.7V8.72c7.35,3.47,21.4,11.46,32,25.63A218.5,218.5,0,0,1,112.89,37.37Zm51.57-7.27q-6.54,1.75-12.89,3A87.8,87.8,0,0,0,124.33,7.95,76,76,0,0,1,164.47,30.09ZM95,7.71A88.63,88.63,0,0,0,67.11,33.47c-6.06-1.19-10.7-2.41-13.63-3.27A76,76,0,0,1,95,7.71Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M187.68,144.34h0l-156.37.25a3,3,0,0,0,0,6h0l156.37-.25a3,3,0,0,0,0-6Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M31.32,82.85h0l156.37-.25a3,3,0,1,0,0-6l-156.37.25a3,3,0,0,0,0,6Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M31.32,135.06a3,3,0,0,0,3-3V103.72l28.44,28.45a3.09,3.09,0,0,0,4.24,0l28.44-28.45v28.34a3,3,0,1,0,6,0V96.47a3,3,0,0,0-5.12-2.12L64.88,125.81,33.44,94.35a3,3,0,0,0-5.12,2.12v35.59A3,3,0,0,0,31.32,135.06Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M188.83,93.7a3,3,0,0,0-3.27.65l-31.44,31.45L122.69,94.35a3,3,0,0,0-5.12,2.12v35.59a3,3,0,0,0,6,0V103.72L152,132.17a3.09,3.09,0,0,0,4.24,0l28.44-28.45v28.34a3,3,0,0,0,6,0V96.47A3,3,0,0,0,188.83,93.7Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M283.34,121,258.5,49.46H258q1,15.94,1,29.88V121H246.31V35.34h19.75l23.79,68.14h.35l24.49-68.14h19.8V121H321V78.64q0-6.39.32-16.64t.56-12.42h-.47L295.7,121Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M354.77,39a7.62,7.62,0,0,1,2-5.68,7.88,7.88,0,0,1,5.77-2,7.71,7.71,0,0,1,5.65,2,7.62,7.62,0,0,1,2,5.68,7.48,7.48,0,0,1-2,5.54,7.64,7.64,0,0,1-5.65,2,7.81,7.81,0,0,1-5.77-2A7.48,7.48,0,0,1,354.77,39Zm14.59,82H355.59V56.2h13.77Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M415.18,122.17q-14.71,0-22.35-8.58t-7.65-24.64q0-16.35,8-25.14T416.29,55a43.33,43.33,0,0,1,18.46,3.81l-4.16,11.07q-8.73-3.4-14.41-3.4-16.82,0-16.82,22.32,0,10.9,4.19,16.38t12.28,5.48a35.22,35.22,0,0,0,17.4-4.57v12a27.18,27.18,0,0,1-7.88,3.11A47.35,47.35,0,0,1,415.18,122.17Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M481.33,55a33.18,33.18,0,0,1,6.86.59l-1.35,12.83a26,26,0,0,0-6.09-.7q-8.26,0-13.39,5.39t-5.13,14V121H448.46V56.2h10.78l1.82,11.43h.7a25.67,25.67,0,0,1,8.41-9.2A20,20,0,0,1,481.33,55Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M557.68,88.48q0,15.88-8.14,24.79t-22.68,8.91a31.07,31.07,0,0,1-16.05-4.1,27.07,27.07,0,0,1-10.72-11.78,40.11,40.11,0,0,1-3.75-17.81q0-15.76,8.09-24.61T527.21,55q14.06,0,22.27,9.05T557.68,88.48Zm-47.17,0q0,22.44,16.58,22.44,16.4,0,16.41-22.44,0-22.21-16.52-22.21-8.67,0-12.57,5.74T510.51,88.48Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M612,121,587.15,49.46h-.47q1,15.94,1,29.88V121H575V35.34h19.75l23.79,68.14h.35l24.49-68.14h19.8V121H649.67V78.64q0-6.39.32-16.64t.56-12.42h-.47L624.36,121Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M724.79,121,722,112h-.47q-4.69,5.92-9.43,8.06a29.84,29.84,0,0,1-12.19,2.14q-9.55,0-14.91-5.16t-5.36-14.59q0-10,7.44-15.12t22.68-5.57L721,81.39V77.93q0-6.21-2.9-9.29t-9-3.08A31.11,31.11,0,0,0,699.53,67a72.23,72.23,0,0,0-8.79,3.46l-4.45-9.84a48,48,0,0,1,11.54-4.19A53.14,53.14,0,0,1,709.67,55q12.36,0,18.66,5.39t6.3,16.93V121Zm-20.51-9.37q7.5,0,12-4.19t4.54-11.75V90.06l-8.32.35q-9.73.35-14.15,3.25T694,102.54a8.66,8.66,0,0,0,2.58,6.71Q699.12,111.63,704.28,111.63Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M797.38,102.54q0,9.49-6.91,14.56t-19.8,5.07q-13,0-20.8-3.93V106.35q11.43,5.27,21.27,5.27,12.71,0,12.71-7.68a6.08,6.08,0,0,0-1.41-4.1,16.66,16.66,0,0,0-4.63-3.4,79.66,79.66,0,0,0-9-4q-11.19-4.34-15.15-8.67t-4-11.25a14.77,14.77,0,0,1,6.71-12.92q6.71-4.6,18.25-4.6a51.7,51.7,0,0,1,21.62,4.63L791.88,70q-10.49-4.34-17.64-4.34-10.9,0-10.9,6.21a6.25,6.25,0,0,0,2.84,5.16q2.84,2.11,12.39,5.8a56.67,56.67,0,0,1,11.66,5.68,17,17,0,0,1,5.39,5.95A17.21,17.21,0,0,1,797.38,102.54Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M836.41,111a33.49,33.49,0,0,0,10.08-1.58v10.37a27.74,27.74,0,0,1-5.89,1.67,40.66,40.66,0,0,1-7.47.67q-19.57,0-19.57-20.62V66.63h-8.85V60.53l9.49-5,4.69-13.71h8.5V56.2h18.46V66.63H827.38v34.69q0,5,2.49,7.35A9.08,9.08,0,0,0,836.41,111Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M887.73,122.17q-15.12,0-23.64-8.82t-8.53-24.29q0-15.88,7.91-25T885.21,55q12.83,0,20.27,7.79t7.44,21.45V91.7H869.75q.29,9.43,5.1,14.5t13.54,5.07a50,50,0,0,0,10.69-1.08,56.05,56.05,0,0,0,10.63-3.6v11.19a42.26,42.26,0,0,1-10.2,3.4A62.52,62.52,0,0,1,887.73,122.17Zm-2.52-56.72a13.84,13.84,0,0,0-10.52,4.16q-4,4.16-4.72,12.13h29.41q-.12-8-3.87-12.16T885.21,65.45Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M961.45,55a33.18,33.18,0,0,1,6.86.59L967,68.44a26,26,0,0,0-6.09-.7q-8.26,0-13.39,5.39t-5.13,14V121H928.57V56.2h10.78l1.82,11.43h.7a25.67,25.67,0,0,1,8.41-9.2A20,20,0,0,1,961.45,55Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M1023.85,102.54q0,9.49-6.91,14.56t-19.8,5.07q-13,0-20.8-3.93V106.35q11.43,5.27,21.27,5.27,12.71,0,12.71-7.68a6.08,6.08,0,0,0-1.41-4.1,16.66,16.66,0,0,0-4.63-3.4,79.66,79.66,0,0,0-9-4q-11.19-4.34-15.15-8.67t-4-11.25a14.77,14.77,0,0,1,6.71-12.92q6.71-4.6,18.25-4.6a51.7,51.7,0,0,1,21.62,4.63L1018.34,70q-10.49-4.34-17.64-4.34-10.9,0-10.9,6.21a6.25,6.25,0,0,0,2.84,5.16q2.84,2.11,12.39,5.8a56.67,56.67,0,0,1,11.66,5.68,17,17,0,0,1,5.39,5.95A17.21,17.21,0,0,1,1023.85,102.54Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M1128.09,61.23q0,13.42-8.79,20.57t-25,7.15h-8.91V121h-14V35.34H1096q16.05,0,24.05,6.56T1128.09,61.23Zm-42.71,15.94h7.44q10.78,0,15.82-3.75t5-11.72q0-7.38-4.51-11t-14.06-3.63h-9.73Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M1176.6,55a33.18,33.18,0,0,1,6.86.59l-1.35,12.83a26,26,0,0,0-6.09-.7q-8.26,0-13.39,5.39t-5.13,14V121h-13.77V56.2h10.78l1.82,11.43h.7a25.67,25.67,0,0,1,8.41-9.2A20,20,0,0,1,1176.6,55Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M1252.95,88.48q0,15.88-8.14,24.79t-22.68,8.91a31.07,31.07,0,0,1-16.05-4.1,27.07,27.07,0,0,1-10.72-11.78,40.11,40.11,0,0,1-3.75-17.81q0-15.76,8.09-24.61T1222.48,55q14.06,0,22.27,9.05T1252.95,88.48Zm-47.17,0q0,22.44,16.58,22.44,16.4,0,16.41-22.44,0-22.21-16.52-22.21-8.67,0-12.57,5.74T1205.78,88.48Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M1323.5,56.2v7.56l-11.07,2.05a17.91,17.91,0,0,1,2.52,5,19.88,19.88,0,0,1,1,6.33q0,10-6.91,15.76t-19,5.74a30.86,30.86,0,0,1-5.62-.47q-4.45,2.75-4.45,6.45A3.58,3.58,0,0,0,1282,108q2.08,1.11,7.65,1.11h11.31q10.72,0,16.29,4.57t5.57,13.18a19.17,19.17,0,0,1-9.08,17q-9.08,6-26.25,6-13.24,0-20.21-4.69a15.15,15.15,0,0,1-7-13.36,14.22,14.22,0,0,1,3.78-10,20.25,20.25,0,0,1,10.58-5.65,10.34,10.34,0,0,1-4.54-3.78,9.53,9.53,0,0,1-1.79-5.48,9.43,9.43,0,0,1,2.05-6.15,23.66,23.66,0,0,1,6.09-5,18,18,0,0,1-8.17-7.06,20.77,20.77,0,0,1-3.13-11.46q0-10.55,6.65-16.35t19-5.8a46.24,46.24,0,0,1,5.77.38,36.55,36.55,0,0,1,4.54.79Zm-50.92,74.88a7.58,7.58,0,0,0,4,6.86q4,2.4,11.28,2.4,11.25,0,16.76-3.22t5.51-8.55q0-4.22-3-6t-11.22-1.79h-10.43q-5.92,0-9.4,2.78A9.13,9.13,0,0,0,1272.58,131.08Zm5.92-53.91q0,6.09,3.13,9.38t9,3.28q12,0,12-12.77,0-6.33-3-9.76t-9-3.43q-6,0-9.05,3.4T1278.5,77.17Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M1368.38,55a33.18,33.18,0,0,1,6.86.59l-1.35,12.83a26,26,0,0,0-6.09-.7q-8.26,0-13.39,5.39t-5.13,14V121h-13.77V56.2h10.78l1.82,11.43h.7a25.67,25.67,0,0,1,8.41-9.2A20,20,0,0,1,1368.38,55Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M1427.79,121l-2.75-9h-.47q-4.69,5.92-9.43,8.06a29.84,29.84,0,0,1-12.19,2.14q-9.55,0-14.91-5.16t-5.36-14.59q0-10,7.44-15.12t22.68-5.57l11.19-.35V77.93q0-6.21-2.9-9.29t-9-3.08a31.11,31.11,0,0,0-9.55,1.46,72.23,72.23,0,0,0-8.79,3.46l-4.45-9.84a48,48,0,0,1,11.54-4.19A53.14,53.14,0,0,1,1412.68,55q12.36,0,18.66,5.39t6.3,16.93V121Zm-20.51-9.37q7.5,0,12-4.19t4.54-11.75V90.06l-8.32.35q-9.73.35-14.15,3.25t-4.42,8.88a8.66,8.66,0,0,0,2.58,6.71Q1402.13,111.63,1407.29,111.63Z" transform="translate(-28.32 -0.42)"/><path class="cls-1" d="M1511.46,121h-13.83V81q0-7.44-2.81-11.1T1486,66.27q-8,0-11.69,5.19t-3.72,17.26V121h-13.77V56.2h10.78l1.93,8.5h.7a18,18,0,0,1,7.82-7.15A25.23,25.23,0,0,1,1489.38,55q14.94,0,19.8,10.2h.94a19.75,19.75,0,0,1,8.09-7.5,25.67,25.67,0,0,1,12-2.7q11.6,0,16.9,5.86t5.3,17.87V121h-13.77V81q0-7.44-2.84-11.1t-8.82-3.66q-8,0-11.75,5t-3.72,15.38Z" transform="translate(-28.32 -0.42)"/></svg> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the id and data-name attributes, and the <defs> (including the styles). Could you add a more meaningful class than cls-1 and add a default fill colour to Sass.
| @@ -0,0 +1 @@ | |||
| <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2116.96 151"><defs><style>.cls-1{fill:#9a1f60;}</style></defs><title>professional-certificate-icon-SR</title><path class="cls-1" d="M219,42A42,42,0,0,0,153.33,7.33,3,3,0,0,0,152,7H3a3,3,0,0,0-3,3V125a3,3,0,0,0,3,3H146v20a3,3,0,0,0,5.12,2.12l25.41-25.41,12,11.69c3.55,3.44,7.11,6.88,9.79,9.46C203.71,151,203.71,151,205,151a3,3,0,0,0,3-3V71a3,3,0,0,0-.07-.62A41.84,41.84,0,0,0,219,42Zm-6,0A36,36,0,1,1,177,6,36,36,0,0,1,213,42ZM6,122V13H146.66a41.9,41.9,0,0,0-.6,57.38A3,3,0,0,0,146,71v51Zm172.59-3.65a3,3,0,0,0-4.21,0L152,140.76v-65a41.91,41.91,0,0,0,50,0V141C196.07,135.33,186,125.54,178.59,118.35Z"/><path class="cls-1" d="M170.88,56.12a3,3,0,0,0,4.24,0l21-21a3,3,0,0,0-4.24-4.24L173,49.76,161.12,37.88a3,3,0,1,0-4.24,4.24Z"/><path class="cls-1" d="M97.31,37.79H57.55a3.46,3.46,0,1,0,0,6.92H89L45.36,88.3a3.46,3.46,0,0,0,4.89,4.89L93.85,49.6V81a3.46,3.46,0,0,0,6.92,0V41.25A3.46,3.46,0,0,0,97.31,37.79Z"/><path class="cls-1" d="M316,56.23q0,13.42-8.79,20.57t-25,7.15h-8.91V116h-14V30.34H284Q300,30.34,308,36.9T316,56.23ZM273.31,72.17h7.44q10.78,0,15.82-3.75t5-11.72q0-7.38-4.51-11T283,42.05h-9.73Z"/><path class="cls-1" d="M364.54,50a33.18,33.18,0,0,1,6.86.59l-1.35,12.83a26,26,0,0,0-6.09-.7q-8.26,0-13.39,5.39t-5.13,14V116H331.67V51.2h10.78l1.82,11.43h.7a25.67,25.67,0,0,1,8.41-9.2A20,20,0,0,1,364.54,50Z"/><path class="cls-1" d="M440.89,83.48q0,15.88-8.14,24.79t-22.68,8.91a31.07,31.07,0,0,1-16.05-4.1,27.07,27.07,0,0,1-10.72-11.78,40.11,40.11,0,0,1-3.75-17.81q0-15.76,8.09-24.61T410.42,50q14.06,0,22.27,9.05T440.89,83.48Zm-47.17,0q0,22.44,16.58,22.44,16.4,0,16.41-22.44,0-22.21-16.52-22.21-8.67,0-12.57,5.74T393.72,83.48Z"/><path class="cls-1" d="M489.23,61.63H473.41V116H459.58V61.63H448.92V55.18L459.58,51V46.74q0-11.48,5.39-17t16.46-5.54a44,44,0,0,1,14.3,2.4L492.1,37a31.76,31.76,0,0,0-9.73-1.64q-4.69,0-6.83,2.9T473.41,47V51.2h15.82Z"/><path class="cls-1" d="M528.55,117.17q-15.12,0-23.64-8.82t-8.53-24.29q0-15.88,7.91-25T526,50q12.83,0,20.27,7.79t7.44,21.45V86.7H510.56q.29,9.43,5.1,14.5t13.54,5.07a50,50,0,0,0,10.69-1.08,56.05,56.05,0,0,0,10.63-3.6v11.19a42.31,42.31,0,0,1-10.2,3.4A62.52,62.52,0,0,1,528.55,117.17ZM526,60.45a13.84,13.84,0,0,0-10.52,4.16q-4,4.16-4.72,12.13h29.41q-.12-8-3.87-12.16T526,60.45Z"/><path class="cls-1" d="M612.92,97.54q0,9.49-6.91,14.56t-19.8,5.07q-13,0-20.8-3.93V101.35q11.43,5.27,21.27,5.27,12.71,0,12.71-7.68a6.08,6.08,0,0,0-1.41-4.1,16.66,16.66,0,0,0-4.63-3.4,79.66,79.66,0,0,0-9-4q-11.19-4.34-15.15-8.67t-4-11.25A14.77,14.77,0,0,1,572,54.62Q578.7,50,590.25,50a51.7,51.7,0,0,1,21.62,4.63L607.41,65q-10.49-4.34-17.64-4.34-10.9,0-10.9,6.21a6.25,6.25,0,0,0,2.84,5.16q2.84,2.11,12.39,5.8a56.67,56.67,0,0,1,11.66,5.68,17,17,0,0,1,5.39,5.95A17.21,17.21,0,0,1,612.92,97.54Z"/><path class="cls-1" d="M671.34,97.54q0,9.49-6.91,14.56t-19.8,5.07q-13,0-20.8-3.93V101.35q11.43,5.27,21.27,5.27,12.71,0,12.71-7.68a6.08,6.08,0,0,0-1.41-4.1,16.66,16.66,0,0,0-4.63-3.4,79.66,79.66,0,0,0-9-4q-11.19-4.34-15.15-8.67t-4-11.25a14.77,14.77,0,0,1,6.71-12.92q6.71-4.6,18.25-4.6a51.7,51.7,0,0,1,21.62,4.63L665.83,65q-10.49-4.34-17.64-4.34-10.9,0-10.9,6.21a6.25,6.25,0,0,0,2.84,5.16q2.84,2.11,12.39,5.8a56.67,56.67,0,0,1,11.66,5.68,17,17,0,0,1,5.39,5.95A17.21,17.21,0,0,1,671.34,97.54Z"/><path class="cls-1" d="M685.4,34a7.62,7.62,0,0,1,2-5.68,7.88,7.88,0,0,1,5.77-2,7.71,7.71,0,0,1,5.65,2,7.62,7.62,0,0,1,2,5.68,7.48,7.48,0,0,1-2,5.54,7.64,7.64,0,0,1-5.65,2,7.81,7.81,0,0,1-5.77-2A7.48,7.48,0,0,1,685.4,34ZM700,116H686.22V51.2H700Z"/><path class="cls-1" d="M777.16,83.48q0,15.88-8.14,24.79t-22.68,8.91a31.07,31.07,0,0,1-16.05-4.1,27.07,27.07,0,0,1-10.72-11.78,40.11,40.11,0,0,1-3.75-17.81q0-15.76,8.09-24.61T746.69,50q14.06,0,22.27,9.05T777.16,83.48Zm-47.17,0q0,22.44,16.58,22.44,16.4,0,16.41-22.44,0-22.21-16.52-22.21-8.67,0-12.57,5.74T730,83.48Z"/><path class="cls-1" d="M850,116H836.16V76.16q0-7.5-3-11.19t-9.58-3.69q-8.73,0-12.77,5.16t-4,17.29V116H793V51.2h10.78l1.93,8.5h.7a19.17,19.17,0,0,1,8.32-7.15,27.89,27.89,0,0,1,12-2.52Q850,50,850,73.75Z"/><path class="cls-1" d="M909.7,116l-2.75-9h-.47q-4.69,5.92-9.43,8.06a29.84,29.84,0,0,1-12.19,2.14q-9.55,0-14.91-5.16t-5.36-14.59q0-10,7.44-15.12t22.68-5.57l11.19-.35V72.93q0-6.21-2.9-9.29t-9-3.08A31.11,31.11,0,0,0,884.45,62a72.23,72.23,0,0,0-8.79,3.46l-4.45-9.84a48,48,0,0,1,11.54-4.19A53.14,53.14,0,0,1,894.58,50q12.36,0,18.66,5.39t6.3,16.93V116Zm-20.51-9.37q7.5,0,12-4.19t4.54-11.75V85.06l-8.32.35q-9.73.35-14.15,3.25t-4.42,8.88a8.66,8.66,0,0,0,2.58,6.71Q884,106.63,889.19,106.63Z"/><path class="cls-1" d="M952.53,116H938.76V24.83h13.77Z"/><path class="cls-1" d="M1041.3,41.12q-12.07,0-19,8.55t-6.91,23.61q0,15.76,6.65,23.85t19.25,8.09a50.58,50.58,0,0,0,10.55-1.08q5.1-1.08,10.61-2.78v12a64.3,64.3,0,0,1-22.85,3.81q-18.81,0-28.89-11.4t-10.08-32.61q0-13.36,4.89-23.38a34.91,34.91,0,0,1,14.15-15.35q9.26-5.33,21.74-5.33a54,54,0,0,1,24.26,5.51l-5,11.66a75.46,75.46,0,0,0-9.17-3.6A33.06,33.06,0,0,0,1041.3,41.12Z"/><path class="cls-1" d="M1107.75,117.17q-15.12,0-23.64-8.82t-8.53-24.29q0-15.88,7.91-25T1105.23,50q12.83,0,20.27,7.79t7.44,21.45V86.7h-43.18q.29,9.43,5.1,14.5t13.54,5.07a50,50,0,0,0,10.69-1.08,56.05,56.05,0,0,0,10.63-3.6v11.19a42.31,42.31,0,0,1-10.2,3.4A62.52,62.52,0,0,1,1107.75,117.17Zm-2.52-56.72a13.84,13.84,0,0,0-10.52,4.16q-4,4.16-4.72,12.13h29.41q-.12-8-3.87-12.16T1105.23,60.45Z"/><path class="cls-1" d="M1181.46,50a33.18,33.18,0,0,1,6.86.59L1187,63.44a26,26,0,0,0-6.09-.7q-8.26,0-13.39,5.39t-5.13,14V116h-13.77V51.2h10.78l1.82,11.43h.7a25.67,25.67,0,0,1,8.41-9.2A20,20,0,0,1,1181.46,50Z"/><path class="cls-1" d="M1224.46,106a33.49,33.49,0,0,0,10.08-1.58v10.37a27.8,27.8,0,0,1-5.89,1.67,40.66,40.66,0,0,1-7.47.67q-19.57,0-19.57-20.62V61.63h-8.85V55.53l9.49-5,4.69-13.71h8.5V51.2h18.46V61.63h-18.46V96.31q0,5,2.49,7.35A9.08,9.08,0,0,0,1224.46,106Z"/><path class="cls-1" d="M1246.67,34a7.62,7.62,0,0,1,2-5.68,7.88,7.88,0,0,1,5.77-2,7.71,7.71,0,0,1,5.65,2,7.62,7.62,0,0,1,2,5.68,7.48,7.48,0,0,1-2,5.54,7.64,7.64,0,0,1-5.65,2,7.81,7.81,0,0,1-5.77-2A7.48,7.48,0,0,1,1246.67,34Zm14.59,82h-13.77V51.2h13.77Z"/><path class="cls-1" d="M1313.47,61.63h-15.82V116h-13.83V61.63h-10.66V55.18L1283.82,51V46.74q0-11.48,5.39-17t16.46-5.54a44,44,0,0,1,14.3,2.4L1316.34,37a31.76,31.76,0,0,0-9.73-1.64q-4.69,0-6.83,2.9t-2.14,8.7V51.2h15.82Zm10.2-27.6a7.62,7.62,0,0,1,2-5.68,7.88,7.88,0,0,1,5.77-2,7.71,7.71,0,0,1,5.65,2,7.62,7.62,0,0,1,2,5.68,7.48,7.48,0,0,1-2,5.54,7.64,7.64,0,0,1-5.65,2,7.81,7.81,0,0,1-5.77-2A7.48,7.48,0,0,1,1323.66,34Zm14.59,82h-13.77V51.2h13.77Z"/><path class="cls-1" d="M1384.13,117.17q-14.71,0-22.35-8.58t-7.65-24.64q0-16.35,8-25.14T1385.25,50a43.33,43.33,0,0,1,18.46,3.81l-4.16,11.07q-8.73-3.4-14.41-3.4-16.82,0-16.82,22.32,0,10.9,4.19,16.38t12.28,5.48a35.22,35.22,0,0,0,17.4-4.57v12a27.2,27.2,0,0,1-7.88,3.11A47.35,47.35,0,0,1,1384.13,117.17Z"/><path class="cls-1" d="M1458,116l-2.75-9h-.47q-4.69,5.92-9.43,8.06a29.84,29.84,0,0,1-12.19,2.14q-9.55,0-14.91-5.16t-5.36-14.59q0-10,7.44-15.12T1443,76.74l11.19-.35V72.93q0-6.21-2.9-9.29t-9-3.08a31.11,31.11,0,0,0-9.55,1.46,72.23,72.23,0,0,0-8.79,3.46l-4.45-9.84A48,48,0,0,1,1431,51.46,53.14,53.14,0,0,1,1442.84,50q12.36,0,18.66,5.39t6.3,16.93V116Zm-20.51-9.37q7.5,0,12-4.19T1454,90.69V85.06l-8.32.35q-9.73.35-14.15,3.25t-4.42,8.88a8.66,8.66,0,0,0,2.58,6.71Q1432.3,106.63,1437.45,106.63Z"/><path class="cls-1" d="M1511.16,106a33.49,33.49,0,0,0,10.08-1.58v10.37a27.8,27.8,0,0,1-5.89,1.67,40.66,40.66,0,0,1-7.47.67q-19.57,0-19.57-20.62V61.63h-8.85V55.53l9.49-5,4.69-13.71h8.5V51.2h18.46V61.63h-18.46V96.31q0,5,2.49,7.35A9.08,9.08,0,0,0,1511.16,106Z"/><path class="cls-1" d="M1562.49,117.17q-15.12,0-23.64-8.82t-8.53-24.29q0-15.88,7.91-25T1560,50q12.83,0,20.27,7.79t7.44,21.45V86.7H1544.5q.29,9.43,5.1,14.5t13.54,5.07a50,50,0,0,0,10.69-1.08,56.05,56.05,0,0,0,10.63-3.6v11.19a42.31,42.31,0,0,1-10.2,3.4A62.52,62.52,0,0,1,1562.49,117.17ZM1560,60.45a13.84,13.84,0,0,0-10.52,4.16q-4,4.16-4.72,12.13h29.41q-.12-8-3.87-12.16T1560,60.45Z"/><path class="cls-1" d="M1692.69,56.23q0,13.42-8.79,20.57t-25,7.15H1650V116h-14V30.34h24.67q16.05,0,24.05,6.56T1692.69,56.23ZM1650,72.17h7.44q10.78,0,15.82-3.75t5-11.72q0-7.38-4.51-11t-14.06-3.63H1650Z"/><path class="cls-1" d="M1741.2,50a33.18,33.18,0,0,1,6.86.59l-1.35,12.83a26,26,0,0,0-6.09-.7q-8.26,0-13.39,5.39t-5.13,14V116h-13.77V51.2h10.78l1.82,11.43h.7a25.67,25.67,0,0,1,8.41-9.2A20,20,0,0,1,1741.2,50Z"/><path class="cls-1" d="M1817.55,83.48q0,15.88-8.14,24.79t-22.68,8.91a31.07,31.07,0,0,1-16.05-4.1A27.07,27.07,0,0,1,1760,101.29a40.11,40.11,0,0,1-3.75-17.81q0-15.76,8.09-24.61T1787.08,50q14.06,0,22.27,9.05T1817.55,83.48Zm-47.17,0q0,22.44,16.58,22.44,16.4,0,16.41-22.44,0-22.21-16.52-22.21-8.67,0-12.57,5.74T1770.38,83.48Z"/><path class="cls-1" d="M1888.1,51.2v7.56L1877,60.8a17.91,17.91,0,0,1,2.52,5,19.88,19.88,0,0,1,1,6.33q0,10-6.91,15.76t-19,5.74a30.86,30.86,0,0,1-5.62-.47q-4.45,2.75-4.45,6.45a3.58,3.58,0,0,0,2.08,3.34q2.08,1.11,7.65,1.11h11.31q10.72,0,16.29,4.57t5.57,13.18a19.17,19.17,0,0,1-9.08,17q-9.08,6-26.25,6-13.24,0-20.21-4.69a15.15,15.15,0,0,1-7-13.36,14.22,14.22,0,0,1,3.78-10,20.25,20.25,0,0,1,10.58-5.65,10.34,10.34,0,0,1-4.54-3.78,9.53,9.53,0,0,1-1.79-5.48,9.43,9.43,0,0,1,2.05-6.15,23.66,23.66,0,0,1,6.09-5,18,18,0,0,1-8.17-7.06,20.77,20.77,0,0,1-3.13-11.46q0-10.55,6.65-16.35t19-5.8a46.24,46.24,0,0,1,5.77.38,36.55,36.55,0,0,1,4.54.79Zm-50.92,74.88a7.58,7.58,0,0,0,4,6.86q4,2.4,11.28,2.4,11.25,0,16.76-3.22t5.51-8.55q0-4.22-3-6t-11.22-1.79h-10.43q-5.92,0-9.4,2.78A9.13,9.13,0,0,0,1837.18,126.08Zm5.92-53.91q0,6.09,3.13,9.38t9,3.28q12,0,12-12.77,0-6.33-3-9.76t-9-3.43q-6,0-9.05,3.4T1843.1,72.17Z"/><path class="cls-1" d="M1933,50a33.18,33.18,0,0,1,6.86.59l-1.35,12.83a26,26,0,0,0-6.09-.7q-8.26,0-13.39,5.39t-5.13,14V116h-13.77V51.2h10.78l1.82,11.43h.7a25.67,25.67,0,0,1,8.41-9.2A20,20,0,0,1,1933,50Z"/><path class="cls-1" d="M1992.39,116l-2.75-9h-.47q-4.69,5.92-9.43,8.06a29.84,29.84,0,0,1-12.19,2.14q-9.55,0-14.91-5.16t-5.36-14.59q0-10,7.44-15.12t22.68-5.57l11.19-.35V72.93q0-6.21-2.9-9.29t-9-3.08a31.11,31.11,0,0,0-9.55,1.46,72.23,72.23,0,0,0-8.79,3.46l-4.45-9.84a48,48,0,0,1,11.54-4.19A53.14,53.14,0,0,1,1977.28,50q12.36,0,18.66,5.39t6.3,16.93V116Zm-20.51-9.37q7.5,0,12-4.19t4.54-11.75V85.06l-8.32.35q-9.73.35-14.15,3.25t-4.42,8.88a8.66,8.66,0,0,0,2.58,6.71Q1966.73,106.63,1971.89,106.63Z"/><path class="cls-1" d="M2076.07,116h-13.83V76q0-7.44-2.81-11.1t-8.79-3.66q-8,0-11.69,5.19t-3.72,17.26V116h-13.77V51.2h10.78l1.93,8.5h.7a18,18,0,0,1,7.82-7.15A25.23,25.23,0,0,1,2054,50q14.94,0,19.8,10.2h.94a19.75,19.75,0,0,1,8.09-7.5,25.67,25.67,0,0,1,12-2.7q11.6,0,16.9,5.86t5.3,17.87V116H2103.2V76q0-7.44-2.84-11.1t-8.82-3.66q-8,0-11.75,5t-3.72,15.38Z"/></svg> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the id and data-name attributes, and the <defs> (including the styles). Could you add a more meaningful class than cls-1 and add a default fill colour to Sass.
| @@ -0,0 +1 @@ | |||
| <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1198.33 151"><defs><style>.cls-1{fill:#424242;}</style></defs><title>xseries-icon-SR</title><path class="cls-1" d="M219,42A42,42,0,0,0,153.33,7.33,3,3,0,0,0,152,7H3a3,3,0,0,0-3,3V125a3,3,0,0,0,3,3H146v20a3,3,0,0,0,5.12,2.12l25.41-25.41,12,11.69c3.55,3.44,7.11,6.88,9.79,9.46C203.71,151,203.71,151,205,151a3,3,0,0,0,3-3V71a3,3,0,0,0-.07-.62A41.84,41.84,0,0,0,219,42Zm-6,0A36,36,0,1,1,177,6,36,36,0,0,1,213,42ZM6,122V13H146.66a41.9,41.9,0,0,0-.6,57.38A3,3,0,0,0,146,71v51Zm172.59-3.65a3,3,0,0,0-4.21,0L152,140.76v-65a41.91,41.91,0,0,0,50,0V141C196.07,135.33,186,125.54,178.59,118.35Z"/><path class="cls-1" d="M170.88,56.12a3,3,0,0,0,4.24,0l21-21a3,3,0,0,0-4.24-4.24L173,49.76,161.12,37.88a3,3,0,1,0-4.24,4.24Z"/><path class="cls-1" d="M109,99h-4.62l-27-31.5L105.24,35h2.91a3,3,0,1,0,0-6H92.71a3,3,0,0,0,0,6h4.62L73.43,62.89,49.52,35h3.76a3,3,0,0,0,0-6H37.86a3,3,0,0,0,0,6h3.76L69.48,67.5,42.48,99H37a3,3,0,0,0,0,6H54.14a3,3,0,1,0,0-6H50.38l23-26.89L96.48,99H91.86a3,3,0,1,0,0,6H109a3,3,0,0,0,0-6Z"/><path class="cls-1" d="M326.75,116.67H310.63l-21.45-35-21.62,35h-15L281,72.25,254.38,31H270l19.8,32.4L309.58,31H324.7L297.92,72.49Z"/><path class="cls-1" d="M387.68,93.41q0,11.43-8.26,17.93t-22.79,6.5q-14.53,0-23.79-4.51V100.08a64.64,64.64,0,0,0,12.45,4.34A52.79,52.79,0,0,0,357.57,106q8.32,0,12.28-3.16a10.32,10.32,0,0,0,4-8.5,10.65,10.65,0,0,0-3.63-8.14q-3.63-3.34-15-7.91-11.72-4.75-16.52-10.84a22.93,22.93,0,0,1-4.8-14.65q0-10.72,7.62-16.87t20.45-6.15a60.09,60.09,0,0,1,24.49,5.39l-4.45,11.43q-11.43-4.8-20.39-4.8-6.8,0-10.31,3a9.72,9.72,0,0,0-3.52,7.82,11,11,0,0,0,1.41,5.71,14.36,14.36,0,0,0,4.63,4.48,78.15,78.15,0,0,0,11.6,5.57q9.43,3.93,13.83,7.32a21.56,21.56,0,0,1,6.45,7.68A23.09,23.09,0,0,1,387.68,93.41Z"/><path class="cls-1" d="M431.1,117.84q-15.12,0-23.64-8.82t-8.53-24.29q0-15.88,7.91-25t21.74-9.08q12.83,0,20.27,7.79t7.44,21.45v7.44H413.11q.29,9.43,5.1,14.5t13.54,5.07a50,50,0,0,0,10.69-1.08,56.05,56.05,0,0,0,10.63-3.6v11.19a42.31,42.31,0,0,1-10.2,3.4A62.6,62.6,0,0,1,431.1,117.84Zm-2.52-56.72a13.84,13.84,0,0,0-10.52,4.16q-4,4.16-4.72,12.13h29.41q-.12-8-3.87-12.16T428.58,61.12Z"/><path class="cls-1" d="M504.81,50.69a33.18,33.18,0,0,1,6.86.59l-1.35,12.83a26,26,0,0,0-6.09-.7q-8.26,0-13.39,5.39t-5.13,14v33.87H471.94V51.86h10.78l1.82,11.43h.7a25.67,25.67,0,0,1,8.41-9.2A20,20,0,0,1,504.81,50.69Z"/><path class="cls-1" d="M522.86,34.69a7.62,7.62,0,0,1,2-5.68,7.88,7.88,0,0,1,5.77-2,7.71,7.71,0,0,1,5.65,2,7.62,7.62,0,0,1,2,5.68,7.48,7.48,0,0,1-2,5.54,7.64,7.64,0,0,1-5.65,2,7.81,7.81,0,0,1-5.77-2A7.48,7.48,0,0,1,522.86,34.69Zm14.59,82H523.68V51.86h13.77Z"/><path class="cls-1" d="M585.44,117.84q-15.12,0-23.64-8.82t-8.53-24.29q0-15.88,7.91-25t21.74-9.08q12.83,0,20.27,7.79t7.44,21.45v7.44H567.45q.29,9.43,5.1,14.5t13.54,5.07a50,50,0,0,0,10.69-1.08,56.05,56.05,0,0,0,10.63-3.6v11.19a42.31,42.31,0,0,1-10.2,3.4A62.6,62.6,0,0,1,585.44,117.84Zm-2.52-56.72a13.84,13.84,0,0,0-10.52,4.16q-4,4.16-4.72,12.13H597.1q-.12-8-3.87-12.16T582.92,61.12Z"/><path class="cls-1" d="M669.81,98.21q0,9.49-6.91,14.56t-19.8,5.07q-13,0-20.8-3.93V102q11.43,5.27,21.27,5.27,12.71,0,12.71-7.68a6.08,6.08,0,0,0-1.41-4.1,16.66,16.66,0,0,0-4.63-3.4,79.66,79.66,0,0,0-9-4q-11.19-4.34-15.15-8.67t-4-11.25a14.77,14.77,0,0,1,6.71-12.92q6.71-4.6,18.25-4.6a51.7,51.7,0,0,1,21.62,4.63l-4.45,10.37q-10.49-4.34-17.64-4.34-10.9,0-10.9,6.21a6.25,6.25,0,0,0,2.84,5.16q2.84,2.11,12.39,5.8a56.67,56.67,0,0,1,11.66,5.68,17,17,0,0,1,5.39,5.95A17.21,17.21,0,0,1,669.81,98.21Z"/><path class="cls-1" d="M774.05,56.9q0,13.42-8.79,20.57t-25,7.15h-8.91v32.05h-14V31H742q16.05,0,24.05,6.56T774.05,56.9ZM731.34,72.84h7.44q10.78,0,15.82-3.75t5-11.72q0-7.38-4.51-11t-14.06-3.63h-9.73Z"/><path class="cls-1" d="M822.57,50.69a33.18,33.18,0,0,1,6.86.59l-1.35,12.83a26,26,0,0,0-6.09-.7q-8.26,0-13.39,5.39t-5.13,14v33.87H789.7V51.86h10.78l1.82,11.43h.7a25.67,25.67,0,0,1,8.41-9.2A20,20,0,0,1,822.57,50.69Z"/><path class="cls-1" d="M898.92,84.15q0,15.88-8.14,24.79t-22.68,8.91a31.07,31.07,0,0,1-16.05-4.1A27.07,27.07,0,0,1,841.32,102a40.11,40.11,0,0,1-3.75-17.81q0-15.76,8.09-24.61t22.79-8.85q14.06,0,22.27,9.05T898.92,84.15Zm-47.17,0q0,22.44,16.58,22.44,16.4,0,16.41-22.44,0-22.21-16.52-22.21-8.67,0-12.57,5.74T851.75,84.15Z"/><path class="cls-1" d="M969.46,51.86v7.56l-11.07,2.05a17.91,17.91,0,0,1,2.52,5,19.88,19.88,0,0,1,1,6.33q0,10-6.91,15.76t-19,5.74a30.86,30.86,0,0,1-5.62-.47q-4.45,2.75-4.45,6.45a3.58,3.58,0,0,0,2.08,3.34q2.08,1.11,7.65,1.11H946.9q10.72,0,16.29,4.57t5.57,13.18a19.17,19.17,0,0,1-9.08,17q-9.08,6-26.25,6-13.24,0-20.21-4.69a15.15,15.15,0,0,1-7-13.36,14.21,14.21,0,0,1,3.78-10,20.25,20.25,0,0,1,10.58-5.65,10.34,10.34,0,0,1-4.54-3.78,9.53,9.53,0,0,1-1.79-5.48,9.43,9.43,0,0,1,2.05-6.15,23.66,23.66,0,0,1,6.09-5,18,18,0,0,1-8.17-7.06,20.77,20.77,0,0,1-3.13-11.46q0-10.55,6.65-16.35t19-5.8a46.24,46.24,0,0,1,5.77.38,36.55,36.55,0,0,1,4.54.79Zm-50.92,74.88a7.57,7.57,0,0,0,4,6.86q4,2.4,11.28,2.4,11.25,0,16.76-3.22t5.51-8.55q0-4.22-3-6t-11.22-1.79H931.43q-5.92,0-9.4,2.78A9.12,9.12,0,0,0,918.54,126.74Zm5.92-53.91q0,6.09,3.13,9.38t9,3.28q12,0,12-12.77,0-6.33-3-9.76t-9-3.43q-6,0-9.05,3.4T924.46,72.84Z"/><path class="cls-1" d="M1014.34,50.69a33.18,33.18,0,0,1,6.86.59l-1.35,12.83a26,26,0,0,0-6.09-.7q-8.26,0-13.39,5.39t-5.13,14v33.87H981.47V51.86h10.78l1.82,11.43h.7a25.67,25.67,0,0,1,8.41-9.2A20,20,0,0,1,1014.34,50.69Z"/><path class="cls-1" d="M1073.76,116.67l-2.75-9h-.47q-4.69,5.92-9.43,8.06a29.85,29.85,0,0,1-12.19,2.14q-9.55,0-14.91-5.16t-5.36-14.59q0-10,7.44-15.12t22.68-5.57l11.19-.35V73.6q0-6.21-2.9-9.29t-9-3.08a31.11,31.11,0,0,0-9.55,1.46,72.23,72.23,0,0,0-8.79,3.46l-4.45-9.84a48,48,0,0,1,11.54-4.19,53.14,53.14,0,0,1,11.84-1.44q12.36,0,18.66,5.39T1083.6,73v43.65Zm-20.51-9.37q7.5,0,12-4.19t4.54-11.75V85.73l-8.32.35q-9.73.35-14.15,3.25t-4.42,8.88a8.66,8.66,0,0,0,2.58,6.71Q1048.09,107.29,1053.25,107.29Z"/><path class="cls-1" d="M1157.43,116.67H1143.6v-40q0-7.44-2.81-11.1T1132,61.94q-8,0-11.69,5.19t-3.72,17.26v32.29h-13.77V51.86h10.78l1.93,8.5h.7a18,18,0,0,1,7.82-7.15,25.23,25.23,0,0,1,11.28-2.52q14.94,0,19.8,10.2h.94a19.75,19.75,0,0,1,8.09-7.5,25.67,25.67,0,0,1,12-2.7q11.6,0,16.9,5.86t5.3,17.87v42.25h-13.77v-40q0-7.44-2.84-11.1t-8.82-3.66q-8,0-11.75,5t-3.72,15.38Z"/></svg> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the id and data-name attributes, and the <defs> (including the styles). Could you add a more meaningful class than cls-1 and add a default fill colour to Sass.
| var verified_seat, currency; | ||
| if ('seats' in run && run['seats'].length) { | ||
| verified_seat = _.filter(run['seats'], function(seat){ | ||
| if (seat['type'] === 'verified' || seat['type'] === 'professional' || seat['type'] === 'credit'){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dot notation is preferred (e.g. seat.type).
| return seat; | ||
| } | ||
| })[0] | ||
| currency = verified_seat['currency']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dot notation please.
|
|
||
| .program-details { | ||
| .window-wrap { | ||
| background-color: rgb(255,255,255); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a Sass variable.
| .program-details-wrapper { | ||
|
|
||
| .program-details-header { | ||
| background-color: rgb(252,252,252); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a Sass variable.
| } | ||
|
|
||
| .micromasters { | ||
| fill: #065784; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a Sass variable.
| } | ||
|
|
||
| .xseries { | ||
| fill: #065784; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a Sass variable.
| } | ||
|
|
||
| .professional.certificate { | ||
| fill: #065784; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a Sass variable.
|
|
||
| context = { | ||
| 'program_data': program_data, | ||
| 'courses_progress': meter.progress(programs=meter.programs, count_only=False)[0], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's going to be a lot duplicated between program_data and courses_progress. The bulk of program_data is data about the courses in the program, and it looks like that same data is going to end up grouped in course_progress. What can we do about that?
I'd update the tests of this view so that they verify the data is present on the page. Also, if these end up staying separate, a more descriptive name might be nice here. course_groups, for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well i think the program data is primarily used for the program data and this is just the course data.
Assuming we didn't need the course data we could theoretically remove it from the program_data object but that doesn't seem necessary to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MatthewPiatetsky the course data is the majority of the program data. If nothing changes here, we'll send that data to clients twice for no reason. We shouldn't increase the size of the response more than we have to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you suggesting we just delete the course data from the program data object if it is in fact unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MatthewPiatetsky not necessarily, I'm just asking you to find a way to avoid increasing the size of the response unnecessarily. That could mean popping the course data from the program data dict if it's not going to be messy.
| """ | ||
| course_run_certificates = certificate_api.get_certificates_for_user(self.user.username) | ||
| return [ | ||
| completed_course_runs = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary?
| def _assert_progress(self, meter, *progresses): | ||
| """Variadic helper used to verify progress calculations.""" | ||
| self.assertEqual(meter.progress, list(progresses)) | ||
| self.assertEqual(meter.progress(), list(progresses)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A test that covers the case where count_only is False would be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
| // logo colors | ||
| $micromasters-logo-blue: #005585; | ||
| $xseries-logo-gray: #424242; | ||
| $professional-certificate-logo-red: #9a1f60; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: I'm not sure it matters that they are logos or what the name of the color is (e.g. if next month they wanted to make the xseries color orange) so I would consider renaming them $micromasters-color, etc.
| @media(min-width: $bp-screen-md) { | ||
| margin-left: 30px; | ||
| margin-right: 80px; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move this down a few lines so it's after the initial margin declarations. Also, an alternative way of writing this is;
margin: {
left: 30px;
right: 80px;
}
| padding-top: 40px; | ||
| padding-bottom: 35px; | ||
| display: flex; | ||
| color: black; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variables should be used for colours.
| } | ||
|
|
||
| .course-list > div:nth-of-type(even) { | ||
| background-color: #f9fafc; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variables should be used for colours.
| .divider { | ||
| margin-left: 0; | ||
| margin-bottom: 20px; | ||
| background-color: #BBC7D2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variables should be used for colours.
| font-family: "Open Sans"; | ||
| font-weight: 600; | ||
| font-size: 1.3em; | ||
| color: #373737; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variables should be used for colours.
| font-weight: 600; | ||
| font-size: 1.3em; | ||
| color: #373737; | ||
| margin-bottom: 0 0 5px 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should either be margin-bottom: 5px or margin: 0 0 5px 0;
| font-family: "Open Sans"; | ||
| font-weight: bold; | ||
| font-size: 0.9375em; | ||
| color: #2c3e50; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variables should be used for colours.
| } | ||
|
|
||
| .price { | ||
| color: #006d01; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variables should be used for colours.
|
|
||
| .certificate-status { | ||
| .fa-check-circle { | ||
| color: #006d01; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variables should be used for colours.
| font-family: "Open Sans"; | ||
| font-weight: bold; | ||
| font-size: 0.9375em; | ||
| color: #2c3e50; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variables should be used for colours.
| } | ||
|
|
||
| .certificate-status-msg { | ||
| color: #292929; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variables should be used for colours.
mikedikan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks pretty good so far - minor comments/questions
| getCertificatePriceString: function(run) { | ||
| var verifiedSeat, currency; | ||
| if ('seats' in run && run.seats.length) { | ||
| // eslint-disable-next-line consistent-return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you leave a comment explaining why we ignore the linter here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using filter and not returning all seat types (which means the function doesn't always return.)
Not sure, maybe i can return nothing to make the filter ignore it or something like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that sounds reasonable
| } | ||
| })[0]; | ||
| currency = verifiedSeat.currency; | ||
| if (currency === 'USD') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
USD is the only currency where the sign precedes the value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the other currencies we just have the name.
It would be weird to put something like USD10. This is basically only handling USD and adding a relatively sane fallback behavior for other currencies until we know how we want to deal with them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| </h2> | ||
| <div class="course-date" aria-hidden="true"> | ||
| <%- interpolate( | ||
| gettext("Starts: %(start_date)s"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the 's' after the start_date variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rlucioni do you know?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikedikan @MatthewPiatetsky it's the wrapper for vars that interpolate expects Starts: %(my_var)s
|
@MatthewPiatetsky can you update the demo link so it uses your IP? |
|
@AlasdairSwan i think i've either commented on or addressed most of your comments. |
|
@MatthewPiatetsky here are the test for the current program dashboard https://github.com/edx/edx-platform/tree/26201161813a15b565ffdccd91c1ea5ee9a01b0e/lms/static/js/spec/learner_dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All 3 SVGs still have class cls-1, could we change it to be more meaningful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this line doing? !([undefined, 'None', null].indexOf isn't very clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line is checking that courseRun.advertised_start is not undefined, 'None' or null
do you have suggestion for making this more clear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!_.isUndefined(course_run.advertised_start))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that works for the undefined case but not the other two I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you're right. The 'None' value is a weird one. I think it would be clearer what's going on in the code if you created a function called something like isDefined that does the check i.e.
isDefined: function(str) {
return [undefined, 'None', null].indexOf(str) >= 0;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MatthewPiatetsky I would still prefer this check to be its own function to make the code easier to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make more sense to default the value of enrolled to false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at the moment i was passing the text to display to the template. would it be better if it was a boolean that that the template looked at with an if block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine, I was assuming it was a boolean and not text.
| this.render(); | ||
| if (this.urlModel) { | ||
| this.trackSelectionUrl = this.urlModel.get('track_selection_url'); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think it makes sense to move it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be wrapped in an if (this.remainingCourseCollection.length > 0) { ?
| </h2> | ||
| <div class="course-date" aria-hidden="true"> | ||
| <%- interpolate( | ||
| gettext("Starts: %(start_date)s"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikedikan @MatthewPiatetsky it's the wrapper for vars that interpolate expects Starts: %(my_var)s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 2 versions of this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this just be <% if (!is_enrolled) { %>?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlasdairSwan if i comment out these images my program_details_view_spec.js tests work
otherwise the tests error on a 404 on these. what is the correct way to include them in the spec file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's weird, I didn't think we have to do anything special because the same text! plugin is being used for underscore templates. Maybe the karma.conf isn't aware of the folder the images are in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we already had this file, so this is almost a carbon copy with some small tweaks for the new code (the other spec file is brand new)
c773813 to
13bf3d3
Compare
13f5edc to
b20621f
Compare
|
@AlasdairSwan @rlucioni bump |
| progress, and unstarted courses instead of serialized representations | ||
| of the courses. | ||
|
|
||
| show_expired_runs_as_remaining (bool): Whether in progress runs whose upgrade |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want this method's output to change across the list and detail views. The user's view of progress should be consistent across those pages. This should just be how the method behaves, not an option.
We're also at risk of introducing debt here. It's not safe to assume that just because the upgrade deadline is past, completion of the course run will no longer count for completion of the course. Each program has a type, and those types define a set of seat types that qualify for completion of the program. Given that we have support for that, we shouldn't be hardcoding assumptions that all programs require verified seats like you're doing here.
At the very least, this should behave like the ProgramProgressMeter's completed_programs property. Read this.
| if show_expired_runs_as_remaining: | ||
| enrolled_run = [run for run in course['course_runs'] if run['is_enrolled']][0] | ||
| enrolled_run_seats = [seat['upgrade_deadline'] for seat in enrolled_run['seats']] | ||
| run_expired = any((x is not None) and (parse(x) < now) for x in enrolled_run_seats) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use intelligible variable names.
| list of dict, each containing information about a user's progress | ||
| towards completing a program. | ||
| """ | ||
| now = datetime.datetime.now(tzlocal()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is passing tzlocal() required? Django should take care of timezone detection for you.
| completed.append(course) | ||
| elif self._is_course_in_progress(course): | ||
| if show_expired_runs_as_remaining: | ||
| enrolled_run = [run for run in course['course_runs'] if run['is_enrolled']][0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only going to work for an "extended_program." In other words, this will only work if you provide extended programs when initializing the class. Expecting people to know that when using this method worries me.
Furthermore, how are these course runs ordered? My sense is that it's not safe to just pick the first one. Consider the case where the user is enrolled in two runs of the same course. This may pick the older enrollment and miss the newer one.
| elif self._is_course_in_progress(course): | ||
| if show_expired_runs_as_remaining: | ||
| enrolled_run = [run for run in course['course_runs'] if run['is_enrolled']][0] | ||
| enrolled_run_seats = [seat['upgrade_deadline'] for seat in enrolled_run['seats']] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable name can be better; this isn't a list of seats.
|
|
||
| enrollSuccess: function() { | ||
| var courseRunKey = this.model.get('course_run_key'); | ||
| window.analytics.track('Program Details Enrollment', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use a specific format for events that we should stick to unless there's a good reason not to. Refer to the events in the edx.org GA account for an example.
Also: I don't think the courseRun property you're including here is going to be surfaced in GA. It may not be worth including.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, there are a bunch in different formats like 'Completed Purchase', but i'm assuming you mean the edx.bi format
i'll go with edx.bi.user.program-details.enrollment
2b0c8cf to
b82acaa
Compare
|
@rlucioni you asked to bump you again |
9456864 to
db249d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The svgs are still using cls-1 as their class, please update to something more descriptive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks fixed, before when i addressed your comment i didn't realize there were multiple instances of these classes in this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MatthewPiatetsky I would still prefer this check to be its own function to make the code easier to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: the code would be easier to read if spread across a few lines, e.g.
var data = $.extend(this.model.toJSON(), {
enrolled: this.context.enrolled || ''
});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we still loading multiple versions of an image for responsive? If not we can remove this (and any other picturefill references).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call, i don't think this is necessary anymore
package.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why these changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accidental commit, removed
AlasdairSwan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
37aea21 to
358ba19
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlasdairSwan you may want to re-use this for the sidebar ring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it easy to do this without hardcoding the names of the program types? We've been over why we try to avoid this before, so I won't elaborate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure about this, asked Alasdair
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's going to be difficult because of the way we are passing in the SVG logos. I suppose we could have a logoCollection, and we could do logoCollection.findWhere({type: type}) so at least we are moving the hard-coded program types into the logo Collection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rlucioni do you think that would be better? we would still have to hardcode the program types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MatthewPiatetsky no, it doesn't really solve the problem, just moves it elsewhere. Maybe it's not worth worrying about here, but I still think we should be aware of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only other solution I can think of would be for the API to return the SVG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlasdairSwan good idea. The discovery API is currently capable of returning a link to an image for each program type inline with the serialized programs, and I could see us returning a link to an SVG served by discovery/S3. Right now there are PNGs logos for the program types stored in the discovery service.
Let's table this for now, but I (and @clintonb) like the idea of using the logos from the discovery service where possible instead of duplicating them in other services.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the complicating issue there is we may have a legitimate need to have different logos in different places (which we currently do). so it wouldn't be as simple as just storing a single logo. The logos would have to be tied somehow to where they would be used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MatthewPiatetsky yeah, that's a good point. Though I don't think it prevents discovery from providing an API that can get you the right image for the right context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if an open source user is trying to run this? The default is just not to show a logo at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that was my assumption. we don't have a default logo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, just making sure I understand the intention. Seems fine to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: missing newline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: please leave this trailing comma, it's good practice. It leaves the next person to touch this dictionary with a cleaner diff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
rlucioni
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remember to squash your commits!
87433d4 to
b7d2737
Compare
ECOM-7388
b7d2737 to
18ac075
Compare
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production on Tuesday, April 11, 2017. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
Pretty much all the files are new. The idea is there are old files and new files with same name and a _2017 suffix. When we're ready to remove the old code, we just delete all the old files, and remove the _2017 from the new files.
Most of the changes are in underscore templates and css.
Most of the views with _2017 are nearly the same as the old ones, just renamed so we can clean up easily.
Demo
email:
mpiatetsky@edx.orgpassword: edx
Tasks
(missing dates, empty course sections)