...why a dialog is shown is somewhat fucked up. It often happens like this: @javascript Scenario: First scenario When I am on a page And I trigger an AJAX request...
...that shows an alert in case of an error @javascript Scenario: Second scenario When I am on another page If your PC is fast enough, the "When I am on...
...You can use and adapt Bootstrap's components, and know which of them need JavaScript. You can customize Bootstrap's look through its Sass variables before it is loaded.
...tabs, Pagination — don't memorize them, get a feel for how they're integrated 📄 JavaScript — Bootstrap is mostly CSS, but dropdowns, modals and a few others need its JavaScript
...redirect with GET as expected. This is also what Unpoly or the Rails unobtrusive Javascript adapter does when you annotate a link with data-method="PATCH...
An alert alternative for jQuery that looks good. Apprise is a very simple, fast, attractive, and unobtrusive way to communicate...
...against this; ViewComponent is the second, for components that carry logic, helpers, CSS and JavaScript of their own. This card teaches you to give your views a small, readable vocabulary...
...details behind an explicit interface and co-locates the template with its helpers, its JavaScript and its CSS. You can decide when a piece of view code deserves extraction at...
We didn’t want to leave front-end developers in the dark when their Javascript throws errors, so we’ve added a Hoptoad notifier for Javascript...
To delay your entire Jasmine test suite until the DOM is ready, add the following: beforeAll(function(done) { $(done); });
...a package functionality from window e.g. $(...).datepicker() from your dev console or any other javascript within the application. Background By default yarn will create a folder node_modules that includes...
...to window, to have access to jQuery from our dev console or any other javascript within the application. app/webpack/packs/main.js window.$ = jQuery window.jQuery = jQuery Now this will not allow us to...
...assets that we don't need allow_any_instance_of(ActionView::Base).to receive(:javascript_include_tag).and_return('script') allow_any_instance_of(ActionView::Base).to receive(:stylesheet_link...
...will have two CSRF tokens: A in the . This is required so client-side JavaScripts may make POST, PATCH, DELETE requests. An within each form. Since Rails 5 this token...
...test runner supports mocking a module's dependencies. This has some drawbacks for frontend JavaScript that targets the browser: Jest only runs in Node.js. This means your specs can no...
zClip is a lightweight jQuery "copy to clipboard" plugin built using the popular Zero Clipboard library. This plugin uses an...
Compresses JavaScript...
WMD is a simple, lightweight HTML editor for blog comments, forum posts, and basic content management. You can add WMD...
Below is a strict, but still workable Content Security Policy for your Ruby on Rails project. Use this CSP if...
...app, browser: :chrome, options: options) end Before do Capybara.current_driver = :rack_test end Before('@javascript') do Capybara.current_driver = :selenium
...is also allowed on elements like a ). You can easily enhance that with some JavaScript which looks at navigator.language and hides all messages but one. Unpoly or other libraries that...
...example is storing a transition duration as CSS custom property to read it from Javascript. By converting the value like this, you can ensure your Javascript will always get milliseconds...
...contributions to the gem dist/ usually contains files rendered ready for "distribution", e.g. minified Javascript files src/ usually contains the raw "source" files, e.g. split up into many files, before...
...want to track interactions that don't have a corresponding URL + request (e.g. a Javascript button or a PDF download) Luckily the Analytics code snippet allows you to freely choose...
(@foo or @bar) So you need to replace a hook like this: AfterStep('~@javascript') do ... end With this: AfterStep('not @javascript') do ... end Also grep your entire project for...
...parallel_tests can be run CI and also supports splitting by runtimes Changes in JavaScript and CSS lead to insuficient mapping to features, even though template support has been enabled...
...to Coverage. This gives a benefit because changes in JavaScript often correlate with changes in HTML. This may partly also be influenced by the fact that features are harder to...
...find and evaluate gems for a problem, e.g. on rubygems.org or Ruby Toolbox. Note JavaScript has the same problems — dependencies, lock files, runtime versions — and very similar solutions (yarn, nvm...
...or mise). We explore them in a later card, once you have met JavaScript. Resources Read what's new to you, skim what's familiar, skip what you already master...
DirectUpload allows you to upload files to your file storage without having to wait for the form to submit. It...