Commit Graph

16 Commits

Author SHA1 Message Date
jolavillette
7432e9376f webui: modal content passed as a vnode must be copied per redraw
Removing freshVnode() without converting any of the 53 popupMessage
call sites froze every dynamic modal at its first render: mithril skips
a subtree whose children array is identical between redraws, so the Add
Friend and Create Identity dialogs kept their submit buttons disabled
forever and displayed none of what was typed. The recursive copy is
back for vnode call sites -- component call sites keep the new direct
m(component) path, which is the right long-term shape; converting the
call sites one by one can then retire the copy for real.

For a component vnode (m(SomeComponent) passed ready-made) the copy
rebuilds via m(tag, attrs, children) without descending into children,
which belong to the component's own view.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-10 11:04:30 +02:00
defnax
0af8d7e7f6 Removed freshVnode and private tag inspection completely
Added standard component and view function support
2026-09-09 21:57:19 +02:00
defnax
09f071c97d Make shared comment component for boards and channels 2026-09-09 21:17:07 +02:00
defnax
fceefc95bb fixed popup window for phone 2026-08-15 16:37:58 +02:00
jolavillette
be039e2448 webui v135: clone modal content all the way down
A vnode carries the DOM node it owns, so the same one must not be rendered
twice. popupMessage is handed a ready made vnode and now mounts it, which
re-renders it on every global redraw, so freshVnode() rebuilds it on each pass.

It only rebuilt the root though: `m(vnode.tag, vnode.attrs, vnode.children)`
passes the children array by reference, and updateNodes() starts with

    if (old === vnodes ...) return

so mithril skips the entire subtree. Everything below the first level of a modal
is therefore frozen at its first render — which goes unnoticed today because the
popups built as plain vnode trees are all static messages, and everything that
has to update is passed as a component. It is a trap for the next one.

The clone is now recursive, with the three tags that are not selectors handled
through their own factory: '<' is m.trust, and rebuilding it with m() would
silently turn trusted html into an empty div, since '<' matches nothing in the
selector parser; '[' is m.fragment; '#' is a text vnode whose children is the
string itself.

Checked that no popup built as a plain tree contains an input, textarea or
select, so nothing starts having its value re-applied under the user's fingers:
every form modal goes through a component, which re-renders on its own.

The version label assumes the loader robustness PR lands first.
2026-08-13 12:15:25 +02:00
defnax
e7e2c3365e Added to show Location datails 2026-08-12 18:24:54 +02:00
defnax
04d42dc38f Added comments viewer & composer for boards
Added Navbar for webui on phones
for Boards and Channels:
* Validate API responses before processing.
* Keep rendering/navigation functional if a response is incomplete.
* Log a clear warning instead of throwing an uncaught error.
* Use independent sorted arrays, avoiding mutation of the master list.
2026-07-28 23:58:26 +02:00
zelfroster
a64e47a882 chore: mithril.js not re-rendering even after calling m.redraw() 2023-06-30 17:55:39 +05:30
Sukhamjot Singh
cddca62662 Comment changes, added posts. 2022-06-13 23:04:14 +05:30
Sukhamjot Singh
0af3a6913c Subcribed channels view 2022-05-31 22:49:43 +05:30
Sukhamjot Singh
3dcf310a54 added tags 2022-03-22 00:43:23 +05:30
Sukhamjot Singh
98f873aa84 temporarily fix active 2022-03-22 00:15:24 +05:30
Sukhamjot Singh
bbf826b715 added starred in separate sidebar 2022-03-19 01:45:13 +05:30
zeners
f09d6b0ca9
try to fix eslint and prettier issues (#32)
* fix eslint + prettier issues

* fix eslint config (remove with prettier clashing indent rules)

* fix eslint warnings
2021-04-20 18:30:39 +05:30
Mohammed Saud
96514c844e fix breaking changes 2020-02-11 22:45:12 +05:30
rottencandy
8c11ad894c separate common widgets 2019-08-18 20:12:41 +05:30