It’s as simple as it sounds. As a developer, our job is to make content editors have the ability to edit as easily as possible.
Picture this: A client makes a 2-column layout with the DnD editor. Text on the left, picture on the right.
They ask: “On mobile, I want it to stack so the picture is up top and the text is underneath.”
How many times have you heard that?
OK… so what’s Hubspot’s suggestion?
If this was Wordpress, I could easily give the section an identifier, whether a unique ID or css class, and then target it with CSS to reverse order at a certain breakpoint. That would work great because there are going to be multiple instances where the content editor is going to want that. Heck, I could even give the core block in Wordpress a custom style option where the editor could tick a checkbox and it would do it every time.
In Hubspot, there’s no such option. On the mobile breakpoint, I can adjust margins, padding, visibility… these are all great options that actually surprass Wordpress’ ability.
But how do you suggest I accomplish the very, very, very common task of ordering elements on mobile?
Because when Hubspot outputs DnD elements, the IDs change. So I can’t target them with CSS.
And sure, I could say:
.row-fluid-wrapper.row-depth-1.row-number-32.dnd-section > .row-fluid {
flex-flow:column-reverse;
}
but then I have to say to my content editor: “Don’t ever change the content, or content order, because it will stop working!”
So what? I write Javascript to target the content, traverse up the DOM to the parent and then flip the order after I measure the screen width? No thanks. And it still doesn’t allow the content editor to freely update content without risk.
Maybe this? I provide multiple of the same elements in different orders, and hide/show them based on the breakpoint? Does that sound good for SEO and accessibility?
As it stands, there is no ideal solution. It’s not available in the editor, there’s no failsafe longterm way to provide a fix for an editor to get their desired results. And that’s what content editors want.
Provide something that works.