autocomplete dropdown
- the floating version of the autocomplete dropdown gets the same backend treatment the media hovers and the popup toaster recently received--it is no longer its own window, but now a normal widget floating inside its parent. it should look pretty much the same, but a variety of bugs are eliminated. clients with many search pages open now only have one top level window, rather than potentially hundreds of hidden ones
- if you have turned off floating a/c windows because of graphical bugs, please try turning them back on today. the checkbox is under options->search.
- as an additional consequence, I have decided to no longer allow 'floating' autocomplete windows in dialogs. I never liked how this worked or looked, overlapping the apply/cancel buttons, and it is not technically possible to make this work with the new tech, so they are always embedded in dialogs now. the related checkbox in options->search is gone as a result
- if you ok or cancel on the 'OR' buttons, focus is now preserved back to the dropdown
- a bunch of weird interwindow-focus-juggling and 'what happens if the user's window manager allows them to close a floating a/c dropdown'-style code is cleared out. with simpler logic, some flicker jank is simply eliminated
- if you move the window around, any displaying floating a/c dropdowns now glide along with them; previously it updated at 10fps
- the way the client swaps a new thumbnail grid in when results are loaded or dismissed is faster and more atomic. there is less focus-cludge, and as a result the autocomplete is better at retaining focus and staying displayed as changes to the search state occur
- the way scroll events are caught is also improved, so the floating dropdown should fix its position on scroll more smoothly and capably
date system predicates
- this affects system:import time; :modified time; and :last viewed
- updated the system:time UI for time delta so you are choosing 'before', 'since', and '+/- 15% of'
- updated the system:time UI for calendar date so you are choosing 'before', 'since', 'the day of', and '+/- a month of' rather than the ugly and awkward '<' stuff
- updated the calendar calculations with calendar time-based system predicates, so '~=' operator now does plus or minus one month to the same calendar day, no matter how many days were in that month (previously it did +/- 30 days)
- the system predicate parser now reassigns the '=' in a given 'system:time_type = time_delta' to '~='
misc
- 'sort files by import time' now sorts files correctly even when two files were imported in the same second. thanks to the user who thought of the solution here!
- the 'recent' system predicates you see listed in the 'flesh out system pred' dialogs now have a 'X' button that lets you remove them from the recent/favourites
- fixed the crash that I disabled some code for last week and reactivated the code. the collect-by dropdown is back to refreshing itself whenever you change the settings in options->sort/collect. furthermore, this guy now spams less behind the scenes, only reinitialising if there are actual changes to the sort/collect settings
- brushed up some network content-range checking logic. this data is tracked better, and now any time a given 206 range response has insufficient data for what its header said, this is noted in the log. it doesn't raise an error, and the network job will still try to resume from the truncated point, but let's see how widespread this is. if a server delivers more data than specified, this now does raise an error
- fixed a tiny bit of logic in how the server calculates changes in sibling and parent petition counts. I am not sure if I fixed the miscount the janitors have seen
- if a janitor asks for a petition and the current petition count for that type is miscounted, leading to a 404, the server now quickly recalculates that number for the next request
- updated the system predicate parser to replace all underscores with whitespace, so it can accept system predicates that use_underscores_instead_of_whilespace. I don't think this messes up any of the parsing except in an odd case where a file service might have an underscore'd name, but we'll cross that bridge if and when we get to it
- added information about 'PRAGMA quick_check;' to 'help my db is broke.txt'
- patched a unit test that would rarely fail because of random data (issue #1217)
client api
- /get_files/search_files:
- fixed the recent bug where an empty tag input with 'search all' permission would raise an error. entering no search predicates now returns an empty list in all cases, no matter your permissions (issue #1250)
- entering invalid tags now raises a 400 error
- improved the tag permissions check. only non-wildcard tags are now tested against the filter
- updated my unit tests to catch these cases
- /add_tags/search_tags:
- a unit test now explicitly tests that empty autocomplete input results in no tags
- the Client API now responds with Access-Control-Max-Age=86400 on OPTIONS checks, which should reduce some CORS pre-flight spam
- client api version is now 34
misc cleanup
- cleaned up the signalling code in the 'recent system predicate' buttons
- shuffled some page widget and layout code to make the embedded a/c dropdown work
- deleted a bunch of a/c event handling and forced layout and other garbage code
- worked on some linter warnings