Project

General

Profile

Actions

Feature #17204

open

load = async for reports

Added by Philipp Gröbelbauer 8 months ago. Updated 11 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Philipp Gröbelbauer
Target version:
Start date:
31.10.2023
Due date:
% Done:

0%

Estimated time:
4.00 h
Discuss:
Prio Planung:
No
Vote:
PG

Description

At the start of a report (like form = ...) the line:

load = async

(or similar) could be introduced. Async Content will not be loaded for the initial page.
Instead, a request will be sent via JS to fetch that content asynchronously.
While the content is being fetched, a spinning wheel acts as a placeholder.

The Link class can also be extended, so that a link might re-fetch an already displayed report instead of triggering a page reload.


Related issues

Related to QFQ - Feature #9135: Progress Bar generic / replace old hourglass download popupIn ProgressBenjamin Baer16.09.201911.11.2023

Actions
Actions #1

Updated by Carsten Rose 8 months ago

  • Status changed from New to Priorize
Actions #2

Updated by Carsten Rose 8 months ago

  • Status changed from Priorize to In Progress
Actions #3

Updated by Carsten Rose 8 months ago

  • Estimated time set to 4.00 h
Actions #4

Updated by Carsten Rose 8 months ago

  • Assignee changed from Support: Web to Philipp Gröbelbauer
Actions #5

Updated by Philipp Gröbelbauer 8 months ago

https://git.math.uzh.ch/typo3/qfq/-/commit/41ac224921b59c9ba76ba30856c7aa1031cd7a43

1) Wie wird load=async erkannt?
Es gibt keine Stelle, an der diese 'global Tokens' vor dem Report Render erkannt werden.
Daher wird der Bodytext genau wie fuer file=... mittels RegularExpression nach "load=..." geprueft in der LoadAsync Klasse.

2) Wie wird erkannt, ob ein Report normal oder ueber DataReport.php processed wird?
$this->store->getVar("SCRIPT_NAME", STORE_CLIENT);
Wird auf "/index.php" oder "/dataReport.php" getestet.
Sollten wir da Konstante einfuehren?

Actions #6

Updated by Philipp Gröbelbauer 8 months ago

  • Related to Feature #9135: Progress Bar generic / replace old hourglass download popup added
Actions #7

Updated by Carsten Rose 8 months ago

  • Tracker changed from Support to Feature
Actions #8

Updated by Philipp Gröbelbauer 8 months ago

T3 Ext Config sollte noch erweitert werden um den 'load default' (naming?)
Wenn nichts angegeben wird in einem Report, dann wird dieser global default genommen.

Actions #9

Updated by Elias Villiger 8 months ago

Hatte grad die gleiche Idee und ein bisschen rumgespielt, durch CR auf das Ticket aufmerksam gemacht worden.

Kann mit folgender QFQ-Syntax schon umgesetzt werden:

10 {
  sql = SELECT 'p:{{pageId:T0}}&someVariable=true|s|r:7' AS _link
  head = <button onclick="$('#reloadContent').load('
  tail = ' + ' #reloadContent','');">Reload!</button></td>
}

Basiert auf folgendem JQuery:

$('#reloadContent').load(location.href+' #reloadContent', '');

Nachteil dieser Methode: JS wird nicht ausgeführt, nur das statisch generierte HTML geliefert.

Actions #10

Updated by Carsten Rose 8 months ago

Self learning progress bar

  • Anstelle eines Spinning-wheels koennte auch eine Progressbar dargestellt werden.
  • Oft weiss man nicht wieviele 'Sekunden' oder 'Ticks' es bis 'done' braucht.

Option 'time based':

  • Pro tt-content mit 'async' wird gemessen wie lange die Ausfuherung braucht.
  • Das wird in der QFQ-'Settings' Table gespeichert.
  • Beim naechsten Aufruf ist der letzte Wert die neue geschaetze Endzeit (wird angezeigt) und der Progress-Bar zaehlt hoch ...
  • Da time based ist keine weitere Client/Server Kommunikation noetig.

Option 'tick based':

  • In einem Report Level kan ein Schluesselwort 'progresstick' definiert werden.
  • Jedesmal wenn eine Query gefeuert wird, die das Schluesselwort hat, wird es gezaehlt und die Progressbar springt einen Tick weiter.
  • Die Gesamtanzahl Ticks wird in der QFQ-'Settings' Table gespeichert.
  • Beim naechsten Aufruf ist letzte Anzahl Ticks die neue geschaetze Ticks Anzahl (wird angezeigt) und der Progress-Bar zaehlt hoch ...
  • Da Event based koennen die Ticks via Websocket aktualisiert werden.
Actions #11

Updated by Carsten Rose 11 days ago

  • Target version changed from CodingWeek2023 to Coding Week 24
Actions

Also available in: Atom PDF