summaryrefslogtreecommitdiff
path: root/lib/VNWeb/Chars/List.pm
AgeCommit message (Collapse)AuthorFilesLines
2024-03-11Don't throw an error on multiple 'fil' query paramsYorhel1-1/+1
2023-10-10Validation: Remove "required" and be explicit about optional fieldsYorhel1-1/+1
See TUWF commit fd3d2ca6a18222dafaa13dbcb7a6ccce1c4d9e6e Fixes https://vndb.org/t2520.822 and a few related bugs. (I may have introduced a few new bugs with this, let's see...)
2023-06-22AdvSearch: Move save/load button + always display the thingYorhel1-2/+1
So that the save/load functionality is also available on a user's list. Suggested by https://vndb.org/t950.1537
2023-05-05CSS: Use semantic tags + flexbox for global layoutYorhel1-4/+4
Hopefully without breaking anything. Switched to using flexbox for the homepage boxes instead of grid, in order to fix an overflow issue on Pale Moon. But I later fixed a similar issue with the relation graphs and history tables, so perhaps that switch wasn't necessary.
2023-04-25CSS: Unique classes for icons + generated dimensionsYorhel1-2/+2
Unique classes have lower chance of clashing with anything else. Automatically generating the dimensions increases the size of the CSS file a bit, but it simplifies maintenance. The only thing that's still done manually is the selection between the .svg and .png image.
2023-04-22JS: Migrate TableOpts from Elm + support view switch without JSYorhel1-1/+1
Honestly, this is all pretty pointless. I expect we'll see some real wins in the conversion of the UList & AdvSearch stuff, but I'm not very motivated to work on that soon.
2023-04-15CSS: Stop abusing <b> for grayedout, use <small> insteadYorhel1-2/+2
Which is also kind of an abuse, but at least the semantics are much closer. (Next up: the standout class. Slowly working towards a "font: inherit" and "color: inherit" reset, which'll remove the need for a bunch of ugly workarounds)
2023-03-24Search backend changes: faster results with trigram index + rankingYorhel1-5/+7
With this ranking system, searching for titles like 'L' and 'ONE.' is now at least possible, and YU-NO at least shows up on the first page when searching for "yu no". The actual normalization and matching algorithm hasn't really changed, except that all search terms must now match a single title, but there's still a whole bunch of false positives. Ranking is not available through the API yet. The trigram index should make it possible to do site-wide searching at a more reasonable speed, I'll experiment with that later.
2023-03-09TitlePrefs: Also apply prefs to character namesYorhel1-8/+8
2023-02-19Rework passing around entry titles + add proper HTML5 'lang' attrsYorhel1-4/+4
This is a huge back-end change for a small benefit, but it also improves consistency a bit in the way that titles are handled and passed around. The Elm code still uses separate title/alttitle fields at various places, not sure if I want to bother converting that, too. I'm sure there's bugs, given how many files this touches.
2023-02-02Refactor part 2: get rid of temporary vnt/releasest viewsYorhel1-1/+1
Instead using the static view for the default title preferences, inline SELECT statements for custom preferences and wonderful vnt()/releasest() SQL functions for item_info(). Performance wise I don't expect much of a difference, except there's fewer writes and less per-page overhead from the CREATE TEMPORARY VIEW commands. Primary motivation for these changes is so that we can extend title preferences to other database types without incurring more overhead by needing to create more views.
2022-02-08VN: Add support for multiple titles in different languagesYorhel1-4/+4
This implements the main database model part of custom title languages (https://vndb.org/t12465). Selecting the right title for display is done in SQL through the 'vnt' VIEW, which can be overridden in each session with a TEMPORARY VIEW in order to support user title preferences, but that part has not been implemented yet. I had started out using an sql_vn() function that returned a subquery instead of using a VIEW, but then ran into trouble with the item_info() SQL function. This VIEW approach also happened to simplify much of the code. I did have to get rid of the Discusssions::Lib::sql_boards() function, as Postgres was unable to optimize the subquery inside a UNION inside a subquery for some reason. Haven't run into any other noticeable performance regressions yet. TODO: - Implement actual user title preferences - Add the correct 'lang' HTML attributes everywhere a title is displayed (we do have the information now, though it still isn't trivial) - Add title fetching support to API
2021-11-20SQL: Standardize & simplify first-char matchingYorhel1-2/+1
2021-11-19Search adjustments + use new search for producers,staff,characters tooYorhel1-6/+2
2021-07-02Chars::List: Hide VN if thats a spoilerYorhel1-1/+1
Fixes https://vndb.org/t2520.575
2021-06-24VN::List: Bad attempt at a grid modeYorhel1-5/+1
2021-06-23Chars::List: Fix perl warning when char has no imageYorhel1-1/+1
2021-06-23Chars::List: Attempt to improve grid viewYorhel1-11/+9
2021-03-05Chars::List: Remove image overlay in card/grid mode + minor style improvementsYorhel1-4/+4
I added a function to image_() to specify a custom overlay, which probably isn't too useful for character grid, but other items may want to display other useful info on overlay. ...but that really requires a fixed-size image box or something, which image_() doesn't do, so it probably isn't useful at all.
2021-03-01SQL: vndbid data type conversion for most DB entriesYorhel1-7/+7
I had wanted to split this up into multiple commits and roll out in stages, but couldn't really find a natural way to do so. There are several places that take a generic identifier and expect it to work the same for all entries they support, so changing one entry at a time wasn't going to be any easier. Only the tags & traits haven't been updated yet, I'll convert those later. While this is a major change and affects a lot of code, the individual changes are all pretty simple. I'm surprised how much code did not have to be updated at all. No doubt I've missed a few places, though, so this commit will almost certainly break something.
2021-02-22TableOpts: Add option to save settings as defaultYorhel1-1/+3
This requires an update of TUWF to commit 6e371d3dbd5b5e158c125e4e0dbcb034e1ea496f
2021-02-22Chars::List: Add over-engineered TableOpts abstraction + crude options UIYorhel1-15/+16
The TableOpts abstraction is supposed to be used for other tables as well, eventually. It's overkill for the character list. It's also slightly more complex than necessary because I want shorter URLs.
2021-02-20Chars::List: Add experimental grid modeYorhel1-3/+20
2021-02-20Chars::List: Add experimental card layoutYorhel1-2/+29
2021-01-29AdvSearch: Convert old-url redirects into permanent redirectsYorhel1-1/+1
I had them as temporary redirects in order to safely handle a rollback, but that won't be necessary anymore.
2021-01-29Chars::List: Fix duplicate listing of VNsYorhel1-1/+1
Fixes the second part of https://vndb.org/t2520.538
2021-01-21AdvSearch: Stop logging filter compatibility conversion errorsYorhel1-5/+1
I think I've seen all the possible errors by now, what remains are invalid/corrupted filter strings that aren't very interesting to handle.
2021-01-17Chars::List: Fix trying to convert empty old filtersYorhel1-1/+2
i.e. when the old filter consists only of a 'tagspoil' key.
2021-01-16TraitPage: Rewrite to use new AdvSearch systemYorhel1-8/+14
Largely a copy-paste from TagPage.
2021-01-16Chars::List: Switch to new AdvSearch systemYorhel1-0/+106
TODO: Add VN subquery and migrate trait pages.