Aw thanks! Happy to help
and appreciate you soliciting my input, that means a lot!
Genuinely my honest take is that the whole problem can be solved by some very low hanging fruit. Seriously
. Just some markup tweaks that shouldn’t even involve any javascript functionality changes muchless backend API changes. Given the context that this is the “Not-editing” portion of the view that’s in question:
and that this is the “While-editing” portion of the view:
My suggestion for making things more clear is to change the “Not-editing” view to look like this:
Which should simply be changing the text inside the header to better indicate that there are two separate control groups inside this panel … and maybe move the “URLs” line to the bottom of the table since “X & Y” implies that Y comes after X
Then inside the “While-editing” panel just move a few rows around, change a couple of header sizes, and change a little bit of the copy to more clearly indicate what-does-what:
I’m not a front-end person and mocked this up with DOM manipulation, so it needs a little
but bear with me. The parts I’d consider important:
- URL Handling is named as such (“Pretty URLs” is an opaque concept) and explained with just a touch of detail in the description, but left as default ON and called “standard handling” since the default is indeed the standard web-server behavior since the dawn of the internet
- URL Handling is given its own equal-weight header to Asset Optimization and horizontal lines help separate it from the group of actual asset optimizations (controlled by the “Disable Asset Opt.” checkbox) — could even indent the actual asset optimization options a little too
- “Disable Asset Optimizations” checkbox description clarifies that it’s only for the CSS/JS/Img controls below, just doubly clarifying that that checkbox is separate and unrelated to the URL Handling control
All of this while retaining that all inputs are still inside the same semantic <form> and the JS handler code for that form wouldn’t need to change at all, but the UI way better reflects that the URL handling is fully separate from the “Disable Asset Opt” control.
Hope that helps or inspires.
–
Jon
HTML Code from DOM in Details Block
<form class="floating-labels">
<div>
<div class="table-body">
<dl>
<dt>CSS</dt>
<dd>
<div class=""><label><input data-testid="checkbox"
class="tw-w-[20px] tw-h-[20px] tw-p-0 tw-border tw-mr-1 tw-mt-[2px] tw-mb-0 tw-ml-[2px] tw-box-border tw-absolute tw-top-auto before:tw-content-empty before:tw-absolute before:tw-origin-top-left focus:tw-shadow-checkbox tw-cursor-pointer hover:tw-border-teal tw-border-gray focus:tw-border-gray focus:hover:tw-border-teal focus:hover:checked:tw-border-teal-darkest checked:tw-bg-teal-darker checked:tw-border-teal-darker focus:checked:tw-border-teal-darker hover:checked:tw-bg-teal-darkest hover:checked:tw-border-teal-darkest dark:hover:checked:tw-bg-teal dark:hover:checked:tw-border-teal tw-bg-transparent before:tw-h-[11px] before:tw-inline-block before:tw-w-[3px] before:tw-rounded-sm before:tw-left-[7px] before:tw-top-[13px] before:tw-transform before:tw-rotate-[-135deg] after:tw-w-[3px] after:tw-h-[7px] after:tw-rounded-sm after:tw-content-empty after:tw-absolute after:tw-top-[7px] after:tw-transform after:tw--rotate-45 after:tw-left-[3px] dark:after:tw-bg-transparent checked:before:tw-bg-gray-lightest checked:after:tw-bg-gray-lightest dark:checked:after:tw-bg-gray-darkest dark:checked:before:tw-bg-gray-darkest dark:checked:tw-bg-teal-lighter dark:checked:tw-border-teal-lighter"
type="checkbox" value=""><span
class="tw-pl-[32px] tw-block tw-cursor-pointer tw-text-base tw-text-gray-darkest tw-font-semibold dark:tw-text-gray-lightest">Bundle
CSS</span>
<div
class="tw-text-muted tw-text-sm tw-ml-[32px] tw-mt-0 tw-text-gray-darker tw-font-regular dark:tw-text-gray-lighter">
Concatenate consecutive CSS files together to reduce HTTP requests.</div>
</label></div>
<div class="tw-mt-2 md:tw-mt-2"><label><input data-testid="checkbox"
class="tw-w-[20px] tw-h-[20px] tw-p-0 tw-border tw-mr-1 tw-mt-[2px] tw-mb-0 tw-ml-[2px] tw-box-border tw-absolute tw-top-auto before:tw-content-empty before:tw-absolute before:tw-origin-top-left focus:tw-shadow-checkbox tw-cursor-pointer hover:tw-border-teal tw-border-gray focus:tw-border-gray focus:hover:tw-border-teal focus:hover:checked:tw-border-teal-darkest checked:tw-bg-teal-darker checked:tw-border-teal-darker focus:checked:tw-border-teal-darker hover:checked:tw-bg-teal-darkest hover:checked:tw-border-teal-darkest dark:hover:checked:tw-bg-teal dark:hover:checked:tw-border-teal tw-bg-transparent before:tw-h-[11px] before:tw-inline-block before:tw-w-[3px] before:tw-rounded-sm before:tw-left-[7px] before:tw-top-[13px] before:tw-transform before:tw-rotate-[-135deg] after:tw-w-[3px] after:tw-h-[7px] after:tw-rounded-sm after:tw-content-empty after:tw-absolute after:tw-top-[7px] after:tw-transform after:tw--rotate-45 after:tw-left-[3px] dark:after:tw-bg-transparent checked:before:tw-bg-gray-lightest checked:after:tw-bg-gray-lightest dark:checked:after:tw-bg-gray-darkest dark:checked:before:tw-bg-gray-darkest dark:checked:tw-bg-teal-lighter dark:checked:tw-border-teal-lighter"
type="checkbox" value=""><span
class="tw-pl-[32px] tw-block tw-cursor-pointer tw-text-base tw-text-gray-darkest tw-font-semibold dark:tw-text-gray-lightest">Minify
CSS</span>
<div
class="tw-text-muted tw-text-sm tw-ml-[32px] tw-mt-0 tw-text-gray-darker tw-font-regular dark:tw-text-gray-lighter">
Run CSS through a minifier to reduce file size.</div>
</label></div>
</dd>
</dl>
<dl>
<dt>JS</dt>
<dd>
<div class=""><label><input data-testid="checkbox"
class="tw-w-[20px] tw-h-[20px] tw-p-0 tw-border tw-mr-1 tw-mt-[2px] tw-mb-0 tw-ml-[2px] tw-box-border tw-absolute tw-top-auto before:tw-content-empty before:tw-absolute before:tw-origin-top-left focus:tw-shadow-checkbox tw-cursor-pointer hover:tw-border-teal tw-border-gray focus:tw-border-gray focus:hover:tw-border-teal focus:hover:checked:tw-border-teal-darkest checked:tw-bg-teal-darker checked:tw-border-teal-darker focus:checked:tw-border-teal-darker hover:checked:tw-bg-teal-darkest hover:checked:tw-border-teal-darkest dark:hover:checked:tw-bg-teal dark:hover:checked:tw-border-teal tw-bg-transparent before:tw-h-[11px] before:tw-inline-block before:tw-w-[3px] before:tw-rounded-sm before:tw-left-[7px] before:tw-top-[13px] before:tw-transform before:tw-rotate-[-135deg] after:tw-w-[3px] after:tw-h-[7px] after:tw-rounded-sm after:tw-content-empty after:tw-absolute after:tw-top-[7px] after:tw-transform after:tw--rotate-45 after:tw-left-[3px] dark:after:tw-bg-transparent checked:before:tw-bg-gray-lightest checked:after:tw-bg-gray-lightest dark:checked:after:tw-bg-gray-darkest dark:checked:before:tw-bg-gray-darkest dark:checked:tw-bg-teal-lighter dark:checked:tw-border-teal-lighter"
type="checkbox" value=""><span
class="tw-pl-[32px] tw-block tw-cursor-pointer tw-text-base tw-text-gray-darkest tw-font-semibold dark:tw-text-gray-lightest">Bundle
JS</span>
<div
class="tw-text-muted tw-text-sm tw-ml-[32px] tw-mt-0 tw-text-gray-darker tw-font-regular dark:tw-text-gray-lighter">
Concatenate consecutive JS files together to reduce HTTP requests.</div>
</label></div>
<div class="tw-mt-2 md:tw-mt-2"><label><input data-testid="checkbox"
class="tw-w-[20px] tw-h-[20px] tw-p-0 tw-border tw-mr-1 tw-mt-[2px] tw-mb-0 tw-ml-[2px] tw-box-border tw-absolute tw-top-auto before:tw-content-empty before:tw-absolute before:tw-origin-top-left focus:tw-shadow-checkbox tw-cursor-pointer hover:tw-border-teal tw-border-gray focus:tw-border-gray focus:hover:tw-border-teal focus:hover:checked:tw-border-teal-darkest checked:tw-bg-teal-darker checked:tw-border-teal-darker focus:checked:tw-border-teal-darker hover:checked:tw-bg-teal-darkest hover:checked:tw-border-teal-darkest dark:hover:checked:tw-bg-teal dark:hover:checked:tw-border-teal tw-bg-transparent before:tw-h-[11px] before:tw-inline-block before:tw-w-[3px] before:tw-rounded-sm before:tw-left-[7px] before:tw-top-[13px] before:tw-transform before:tw-rotate-[-135deg] after:tw-w-[3px] after:tw-h-[7px] after:tw-rounded-sm after:tw-content-empty after:tw-absolute after:tw-top-[7px] after:tw-transform after:tw--rotate-45 after:tw-left-[3px] dark:after:tw-bg-transparent checked:before:tw-bg-gray-lightest checked:after:tw-bg-gray-lightest dark:checked:after:tw-bg-gray-darkest dark:checked:before:tw-bg-gray-darkest dark:checked:tw-bg-teal-lighter dark:checked:tw-border-teal-lighter"
type="checkbox" value=""><span
class="tw-pl-[32px] tw-block tw-cursor-pointer tw-text-base tw-text-gray-darkest tw-font-semibold dark:tw-text-gray-lightest">Minify
JS</span>
<div
class="tw-text-muted tw-text-sm tw-ml-[32px] tw-mt-0 tw-text-gray-darker tw-font-regular dark:tw-text-gray-lighter">
Run JS through a minifier to reduce file size.</div>
</label></div>
</dd>
</dl>
<dl style="border-bottom: gray;">
<dt>Images</dt>
<dd>
<div class=""><label><input data-testid="checkbox"
class="tw-w-[20px] tw-h-[20px] tw-p-0 tw-border tw-mr-1 tw-mt-[2px] tw-mb-0 tw-ml-[2px] tw-box-border tw-absolute tw-top-auto before:tw-content-empty before:tw-absolute before:tw-origin-top-left focus:tw-shadow-checkbox tw-cursor-pointer hover:tw-border-teal tw-border-gray focus:tw-border-gray focus:hover:tw-border-teal focus:hover:checked:tw-border-teal-darkest checked:tw-bg-teal-darker checked:tw-border-teal-darker focus:checked:tw-border-teal-darker hover:checked:tw-bg-teal-darkest hover:checked:tw-border-teal-darkest dark:hover:checked:tw-bg-teal dark:hover:checked:tw-border-teal tw-bg-transparent before:tw-h-[11px] before:tw-inline-block before:tw-w-[3px] before:tw-rounded-sm before:tw-left-[7px] before:tw-top-[13px] before:tw-transform before:tw-rotate-[-135deg] after:tw-w-[3px] after:tw-h-[7px] after:tw-rounded-sm after:tw-content-empty after:tw-absolute after:tw-top-[7px] after:tw-transform after:tw--rotate-45 after:tw-left-[3px] dark:after:tw-bg-transparent checked:before:tw-bg-gray-lightest checked:after:tw-bg-gray-lightest dark:checked:after:tw-bg-gray-darkest dark:checked:before:tw-bg-gray-darkest dark:checked:tw-bg-teal-lighter dark:checked:tw-border-teal-lighter"
type="checkbox" value=""><span
class="tw-pl-[32px] tw-block tw-cursor-pointer tw-text-base tw-text-gray-darkest tw-font-semibold dark:tw-text-gray-lightest">Compress
Images</span>
<div
class="tw-text-muted tw-text-sm tw-ml-[32px] tw-mt-0 tw-text-gray-darker tw-font-regular dark:tw-text-gray-lighter">
Run all images through lossless image compression.</div>
</label></div>
</dd>
</dl>
</div>
<div class="table-header"></div>
<div class="table-header">
<div class="table-body">
<dl>
<dt
class="tw-flex tw-font-semibold tw-gap-1 tw-justify-start tw-leading-tight tw-text-xl after:tw-content-none md:tw-justify-between">
URL Handling</dt>
<dd>
<div class=""><label><input data-testid="checkbox"
class="tw-w-[20px] tw-h-[20px] tw-p-0 tw-border tw-mr-1 tw-mt-[2px] tw-mb-0 tw-ml-[2px] tw-box-border tw-absolute tw-top-auto before:tw-content-empty before:tw-absolute before:tw-origin-top-left focus:tw-shadow-checkbox tw-cursor-pointer hover:tw-border-teal tw-border-gray focus:tw-border-gray focus:hover:tw-border-teal focus:hover:checked:tw-border-teal-darkest checked:tw-bg-teal-darker checked:tw-border-teal-darker focus:checked:tw-border-teal-darker hover:checked:tw-bg-teal-darkest hover:checked:tw-border-teal-darkest dark:hover:checked:tw-bg-teal dark:hover:checked:tw-border-teal tw-bg-transparent before:tw-h-[11px] before:tw-inline-block before:tw-w-[3px] before:tw-rounded-sm before:tw-left-[7px] before:tw-top-[13px] before:tw-transform before:tw-rotate-[-135deg] after:tw-w-[3px] after:tw-h-[7px] after:tw-rounded-sm after:tw-content-empty after:tw-absolute after:tw-top-[7px] after:tw-transform after:tw--rotate-45 after:tw-left-[3px] dark:after:tw-bg-transparent checked:before:tw-bg-gray-lightest checked:after:tw-bg-gray-lightest dark:checked:after:tw-bg-gray-darkest dark:checked:before:tw-bg-gray-darkest dark:checked:tw-bg-teal-lighter dark:checked:tw-border-teal-lighter"
type="checkbox" value=""><span
class="tw-pl-[32px] tw-block tw-cursor-pointer tw-text-base tw-text-gray-darkest tw-font-semibold dark:tw-text-gray-lightest">Standard
File/URL Behavior</span>
<div
class="tw-text-muted tw-text-sm tw-ml-[32px] tw-mt-0 tw-text-gray-darker tw-font-regular dark:tw-text-gray-lighter">
Serves named html files without trailing slashes and named directories (with index.html files) with
trailing slashes</div>
</label></div>
</dd>
</dl>
</div>
</div>
</div>
<div
class="tw-flex tw-flex-wrap tw-actions-flex-gap-2 tw-items-center tw-justify-end md:tw-justify-start tw-w-full md:tw-w-auto tw-mt-4 md:tw-mt-4">
<button class="btn btn-default btn-primary btn-primary--standard" type="submit">Save</button><button
class="btn btn-default btn-secondary btn-secondary--standard" type="button">Cancel</button></div>
</form>



