From e68feff2e1e7c6e795615bc2db5f69c49230e846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20Hud=C3=A1k?= Date: Sat, 20 Feb 2021 17:22:25 +0100 Subject: [PATCH] Main page - disable hover info for package/user links (#4545) * Main page - Only show hover info for favorites in package, user links suppress titles for non-favorite repositories * always suppress loading titles in repo overview Co-authored-by: Lars Hvam --- src/ui/zcl_abapgit_gui_chunk_lib.clas.abap | 24 +++++++++++-------- .../zcl_abapgit_gui_page_repo_over.clas.abap | 12 +++++++--- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap b/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap index efd301904..5eb94dec2 100644 --- a/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap +++ b/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap @@ -127,19 +127,21 @@ CLASS zcl_abapgit_gui_chunk_lib DEFINITION zcx_abapgit_exception . CLASS-METHODS render_package_name IMPORTING - !iv_package TYPE devclass - !iv_interactive TYPE abap_bool DEFAULT abap_true + !iv_package TYPE devclass + !iv_interactive TYPE abap_bool DEFAULT abap_true + !iv_suppress_title TYPE abap_bool DEFAULT abap_false RETURNING - VALUE(ri_html) TYPE REF TO zif_abapgit_html + VALUE(ri_html) TYPE REF TO zif_abapgit_html RAISING zcx_abapgit_exception . CLASS-METHODS render_user_name IMPORTING - !iv_username TYPE xubname - !iv_interactive TYPE abap_bool DEFAULT abap_true - !iv_icon_only TYPE abap_bool DEFAULT abap_false + !iv_username TYPE xubname + !iv_interactive TYPE abap_bool DEFAULT abap_true + !iv_icon_only TYPE abap_bool DEFAULT abap_false + !iv_suppress_title TYPE abap_bool DEFAULT abap_false RETURNING - VALUE(ri_html) TYPE REF TO zif_abapgit_html + VALUE(ri_html) TYPE REF TO zif_abapgit_html RAISING zcx_abapgit_exception . CLASS-METHODS render_transport @@ -692,8 +694,10 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION. RETURN. ENDIF. - SELECT SINGLE ctext FROM tdevct INTO lv_title - WHERE devclass = iv_package AND spras = sy-langu ##SUBRC_OK. + IF iv_suppress_title = abap_false. + SELECT SINGLE ctext FROM tdevct INTO lv_title + WHERE devclass = iv_package AND spras = sy-langu ##SUBRC_OK. + ENDIF. lv_obj_name = iv_package. lv_jump = zcl_abapgit_html_action_utils=>jump_encode( @@ -950,7 +954,7 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION. RETURN. ENDIF. - IF iv_username <> zcl_abapgit_objects_super=>c_user_unknown. + IF iv_username <> zcl_abapgit_objects_super=>c_user_unknown AND iv_suppress_title = abap_false. CALL FUNCTION 'SUSR_USER_ADDRESS_READ' EXPORTING user_name = iv_username diff --git a/src/ui/zcl_abapgit_gui_page_repo_over.clas.abap b/src/ui/zcl_abapgit_gui_page_repo_over.clas.abap index 804ca5d09..6ce1d3c09 100644 --- a/src/ui/zcl_abapgit_gui_page_repo_over.clas.abap +++ b/src/ui/zcl_abapgit_gui_page_repo_over.clas.abap @@ -349,7 +349,9 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_REPO_OVER IMPLEMENTATION. ENDIF. ii_html->add( || ). - ii_html->add( zcl_abapgit_gui_chunk_lib=>render_package_name( -package ) ). + ii_html->add( zcl_abapgit_gui_chunk_lib=>render_package_name( + iv_package = -package + iv_suppress_title = abap_true ) ). ii_html->add( || ). IF -branch IS INITIAL. @@ -363,11 +365,15 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_REPO_OVER IMPLEMENTATION. ENDIF. ii_html->add( || ). - ii_html->add( zcl_abapgit_gui_chunk_lib=>render_user_name( -deserialized_by ) ). + ii_html->add( zcl_abapgit_gui_chunk_lib=>render_user_name( + iv_username = -deserialized_by + iv_suppress_title = abap_true ) ). ii_html->add( || ). ii_html->add( |{ -deserialized_at }| ). ii_html->add( || ). - ii_html->add( zcl_abapgit_gui_chunk_lib=>render_user_name( -created_by ) ). + ii_html->add( zcl_abapgit_gui_chunk_lib=>render_user_name( + iv_username = -created_by + iv_suppress_title = abap_true ) ). ii_html->add( || ). ii_html->add( |{ -created_at }| ). ii_html->add( |{ -key }| ).