Skip to main content

101 posts tagged with "Architecture"

Framework-wide structure and conventions

View All Tags

Should a pasted CodePen become native shortcodes, and where should that live?

· 5 min read
Jon-Michael Lastimosa
Senior Web Developer

The question: Can we let a user paste a pen (separate HTML, CSS, and optional JS panels) and have it come out as proper UnysonPlus shortcodes — a real special_heading / icon_box / button section — instead of just dumping the markup into a Code Block shortcode? And if so, where does the feature live, and what do we do with pens whose whole point is runtime JS?

How should Unyson+ elements appear in Gutenberg — ported, or delegated?

· 5 min read
Jon-Michael Lastimosa
Senior Web Developer

The question: Some people want the block editor but still want the Unyson+ options framework. Getting elements in front of them could mean porting them to native blocks — block.json, React edit, attributes per option — or exposing the elements that already exist through a bridge. Which, and what does the bridge actually have to do?

Was it worth replacing WordPress's media frame to get Backbone out of the core?

· 5 min read
Jon-Michael Lastimosa
Senior Web Developer

The question: fw.js called Backbone.Model.extend and Backbone.View.extend in exactly two places. Replacing them looked like an afternoon. Then the modal underneath turned out to be wp.media.view.MediaFrame — WordPress's media frame, which is Backbone, and which Backbone still loads for anyway. Is removing it worth the risk?

Is the extension architecture itself legacy — should elements be rewritten block-native?

· 6 min read
Jon-Michael Lastimosa
Senior Web Developer

The question: The most common criticism aimed at anything descended from Unyson is that the extension layout itself is obsolete — a config.php / options.php / views/ / static/ folder, options declared as PHP arrays, output rendered through a shortcode. Modern WordPress, the argument goes, means block.json, React InspectorControls, PSR-4 autoloading and a webpack build. Is the UnysonPlus extension architecture legacy debt that has to be rewritten?

When the deterministic converter reads a source built in Tailwind, why not just copy the source's Tailwind classes into each shortcode's Advanced → Custom CSS Class field and be done — instead of mapping every element to native options?

· 5 min read
Jon-Michael Lastimosa
Senior Web Developer

The question. A Tailwind-built source (a jiro.build finance template) converted badly on localhost. The obvious shortcut surfaced: the source markup is full of Tailwind utilities that already encode the design (grid grid-cols-2 gap-16 items-center, min-h-screen, absolute inset-0, text-4xl font-bold) — so why does the converter bother mapping each element to native shortcode options at all? Why not paste the source element's class string straight into the shortcode's Advanced → Custom CSS Class (css_class) field and let those classes do the work?