Skip to content

Instantly share code, notes, and snippets.

View thibaudcolas's full-sized avatar
😀

Thibaud Colas thibaudcolas

😀
View GitHub Profile
@thibaudcolas
thibaudcolas / index.html
Last active March 22, 2023 10:23
Comparing 3 implementations of Wagtail’s documentation search
<!DOCTYPE html> <html lang=en><meta charset=utf-8>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css">
<link rel="stylesheet" href="https://docs.wagtail.org/en/stable/_static/css/docsearch.overrides.css">
<meta name=viewport content="width=device-width, initial-scale=1.0">
<title>Welcome to Wagtail’s documentation — Wagtail Documentation 4.2.1 documentation</title>
<style>:root{--blue:#007bff;--indigo:#2e1f5e;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#007d7e;--cyan:#17a2b8;--white:#fff;--gray:#6c6c6c;--gray-dark:#313131;--primary:#2e1f5e;--secondary:#6c6c6c;--success:#a456c9;--info:#007d7e;--warning:#2f128d;--danger:#a72925;--light:#f2f2f2;--dark:#313131;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:"-apple-system","BlinkMacSystemFont","Segoe UI","system-ui","Roboto","Helvetica Neue","Arial",sans-serif,"Apple Color
@thibaudcolas
thibaudcolas / README.md
Created March 14, 2023 15:32
What is Wagtail and how we use it at Torchbox | Academy day March 2023

Thank you all for joining! Here are the different resources we looked at in today’s session:

@thibaudcolas
thibaudcolas / README.md
Created February 1, 2023 13:49
Sage’s "Page locking spike" from Wagtail 4.2

Auto locking mechanism UX details

Auto lock vs manual lock

Based on the discussion in wagtail/wagtail#7636, we would like to have an automatic page locking mechanism to support autosave in the future. This automatic locking will be separate from (thus can co-exist with) the existing page locking feature, as it will have more advanced logic tightly coupled to the client-side interaction.

For clarity, we'll refer to the two locking mechanisms as follows:

  • "auto lock" - the new automatic locking mechanism that prevents two tabs from editing the same page at the same time
  • "manual lock" - the existing locking mechanism that allows a user to prevent other users from editing the page
@thibaudcolas
thibaudcolas / README.md
Created January 5, 2023 10:53
Wagtail 4.1 corrected color conversions

To run this:

./node_modules/.bin/sass colors.scss
@thibaudcolas
thibaudcolas / CaptionedImageModalWorkflowSource.js
Last active October 27, 2022 14:04
Custom image entity in Draftail
const basePlugins = window.draftail.registerPlugin({ type: 'potato '});
const imagePlugin = basePlugins.IMAGE;
const ImageModalWorkflowSource = imagePlugin.source; // ImageModalWorkflowSource
const imagePluginBlock = imagePlugin.block; // ImageBlock
class CaptionedImageModalWorkflowSource extends ImageModalWorkflowSource {
getChooserConfig(entity) {
let url;
let urlParams;
<table>
<caption>Teddy bear collectors:</caption>
<tr>
<th scope="row">Last Name</th>
<th scope="row">First Name</th>
<th scope="row">City</th>
</tr>
<tr>
<td>Phoenix</td>
<td>Imari</td>
@thibaudcolas
thibaudcolas / README.md
Last active September 2, 2022 12:20
Community projects analysis: Wagtail 4.0 UI customisations
@thibaudcolas
thibaudcolas / README.md
Last active July 4, 2022 16:04
Windows Contrast themes / High contrast mode in media queries

Windows Contrast themes / High contrast mode in media queries

Here are all relevant media queries to consider when supporting Contrast Themes / Windows High Contrast Mode.

Results

MS Edge 101, Windows 10 Pro 21H2

  • No High Contrast:
    • (forced-colors: none), (prefers-color-scheme: light), (prefers-contrast: no-preference)