ericberman / MyFlightbookWeb

The website and service for MyFlightbook
48 stars 18 forks source link

Add profile preference for number of flights to display per page #383

Closed KayRJay closed 4 years ago

KayRJay commented 4 years ago

MyFlightBook seems to have a fixed page size for the logbook, displaying 25 flights per page. A a user preference to change this number would be nice to have. This option would be part of an expanded profile preference for "Flight Entry and Display". (That section should say "and display" anyway ...)

It is sometimes helpful to see all matching flights that match a search, without having to navigate from page to page. Being able to show many/all flights on a single page would also make it very easy to select a desired range of flights, copy them and directly paste them into Excel (Paste special ... text).

ericberman commented 4 years ago

Yeah, I should indeed make this an option. The functionality is already there (add "pagesize=##" to the URL of any page that has a list of your flights to set the page size. e.g., https://myflightbook.com/logbook/Member/LogbookNew.aspx?pagesize=10 will set it to 10 flights/page. But being able to specify the default (currently 25) without having to muck with the URL is a reasonable thing.

ericberman commented 4 years ago

Oh, my. Implementing the functionality is easy. Implementing the UI is actually hard. This doesn't belong in the preferences pages, which are really about the user and back-end functionality that spans the whole site; page size (along with compact view and inline images) belongs with the control above the list of flights.

But that's a popup. So putting a drop-down there doesn't work because moving the mouse into the list (which extends past the bottom of the popup) dismisses the popup - and the drop-down with it. Putting in a type-in box requires some sort of a commit button, which is awful and ugly.

So I put this into a pop-up. Clunky, but it works (and not likely to be used very often).

the "pagesize=##" trick still works, but does NOT set the cookie for page size (i.e., it's for that page only); using the pop-up does set it in the cookie (and thus for all pages in that browser).

ericberman commented 4 years ago

Fix will go live in next few days.