Giter Site home page Giter Site logo

flowpack / flowpack.listable Goto Github PK

View Code? Open in Web Editor NEW
35.0 6.0 17.0 139 KB

Neos package that helps you to render lists of things

Home Page: https://packagist.org/packages/flowpack/listable

License: MIT License

PHP 100.00%
neoscms pagination

flowpack.listable's People

Contributors

ahaeslich avatar andrehoffmann30 avatar beardcoder avatar comir avatar danielkestler avatar daniellienert avatar dimaip avatar dlubitz avatar gerdemann avatar htuscher avatar johannessteu avatar jonnitto avatar kdambekalns avatar lorenzulrich avatar mficzel avatar mirkokaufmann avatar rolandschuetz avatar sebobo avatar weissheiten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

flowpack.listable's Issues

Last page is not shown everytime

If there is a pagination where "..." is displayed before the last page number, the last page number is not displayed when you are on the page where the "..." disappears.

I recognized this behavior in multiple projects and all had the same effect.

image1

image2

Routing seems not to work

According to the Routes.yaml which should be auto-included, I should be able to use URLs like /de/news~p2.html, correct?
This seems to be broken.

Version consistency

The current version tag 2.0.2 should be 3.0 as it's a breaking change and makes every package that depends on Listable incompatible.

Consolidating to one node type?

I find the Sfi.Listable:Listable name a little non-descriptive and it may not be neccessary.
What about only providing a Sfi.Listable:List?
If no wrapping elements are defined, the default behavior could be that of the current Listable node.

skip or offset

I could not find offsets (skipping to list the first n items (as they may be rendered in full lengh just above the list).

Mention in documentation that collections cannot be passed with props to PaginatedCollection

Flowpack.Listable:PaginatedCollection has a collection key that must be set by the user.

The documentation shows an example:

prototype(My.Custom:Object) < prototype(Flowpack.Listable:PaginatedCollection) {
  collection = ${Search.query(site).nodeType('Something.Custom:Here').sortDesc('date')}
  ...
}

When passing the same search query as prop, it does not work:

prototype(My.Custom:Object) < prototype(Neos.Fusion:Component) {
  collection = ${Search.query(site).nodeType('Something.Custom:Here').sortDesc('date')}
  
  renderer = Flowpack.Listable:PaginatedCollection {
    collection=${props.collection}
  }
}

It was hard to find out and took me several hours of debugging to realize that this is simply not possible because of the caching configuration of PaginatedCollection, because the data passed is not saved with the cache entry (see @cache.context).

I'm not sure where exactly, but might it be worth mentioning this in the README or in the code of the fusion component itself?

date dependant listings

Allow to limit and paginate based on date property? For example, show only past/next month or year, and paginate to past/next year.

Method `count` is not callable in untrusted context (`totalCount`)

I get an error in combination with Flowpack Simple search at line:

totalCount = ${Type.getType(props.collection) == 'array' ? q(props.collection).count() : props.collection.count()}

props.collection has changed in Flowpack.SimpleSearch with this pr:
https://github.com/Flowpack/Flowpack.SimpleSearch.ContentRepositoryAdaptor/pull/39/files#diff-ffc206e78cb0c19096185c41a6daf40384dee16565b7a919e5438c6ce1d2cb7fR223

and is no longer a simple array but and \ArrayIterator or better a \Traversable

the fusion in totalCount should be changed to account for \Traversables

a current workaround is to call Array.values on props.collection before passing it to Flowpack.Listable:PaginatedCollection

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.