Age | Commit message (Collapse) | Author | Files | Lines |
|
Abstract it out of the Release edit form (easy, I had written it with
re-use in mind) and fix it to support NULLable fields.
|
|
|
|
Unfinished, primarily for testing.
https://vndb.org/t20399.36
|
|
This one got priority because many people appear to be stumbling on the
URL validation bug in this form. Staff edit form is still affected by
it, but that's less commonly a problem.
New form also doesn't pre-fill a language anymore and instead requires
the user to input one manually. Fixes a problem with non-JP producer
entries having JP selected by default.
|
|
Main problems I ran into:
- Not all browsers (especially true for mobile browsers) support
reportValidity(), so we need custom reporting anyway.
- Some browsers (or addons, dunno) completely ignore form validation and
pretend everything is valid; those users will not have a very good
experience.
- setCustomValidity() only works on 'willValidate' form elements, which
means we need additional custom reporting for errors that do not apply
to such elements.
- 'minlength' doesn't work at all when the input's value is set by JS.
- Getting reportValidity() to work with FormTabs was extremely awkward.
Sad, because the idea of offloading form validation and reporting to the
browser is actually a pretty useful idea.
Anyway, this custom implementation should be more robust. Also provides
much better feedback on invalid usernames.
|
|
This completes the form, but I rushed it a bit so there's bound to be
some issues left.
|
|
|
|
|
|
I'm not sold on the validity API at all.
|
|
|
|
Multiselection thingy was easier than I expected, but the UI doesn't
feel quite right somehow. :/
|
|
in dropdown selector
|
|
tweaking
|
|
Yak shaving at its finest. I was working on an edit form for the new
franchises system, but then realized that the form JS and HTML kind of
sucked and a completely new form isn't the best way to experiment with a
new implementation. I also had some ideas to improve the user edit form,
so decided to rewrite that first, but then realized it's better to lay
down a smaller foundation before doing the complex stuff. So here we
are, a completely useless rewrite of a tiny little login form.
But I did improve error messages a bit while I was at it.
There's still a bunch of unknowns regarding form implementations: to see
if there's a more convenient way to set custom validations; to see if
HTML5 validation works well with form tabs; to see if URL fragments can
be used to select form tabs; mobile-friendly form layouts (should be
easier with this new approach); dropdown search improvements, etc. The
user edit form should prove a good testing ground for all of that.
|
|
Yay!
There are no more request handlers in the VNDB::* namespace and no more
Javascript in data/js/. This cleans up a lot of old legacy code that
wasn't fun to maintain.
|
|
Had been planning to use a more powerful preprocessor for CSS for a
while, so that I can also reorganize and clean up the CSS a bit. The
cleanup will come later, this is the first step to reorganize the build
system a bit and remove skingen.pl.
I moved all generated static assets to static/g/ (for _g_enerated),
including icons.png and js files. This simplifies management of
static/f/ and static/s/, which are fully in git.
Skins are now defined as sass files in css/skins/ with their images in
static/s/ using plain directory structure.
|
|
The resolution field now works much like the engine field.
|
|
|
|
https://vndb.org/t950.634
|
|
This gets rid of global.pl, config.pl and config3.pl and uses the
cleaner config3.pl format for the config file. The config is easily
accessible from anywhere by importing the new VNDB::Config module; The
global $VNDB::S,O,M,ROOT variables have been removed.
Sorry for all the churn...
|
|
|
|
|
|
|
|
|
|
|
|
I did create a function to export arrays, but ended up exporting them as
hashes. That ought to simplify a conversion to an enum type. Which will
likely never happen because I'd rather switch to dynamic user-defined
statuses, but that's quite a step further...
|
|
|
|
|
|
Part one in converting data/global.pl lists into a separate VNDB::Types
module. This is basically what I had started with VN3::Types, but it
looks like a gradual rewrite/cleanup may be more successful. At least
it'll be more useful on the short term.
|
|
Similar to previous commit.
|
|
Been wanting to do this for a long time - using an integer index into an
array that changes once in a while is way too fragile. Doubly so when
said indices are also used in filters and URLs that can't be updated
every time a new resolution is added.
|
|
|
|
This has been mostly automated.
|
|
I definitely needed the Tie::IxHash thing for these.
|
|
This removes the reliance on sort() to provide meaningful ordering (the
keys aren't always good for ordering) and removes the 'order' hack used
for (vn|prod)_relations.
|
|
|
|
|
|
|
|
Compresses a little better. I reduced the number of iterations required
to find the optimal image size in spritegen.pl, but generating the
icons.png is *incredibly slow* when combining zopflipng with the 'slow'
option. It's possible to parallelize the calculation and use multiple
cores to speed it up, but that seems overkill.
Some icons.png compression stats:
METHOD SIZE RUNTIME
default 18103 <1sec
slow 17941 few secs
pngcrush 15385 <1sec
pngcrush+slow 15148 few mins
zopflipng 14986 few secs
zopflipng+slow 14898 ~1 hour
|
|
Tends to compress a bit better than JavaScript::Minifier::JS. But is
also a lot slower, so not really useful when devving.
Stats for en.js:
raw gzip
uglifyjs 68199 19446
JS::Minifier::XS 79862 21624
Uncompressed 107662 28663
On an unrelated note, I like how jQuery boasts about being "Only 32kB
minified and gzipped.". That's quite a bit more than all of VNDB's
Javascript combined. For a damn library.
|
|
This simplifies the JS code in some places and removes a whole number of
L10N strings from the "l10n_str" var, thus shrinking the JS size a bit
(uncompressed about 1500 bytes, in fact. 500 bytes after gzip).
|
|
This simplifies the JS version of mt() a bit and makes the whole
internationalization framework a bit more robust. I also changed the
VARS.{rlist_status,age_ratings,languages,platforms,char_roles} arrays to
include the L10N string. This simplifies the JS code and reduces the JS
size. There's a few more of such lists that can be transformed in the
same way, I'll get to that later.
|
|
This removes the need to indent all files and add the anonymous function
manually, and it also provides clean and consistent semantics.
I already rewrote the library-like files earlier on to add their public
interfaces to the window object, so everything should keep working after
this change. It's still possible that some files use use a function from
another non-library file. Those will break, but I'm sure such cases will
be found soon enough, if they exist.
|
|
This removes one source of namespace polution, and makes it more clear
which code is using the variables.
|
|
First part of a Javascript cleanup.
|
|
|
|
|
|
|
|
|
|
Still somewhat quircky, but it works.
|