From 63640bb3fc77062fb3f030022e0d575b910362ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20Hud=C3=A1k?= Date: Sat, 21 Mar 2020 09:56:53 +0100 Subject: [PATCH] Minor ux improvements (#3253) * Resize stage list to full width * Move patch button to the top menu * Center stage list, increase line width in repo, stage * Repo page - Increase line height for path column * Stage list to full size Co-authored-by: Lars Hvam --- src/ui/zabapgit_css_common.w3mi.data.css | 7 ++++++- src/ui/zcl_abapgit_gui_page_stage.clas.abap | 20 ++++++-------------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/ui/zabapgit_css_common.w3mi.data.css b/src/ui/zabapgit_css_common.w3mi.data.css index 30129cc93..4374504c4 100644 --- a/src/ui/zabapgit_css_common.w3mi.data.css +++ b/src/ui/zabapgit_css_common.w3mi.data.css @@ -206,6 +206,7 @@ table.repo_tab { border: 1px solid; border-radius: 3px; width: 100%; + line-height: 1.5; } .repo_tab th { text-align: left; @@ -238,6 +239,7 @@ table.repo_tab { } .repo_tab td.files { padding-left: 0.5em; + line-height: 1.5; } .repo_tab td.cmd, .repo_tab th.cmd { text-align: right; @@ -250,12 +252,15 @@ table.repo_tab { .repo_tab tr:first-child td { border-top: 0px; } /* STAGE */ -div.stage-container { width: 900px; } + +th.stage-status { width: 30px; } +th.stage-objtype { width: 30px; } input.stage-filter { width: 18em; } .stage_tab { border: 1px solid; margin-top: 0.2em; + line-height: 1.5; } .stage_tab td { border-top: 1px solid; diff --git a/src/ui/zcl_abapgit_gui_page_stage.clas.abap b/src/ui/zcl_abapgit_gui_page_stage.clas.abap index 29145a45d..f2a36c523 100644 --- a/src/ui/zcl_abapgit_gui_page_stage.clas.abap +++ b/src/ui/zcl_abapgit_gui_page_stage.clas.abap @@ -113,6 +113,9 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_STAGE IMPLEMENTATION. IF lines( ms_files-local ) > 0. ro_menu->add( iv_txt = |All diffs| iv_act = |{ zif_abapgit_definitions=>c_action-go_diff }?key={ mo_repo->get_key( ) }| ). + + ro_menu->add( iv_txt = |Patch| + iv_act = |{ zif_abapgit_definitions=>c_action-go_patch }?key={ mo_repo->get_key( ) }| ). ENDIF. ENDMETHOD. @@ -259,9 +262,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_STAGE IMPLEMENTATION. METHOD render_actions. DATA: lv_local_count TYPE i, - lv_add_all_txt TYPE string, - lv_param TYPE string, - ls_file TYPE zif_abapgit_definitions=>ty_file. + lv_add_all_txt TYPE string. CREATE OBJECT ro_html. lv_local_count = count_default_files_to_commit( ). @@ -289,16 +290,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_STAGE IMPLEMENTATION. iv_id = 'commitAllButton' iv_txt = lv_add_all_txt ) ##NO_TEXT. - lv_param = zcl_abapgit_html_action_utils=>file_encode( iv_key = mo_repo->get_key( ) - ig_file = ls_file ). - - ro_html->add( '' ). - - ro_html->add( '' ). - ro_html->add_a( - iv_txt = |Patch| - iv_act = |{ zif_abapgit_definitions=>c_action-go_patch }?{ lv_param }| ). ro_html->add( '' ). " Filter bar @@ -411,8 +403,8 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_STAGE IMPLEMENTATION. LOOP AT ms_files-local ASSIGNING . AT FIRST. ro_html->add( '' ). - ro_html->add( '' ). " Diff state - ro_html->add( 'Type' ). + ro_html->add( '' ). " Diff state + ro_html->add( 'Type' ). ro_html->add( 'Files to add (click to see diff)' ). ro_html->add( 'Changed by' ). ro_html->add( 'Transport' ).