From 8f95dce3ece6eccf240ed0b994fb267bf390bf30 Mon Sep 17 00:00:00 2001 From: Saya Andy Date: Mon, 7 Sep 2026 14:07:24 +0700 Subject: diff: split refs and other options into separate panels The diff controls panel mixed the from/to ref pickers with the rendering options (context, space, mode). Split it into two panels, stacked vertically: one for the refs and one for the other options, so each groups related controls. --- ui-diff.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'ui-diff.c') diff --git a/ui-diff.c b/ui-diff.c index ae4c9de..5ee3830 100644 --- a/ui-diff.c +++ b/ui-diff.c @@ -370,12 +370,11 @@ void cgit_print_diff_ctrls(void) { int i, curr; - html("
"); - html("diff options"); - html("
"); + html(""); /* * Emit the same hidden fields as cgit_add_hidden_formfields(), except - * id/id2, which are carried by the ref-picker selects below. + * id/id2, which are carried by the ref-picker selects below. One + * form wraps both panels so any submission carries all controls. */ if (!ctx.cfg.virtual_root) { struct strbuf url = STRBUF_INIT; @@ -391,6 +390,8 @@ void cgit_print_diff_ctrls(void) if (ctx.qry.showmsg) html_hidden("showmsg", "1"); + html("
"); + html("diff refs"); html(""); html(""); @@ -409,6 +410,13 @@ void cgit_print_diff_ctrls(void) cgit_print_ref_select("id", new_ref); html(""); } + html("
"); + html("
"); + + html("
"); + html("diff options"); + html(""); + html(""); html(""); html(""); @@ -443,8 +451,8 @@ void cgit_print_diff_ctrls(void) html("
context:
"); html(""); html("
"); - html(""); html("
"); + html(""); } void cgit_print_diff(const char *new_rev, const char *old_rev, -- cgit v1.3.1+14