[horde] Javascript / Frontend refactoring: Tester wanted

Jean Charles Delépine delepine at u-picardie.fr
Mon Apr 20 13:57:31 UTC 2026


Hi,

Following the ongoing PrototypeJS removal work, I'd like to propose a  
complementary improvement that could be done in the same pass.

Currently Horde's layout (sidebar width, page offset, preview pane)  
relies on JavaScript injecting inline styles at runtime  
(element.style.left = x + 'px', element.style.width = x + 'px'). This  
works but prevents any CSS-only layout modernization — inline styles  
cannot be overridden even with !important.

The proposal would be to replace those inline style assignments with  
CSS custom properties:

// Instead of
document.getElementById('horde-page').style.left = sidebarWidth + 'px';

// Use
document.documentElement.style.setProperty('--horde-sidebar-width',  
sidebarWidth + 'px');

#horde-sidebar { width: var(--horde-sidebar-width, 280px); }

#horde-page    { left: var(--horde-sidebar-width, 280px); }

Benefits:

Themes can override layout without JS
Opens the door to CSS Grid/Flexbox layouts per theme
No behavior change for existing installations — custom properties fall  
back gracefully
Very low risk change, purely mechanical substitution
We are working on the UPJV university theme for Horde 6 and this would  
unblock proper layout customization. Happy to contribute a patch if  
the approach is acceptable.

Thanks for the great work on the JS modernization!

Sincerly,
     Jean Charles Delépine

Quoting Ralf Lang <ralf.lang at gmail.com>:

> Hello,
>
> based on your feedback I did upgrades both in the core javascript
> foundation and in Kronolith javascript.
> We now run a patched prototypejs with a little bridge which allows us to
> de-prototypejs all event listeners but not event emitters (they still need
> to say "fire" until the last consumers are ported to native events)
> The kronolith branch of this activity has been incorporated into the latest
> code already.
>
> For IMP I need to do some steps back to make it work correctly with the
> changes. So this one stays open for now.
>
> The ultimate goal is to drop prototypejs and migrate to a framework-less
> approach in the browser. PrototypeJS mostly solves problems we no longer
> have and haven't had for quite some years.
>
> Thank you for providing this testing!
>
> On Sat, Apr 18, 2026 at 6:08 AM Ralf Lang <ralf.lang at gmail.com> wrote:
>
>> Thank you Nels and R.J.,
>>
>> this is very valuable feedback. So we do have breakage which needs a fix &
>> retest cycle and I should probably come up with some unit test tooling for
>> our javascript similar to the backend code.
>>
>> I will concentrate on the JS topic over the weekend and hope to provide an
>> updated candidate for next week.
>>
>> On Fri, Apr 17, 2026 at 9:06 PM Nels Lindquist <nlindq at maei.ca> wrote:
>>
>>> Hi, all.
>>>
>>> On 2026-04-17 1:35 AM, R.J.Baart at Prompt.nl wrote:
>>> > With Firefox 149.0.2 I opened the web interface to H6.
>>> >
>>> >   * Creating a new message, compose in HTML does not work
>>> >
>>> >   * Calendar, no events are shown
>>> >
>>> >   * Creating new event, nothing happens
>>> >
>>> > In Edge 147.0.3912.60
>>> >
>>> >   *  “loading calendars”, but nothing is shown
>>> >
>>> >   *  Creating a new message, compose in HTML does not work
>>>
>>> I confirmed all of the behaviours R.J. listed above in both Firefox
>>> 14.0.1esr and Edge 147.0.3912.60 (no difference in behaviour for me
>>> between the browsers).
>>>
>>> In addition, I noted in imp that while plaintext e-mails are properly
>>> displayed in the preview window when clicking through the message list,
>>> anything with inline HTML produces a blank preview. Double-clicking to
>>> open any message in a pop-up window (whether plaintext or HTML) results
>>> in a blank window.
>>>
>>> In kronolith, if I add a meeting attendee while trying to create a
>>> meeting, the invitation is sent out, and if the recipient clicks on a
>>> link in the e-mail to accept the meeting, a browser window opens
>>> indicating that the meeting was successfully accepted. There's still no
>>> meeting displayed in the calendar, though. I tried rolling back the
>>> changes to see whether the event was actually created but just not
>>> displayed, but there's no event so it wasn't just a display artifact.
>>>
>>> I'm still testing under PHP 8.5.5 using horde/css_parser 2.0.0beta7
>>> incorporating the updated saberworm/php-css-parser compatibility, with
>>> sabberworm/php-css-parser 9.3.0 installed.
>>>
>>>
>>> --
>>> Nels Lindquist
>>> nlindq at maei.ca
>>> --
>>> Horde mailing list
>>> Frequently Asked Questions: http://horde.org/faq/
>>> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>>>
>>
> --
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org


-- 
Service systèmes et réseaux - DISI

Université de Picardie Jules Verne
5, rue du moulin neuf - 80000 Amiens



More information about the horde mailing list