Skip to content

Comment on A minimal, UI-focused programming language for web designers

Comments

This tool would be better named "ClassAdder", the extent of what it does is "add, remove, or toggle classes." The headings on the different examples on the homepage ("Accordion", "Tabs", "Animated Switch", "Overlay" etc.) suggests that the tool itself does all these things, when in fact the tool itself just handles adding/removing classes, and the fancy transitions are from the CSS (not bundled with the tool). This feels a bit misleading.

Incidentally I did not know that element.classList had these methods (add/remove/toggle https://developer.mozilla.org/en-US/docs/Web/API/Element.cla... ) so it was worthwhile reading the source to learn this! https://github.com/bendc/uilang/blob/master/development/uila...

-1000 for no comments in the source code. No,

   function InstructionParsing(instruction) {
     var separator = instruction.charAt(0)
     var instructionSplit = instruction.split(separator)
 
     this.clickSelector = instructionSplit[1]
     this.classBehavior = instructionSplit[2].trim().split(" ")[0]
     this.classValue = instructionSplit[3]
     this.targetSelector = instructionSplit[5]
   }
is not "self-documenting." Tool is not useful but it is a cool study in writing a limited DSL. Kudos to author for this.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.