Skip to content

Instantly share code, notes, and snippets.

View pascallaliberte's full-sized avatar

Pascal Laliberte pascallaliberte

View GitHub Profile
@pascallaliberte
pascallaliberte / 2020-12-16-using-stimulus-with-shopify-polaris.md
Last active December 16, 2020 22:32
Article for Boring Rails blog: "Using Stimulus with Shopify Polaris instead of React"
layout title
post
Using Stimulus with Shopify Polaris instead of React

This a guest post from Pascal Laliberté, author of Modest JS Works, a short ebook for those who want to write modest JavaScript, and then focus on all the other stuff that matters in building an app. {: .guest-intro }

Keybase proof

I hereby claim:

  • I am pascallaliberte on github.
  • I am pascallaliberte (https://keybase.io/pascallaliberte) on keybase.
  • I have a public key ASBZhZorHKnaeY3GwdG8EoRZS3uUtUAPZRYYoHTDh-W79go

To claim this, I am signing this object:

@pascallaliberte
pascallaliberte / fluidsurveys-save-for-later-top.css
Last active December 31, 2015 07:09
FluidSurveys: Affix the auxiliary buttons to the top of the screen's viewport. This will allow you to have the "Save and continue later" button always visible for your long survey.
/* Save and Continue Later visible at the top */
.survey-buttons .auxiliary {
background-color: rgba(51, 51, 51, .95);
padding: 1em;
color: white;
position: fixed;
top: 0;
left: 0;
width: 100%;
@pascallaliberte
pascallaliberte / fluidsurveys-save-prompt.js
Last active December 31, 2015 07:09
FluidSurveys: Prompting the user to "Save and continue later" before closing the window.
// 1. Add a question of type "javascript" to your survey (ultra package or higher required)
// 2. Paste this code in and edit the message.
$(function(){
//place script here
$(window).bind('beforeunload', function(){
return 'Just to make sure, did you click "Save and continue later"? We\'re checking because we wouldn\'t want you to lose what you entered.';
});