Skip to content

Instantly share code, notes, and snippets.

View dimaip's full-sized avatar
Making @neos UI great

Dmitri Pisarev dimaip

Making @neos UI great
View GitHub Profile
dimaip / machine.js
Created May 13, 2021 16:25
Generated by XState Viz:
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
dimaip / SlateReactPresentation.tsx
Created February 16, 2021 07:52
Keystone SlateJS v0.47 sample rendering
View SlateReactPresentation.tsx
import React, { useContext } from 'react'
interface Mark {
type: string
export interface ElementNode {
type: string
nodes: Array<ElementNode | LeafNode>
data: {
[item: string]: string
View stripe-country-code.js
onChange={ev => {
if (ev.complete) {
const card = elements?.getElement(CardElement)
type: 'card',
.then(result => console.log(result.paymentMethod?

Dear Neos community,

during the last code sprint in Vienna I've spent a week coding support for selecting multiple nodes in the document and content trees and performing batch operations on all of them: copying/moving/deleting/hiding all of the selected nodes at once. I am sure editors are going to appreciate this feature very much :-)

Now the feature is already working, but I still need the time to polish the technical implementation, writing tests for it, improving the visual styling etc. Unfortunately, I will not be able to finish it in a spare time mode in the foreseeable future, so I want to ask you to support me by funding this feature. I need about 10 hours of work (at 55€/h rate) for polishing it.

If I get another 20 hours of sponsoring, I would be able to implement batch editing of any property in the inspector that is common to all of the selected nodes. E.g. imagine selecting multiple nodes in the tree and then being able to set say a starti

dimaip /
Last active January 17, 2018 16:56
Elevator pitch for a stateless Github + Docker Swarm based PaaS

Here's a quick idea for a stateless PaaS on top of Github and docker swarm.

  1. You mark Github repos that you want to deploy to your Docker swarm with a certain tag, say "my-server".
  2. Each repo has a docker-compose.yml file defining the stack needed to run it.
  3. You have a daemon that periodically queries Github API for repos with given tag name (and from a certain user, for security reason). For every found repo it would do docker stack deploy RepoName --compose-file "...". Stacks would be deployed according to given service's deploy policy, utilizing its healthchecks etc.

So if you need to add a new repo to the swarm, you just mark it with a tag and wait a few min. If you need to update a service, you just edit its docker-compose.yml file and wait a few min. Secrets would be managed via docker secrets.

Advantages over plain swarm cluster?

dimaip / Recursion.fusion
Last active January 18, 2018 10:30
Recursive rendering of menus with Fusion
View Recursion.fusion
prototype(Flowpack.FusionBP:RecursiveMenu) < prototype(Neos.Fusion:Array) {
@process.tmpl = ${'<li>' + value + '</li>'}
title = ${ || '<em>' + + '</em>'}
nextLevel = Neos.Fusion:Collection {
@process.tmpl = ${'<ul>' + value + '</ul>'}
@process.tmpl.@if.notEmpty = ${q(node).children().count() > 0}
collection = ${q(node).children().get()}
itemName = 'node'
itemRenderer = Flowpack.FusionBP:RecursiveMenu

Dear community,

Neos CMS team is currently in the middle of UI rewrite on top of React. This project will have immediate benefits like improved performance, correctly working media-queries and higher robustness of the UI due to the use of iframe for site content. But main aim for it is to support ambitious plans of our project (such as structured editing of content) that would require a modern foundation.

Currently we have reached an alpha phase, where almost all basic functionality is in place, but everything needs A LOT of polish. And that's where I want to ask for your support.

I have been a part of this project since its early prototype days, and was able to spend quite some time working on it, including joining 3 code sprints fully focusing on it. But right now I can not afford to work on my spare time as much as the project currently requires it. So **I'm looking for sponsors that would allow me to relocate some of my freelancing time

dimaip / ImageUri.ts2
Created September 28, 2016 14:39
Handy way to show dummy image if no image is selected
View ImageUri.ts2
prototype(Sfi.Site:ImageUri) < prototype(TYPO3.TypoScript:Case) {
image {
condition = ${asset}
renderer = ImageUri {
asset = ${asset}
width = ${width}
height = ${height}
maximumWidth = ${maximumWidth}
maximumHeight = ${maximumHeight}
allowCropping = ${allowCropping}
dimaip / NodeType.html
Created April 8, 2016 15:22
Imagine you have a nodetype named `Your:NodeType` and a node of that nodetype, with property1 set to `123456`.
View NodeType.html
Quess what's in here: {property1}
dimaip / gist:d466dfb93c8914a83abd1136ee745bf6
Last active March 30, 2016 12:02
Declarativish TypoScript2
View gist:d466dfb93c8914a83abd1136ee745bf6
# Data in content repository would look like this:
nodeType: "My:Page",
properties: {
title: "hello world title"
children: [
nodeType: "My:Text"
properties: {