where does the code set drop-down options in a menu?

12 views
Skip to first unread message

Richard de Rozario

unread,
Apr 28, 2020, 10:33:33 PM4/28/20
to Etherpad Developers
I'm trying to debug ep_font_family.  There is a problem where the list of drop-down options doesn't get transferred to the inside the menu's <ul>...</ul> tag, but outside of it.

However, I can't find where that transfer happens.   The code initially sets up a list of <select> options, which at some point are supposed to get appended into the <ul> list (probably when the font-family icon button is clicked).

But it is entirely unclear where that happens in the code (and what goes wrong).   The code is very comparable to ep_font_size (which works correctly), but even that doesn't help figure out what is going on.

Can someone explain how this works?  Or how to trace the function calls?

cheers,

RdR

John McLear

unread,
May 6, 2020, 2:27:27 PM5/6/20
to Etherpad Developers
I will fix it up today.

Richard de Rozario

unread,
May 7, 2020, 9:48:51 PM5/7/20
to Etherpad Developers

Thanks, John.  Could I also trouble you for some notes when you figure out the fix?  I'm trying to familiarize myself with the code (with an eye to contributing of course), but would benefit from some tips on how things are structured.  It's very difficult to figure out from just reading the code and tracing.

It seems as if the menubar uses pre-existing libraries from the ace-editor to provide a standard structure for buttons, pulldowns, etc.   But I haven't been able to figure out the way to provide, for example, the content of pulldown menus.  I think I'm missing an understanding of the overall "scaffolding" of the UI.

cheers,

RdR

John McLear

unread,
May 13, 2020, 4:33:22 PM5/13/20
to Etherpad Developers
Reply all
Reply to author
Forward
0 new messages