@pamelafox
press space bar for the next slide
Modern App: Bootstrap 2.1
Legacy Codebase: Bootstrap 1, Bootstrap 2.0
⟱
...so why was it?
⟱
207 *.template.php files
351 *controller.php files
143 *.js files
25 *.css files
HTML, CSS, PHP, PHPed JS
grep "alert" * -R
80
grep "label" * -R
329
grep "success" * -R
364
grep "info" * -R
1153
aka what I'll do differently next time.
⟱
grep 'tbs-alert' * -R
:%s/tbs-alert/tbs-alert2 * -R
Issue 1287: Prefix Bootstrap classes
Adding Prefixes to Bootstrap CSS classes
<button class="coursera-submit-button">Sign Up</button>
.coursera-submit-button
@extends .btn
@extends .btn-info
&:hover
@extends .btn:hover
@extends .btn-info:hover
var defaults = {'prefix.css': ''}
var $toolbar = $(toolbarTemplate({prefix:options['prefix.css']}))
toolbar.js.jade:div(class=prefix+"-toolbar", role="toolbar", title="HTML editing toolbar")
coursera.editor.js:new WysiEditor({'prefix.css': 'coursera-wysihtml5'});
coursera.editor.styl: .coursera-wysihtml5
padding 0
Dynamic Selectors
<button class="coursera-submit-button">Sign Up</button>
<script>
$('.coursera-submit-button').on('click', signUp);
</script>
vs.
<button class="coursera-submit-button coursera-submit-js">Sign Up</button>
view.$('.coursera-submit-js').on('click', signUp);
vs.
<button class="coursera-submit-button" data-js="signup">Sign Up</button>
view.$('form [data-js=signup]').on('click', signUp);
mocha/chai/jsdom:
view.$('.course-forum-thread-showmore').click();
chai.expect(view.$('.course-forum-your-threads-listing tr:visible').size())
.to.be.equal(25);
chai.expect(view.$('.course-forum-thread-showmore').is(':visible'))
.to.be.equal(false);
def expand_all_lectures(self):
sections = self.get_els('.course-item-list-header')
for section in sections:
if 'contracted' in section.get_attribute('class'):
section.click()
self.wait_for(lambda: 'contracted' not in section.get_attribute('class'))
from needle.cases import NeedleTestCase class BBCNewsTest(NeedleTestCase): def test_masthead(self): self.driver.get('http://www.bbc.co.uk/news/') self.assertScreenshot('#blq-mast', 'bbc-masthead')
Also: Perceptual Diffs, PhantomCSS, CasperJS, SlimerJS
Manual Flow: Firefox screenshot + Kaleidoscope