ems-frontend icon indicating copy to clipboard operation
ems-frontend copied to clipboard

Fix/ab#85861 infinite scrolling not triggered when elements take less space than height

Open NathanHGit opened this issue 2 years ago • 0 comments

Description

I created a function to fetch more data if the cards height takes up less space than the container height when using infinite scrolling.

I noticed a bug related padding when scrolling to the bottom of the container. This was caused by the max-height property. I moved it, as it is only used by the preview in the settings.

Additionally, I noticed an issue with resource loading when using infinite scrolling which I fixed by sending the query result along with the binding.

Useful links

Type of change

  • [X] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I created a dashboard with the grid type option set to fit. I created a summary cards widget based on data with hundred of lines, that uses infinite scrolling. I styled the cards to have a minimum height so that at least 25 cards don't take up the full space. I checked if more cards were loaded (until the scrollbar appeared).

Screenshots

peek

Checklist:

( * == Mandatory )

  • [X] * I have set myself as assignee of the pull request
  • [X] * My code follows the style guidelines of this project
  • [X] * Linting does not generate new warnings
  • [X] * I have performed a self-review of my own code
  • [X] * I have put the ticket for review, adding the oort-frontend team to the list of reviewers
  • [X] * I have commented my code, particularly in hard-to-understand areas
  • [X] * I have put JSDoc comment in all required places
  • [X] * My changes generate no new warnings
  • [X] * I have included screenshots describing my changes if relevant
  • [X] * I have selected labels in the Pull Request, according to the changes with code brings
  • [ ] I have made corresponding changes to the documentation ( if required )
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] New and existing unit tests pass locally with my changes
  • [ ] Any dependent changes have been merged and published in downstream modules

More explanation

https://www.loom.com/share/05a716d61b9744faaf51fb304c21d1e5?sid=f87cf896-582a-4f76-93ae-8ceed801b145

NathanHGit avatar Feb 14 '24 13:02 NathanHGit