From 4b7bfbc252db0f23d091139211e4bd9e64620d62 Mon Sep 17 00:00:00 2001 From: amdi-odoo Date: Tue, 17 Jan 2023 13:47:16 +0000 Subject: [PATCH] [IMP] survey: prevent table flicker Purpose ======= Prevent table with answers from flickering when having multiple pages with different items count. Specifications ============== Adjust the table height to the question types to keep the pagination buttons on the same level while switching pages. Each table line is expected to be, for the text_box questions, 3 lines height and for the char_box, numerical, date and datetime question types (+ comments), only one line height. Adding a scrollbar if the table height is greater than expected. For the text, char, number, date and datetime question type (+ comments), set the input line id cells width to a percentage to avoid horizontal flicker while changing pages and to reduce first column width. Task-2957775 Part-of: odoo/odoo#100168 --- .../src/scss/survey_templates_results.scss | 8 + .../views/survey_templates_statistics.xml | 143 ++++++++++-------- 2 files changed, 87 insertions(+), 64 deletions(-) diff --git a/addons/survey/static/src/scss/survey_templates_results.scss b/addons/survey/static/src/scss/survey_templates_results.scss index c159c175098..a7de7bfec9c 100644 --- a/addons/survey/static/src/scss/survey_templates_results.scss +++ b/addons/survey/static/src/scss/survey_templates_results.scss @@ -94,6 +94,14 @@ border-color: #DEE2E6; font-weight: bold; } + table { + font-size: 1rem; + &.o_survey_results_table_indexed { + td:first-child { + width: 7%; + } + } + } } .o_survey_no_answers::before { diff --git a/addons/survey/views/survey_templates_statistics.xml b/addons/survey/views/survey_templates_statistics.xml index fd2b5bdf131..ff88df386f4 100644 --- a/addons/survey/views/survey_templates_statistics.xml +++ b/addons/survey/views/survey_templates_statistics.xml @@ -63,6 +63,10 @@ + + +
@@ -190,38 +194,43 @@ @@ -300,36 +309,40 @@
- - - - - - - - - - - - + + +
+
#User Responses
- - - - - - - - - - - - - -
+ + + + - - -
#User Responses
+ + + + + + + + + + + + + + + + + + + + + + + + +
@@ -474,7 +487,7 @@