How is the comment interface built?

Does anyone know how the interface in the comment section is generated? I want to add another button next to the “comment” button; which file can I edit to change the interface? I tried adding that button in the"

make_comment_box

function located in

public/js/frappe/form

but it doesn’t look good. I have tried to understand this function, and it adds a field:

df: {
                            fieldtype: "Comment",
                            fieldname: "comment",
                   }

to the parent object with the class

this.wrapper.find(“.comment-box”)

.I also looked in the templates:

public/js/frappe/form/template/form_footer.html

but the result is still just a basic HTML snippet:

<div class="form-footer">
        <div class="after-save">
                <div class="comment-box"></div>
                <div class="timeline"></div>
        </div>
        <button class="scroll-to-top btn btn-default icon-btn" onclick="frappe.utils.scroll_to(0)">
                <svg class="icon icon-xs"><use href="#icon-up-line"></use></svg>
        </button>
</div>

. Can anyone provide me with more information about this?

Hi there,

Those methods aren’t really designed to be used manually, and anyway they’re likely to change in a big way with v16. Your best bet is probably just to let the page to load and add new buttons with standard DOM methods.