Ruby on Rails

Sdílet
Vložit
  • čas přidán 8. 05. 2024
  • We are all used to pagination by clicking a prev or next page link.
    But what if we could paginate by year/month/day?
    Some time ago I asked Domizio Demichelis (@ddnexus), the creator of Pagy gem, this question. And it resulted in the creation of Pagy::Calendar!
    Let's explore how we can add calendar pagination to our app and make it useable.
    Episode source code: github.com/corsego/157-pagy-c...
    Based on this blogpost: blog.corsego.com/pagy-calenda...
    0:00 Calendar pagination demo
    02:20 Install Pagy Calendar
    6:58 Tailwind styling
    7:56 Paginate by year/month/week/day
    11:08 Toggle calendar and normal pagination
    12:58 Create an event for current date
    17:04 Fix bug with max year being wrong
    19:25 redirect back to page in calendar
    22:11 link to Today

Komentáře • 3

  • @ledockol
    @ledockol Před 3 měsíci

    Крутезне відео!
    Багато якісного і корисного матеріалу.
    Дякую!
    Чекаємо на продовження відео у цьому році.

  • @SupeRails
    @SupeRails  Před 3 měsíci +2

    "calendar pagination" is quite an interesting concept that I haven't seen in many UIs before. What do You think about it?

  • @tomasvalent3876
    @tomasvalent3876 Před 3 měsíci

    👍👍👍