Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy loading of Change History #12

Merged
merged 12 commits into from
Oct 12, 2023
Merged

Lazy loading of Change History #12

merged 12 commits into from
Oct 12, 2023

Conversation

mnkiefer
Copy link
Contributor

@mnkiefer mnkiefer commented Sep 26, 2023


Options for lazy loading in the UI for Change History

We want to lazy load the Change History table on a Fiori Object Page as this table can have a large number of entries which we only want to see/search on demand.

Requirements

In implementing this, we have the following restrictions:

  1. We are restricting ourselves to an Object Page:

    Unlike the Go Button from the List Report Page, an Object Page treats lazy loading different according to the number of items, where the Change History table would fall into the last category (as marked by ➡️ ):

    Lazy Loading type # Items
     Lazy Loading Behavior (“More” button) < 100
    Tab Navigation > 100 but <= 400
    ➡️   Navigation to Another Page > 400 
  2. We are restricting ourselves to using only Fiori annotations

    That means, no changes to the manifest.json, which contains most of the controls that we need, such as navigating to a separate Page (component), using another template (List Report), etc. that would support the extra features we need.

In general, any solution we take should not violate the Fiori guidelines and stick to the possible (existing/customized) features of the floorplan (see Object Page) as designed.

Possible solutions

To implement a solution within the realm of requirements (from above), we can only do two more things to influence the table loading: By showing/hiding the entire table or by implementing a button that only loads the data for that table on demand.

   i. Using @UI.PartOfPreview
   ii. Using @UI.Hidden on facet
   ii. Using @UI.Hidden on columns
   iii. Using an Action to set $skip, $top


i. Using @UI.PartOfPreview

  • Disabling @UI.PartOfPreview hides the facet initially:

    Screenshot 2023-09-26 at 06 26 02
  • Provides the buttons Show More/Show Less Buttons to show/hide it on demand:

    Screenshot 2023-09-26 at 06 26 21

Important

COULD USE as long as filter/search erroneous behavior is fixed on page refresh
Could this be due to the following restriction on facet target?


ii. Using @UI.Hidden on facet

  • Hiding the entire facet will stop data from loading automatically. We would then need an action button at the top of the Object page to toggle (show/hide) the facet on demand.

    Screenshot 2023-10-05 at 07 40 26

Important

COULD USE as long we can set @UI.Hidden dynamically so that the Table as the button is pressed.


iii. Using @UI.Hidden on columns

  • Hiding all columns does not have this issue (we still have a button), but the user might wonder why there are no default columns set to display:

    Screenshot 2023-09-26 at 08 47 40

Warning

SHOULD NOT USE due to misleading message in the UI (we cannot change this text)


vi. Using an Action to set $skip,$top

  • We display the table by default but initially set $top = 0. On pressing an action button "Show Changelogs", we could send a request to OData to retrieve the data, but with extra parameters that reset $top/$skip to their defaults. The user might still be confused by the default message 'No items available'.

    Screenshot 2023-09-26 at 08 54 20

Warning

SHOULD NOT USE, as it interferes with standard OData calls.


@mnkiefer mnkiefer changed the title Exploration of loading ChangeView on demand Lazy loading of *Change History* Sep 26, 2023
@mnkiefer mnkiefer changed the title Lazy loading of *Change History* Lazy loading of Change History Sep 26, 2023
@mnkiefer mnkiefer marked this pull request as draft September 26, 2023 08:59
@mnkiefer mnkiefer marked this pull request as ready for review October 8, 2023 19:08
@mnkiefer mnkiefer requested a review from danjoa October 12, 2023 12:04
@mnkiefer mnkiefer merged commit dbe9524 into main Oct 12, 2023
3 checks passed
@mnkiefer mnkiefer deleted the uiMods branch October 12, 2023 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant