Commit Graph

1061 Commits

Author SHA1 Message Date
rr-
5b565e3b00 client/errors: show errors in inline Markdown 2016-09-10 11:36:02 +02:00
rr-
e05e0e5fd2 client/util: refactor Markdown formatter code 2016-09-10 11:36:02 +02:00
rr-
16d04adde0 server/errors: add and document error codes 2016-09-10 11:36:01 +02:00
rr-
8674c8b50e server/posts: report duplicate post ID and URL 2016-09-10 10:16:14 +02:00
rr-
0a19e7bbd0 server/errors: allow extra info in errors 2016-09-10 10:16:14 +02:00
rr-
c516030c66 server/tests: fix info api tests 2016-09-10 10:12:43 +02:00
rr-
2c283f3058 client/posts: move submit buttons to top 2016-09-10 09:57:20 +02:00
rr-
b829f89f1b client/posts: change 'submit'->'save' in edit form 2016-09-10 09:50:58 +02:00
rr-
a905410b84 docs/readme: add proper readme 2016-09-08 18:13:24 +02:00
rr-
724bfe5a98 docs/license: add license 2016-09-08 18:09:24 +02:00
rr-
84a414c779 server/config: relax tag name limitations 2016-09-04 02:07:22 +02:00
rr-
7fa8593b0a client/general: improve URL escaping
Specifically, cater for /, + and % in URL components.
2016-09-04 02:07:22 +02:00
rr-
a22fe306d1 server/posts: fix deleting posts with relations 2016-08-31 22:49:45 +02:00
rr-
eff0e002f2 server/info: increase hdd usage cache time to 48h 2016-08-31 22:22:06 +02:00
rr-
988664117a client/posts: don't show notes on flash posts 2016-08-31 22:20:21 +02:00
rr-
acd989cabb client/tags: fix URL redirections
User controller didn't need intervention but I refactored it to match
tag controller anyway.
2016-08-28 23:57:53 +02:00
rr-
997eb3de63 client/tags: fix detecting changes to names
Since 243ab15 the order of tag aliases matters, so the changes need to
pick up also permuting - which were ignored before.
2016-08-28 23:48:50 +02:00
rr-
4bfdd4c5cb client/notes: don't steal arrow keys in textarea 2016-08-28 23:40:28 +02:00
rr-
dfc65e5a7c client/general: add < > vim navigation hints
For example, in Vimperator, one now can navigate to previous/next page
or post by pressing f< or f>.
2016-08-28 23:40:28 +02:00
rr-
5a152dbc0c client/search: go back to page 1 on query change 2016-08-28 23:40:28 +02:00
rr-
e4f9c26776 client/posts: go back to page 1 on safety change 2016-08-28 23:40:28 +02:00
rr-
cf1d15354d client/paging: avoid redrawing header navigation 2016-08-28 23:40:28 +02:00
rr-
e83e1b06a1 client/general: remove spurious console.log 2016-08-28 22:23:20 +02:00
rr-
79d7b83e39 client/posts: fix mass tag 2016-08-28 22:23:20 +02:00
rr-
6b042504b0 client/home: fix reporting backend errors
The code mistakenly referred to a non-existing field. Now it matches the
rest of the error handlers.
2016-08-28 20:00:50 +02:00
rr-
6d0bf90b47 client/css: fix ghost margins for messages 2016-08-28 20:00:50 +02:00
rr-
243ab15b85 server/tags: add order to tag names
The better implementation of a224297.

Fixes ability to reorder tag aliases, especially - the ability to change
the tag's primary name after it was created. Until now, both of these
scenarios needed sad workarounds on the user part.
2016-08-28 20:00:50 +02:00
rr-
c366b608da server/search: fix negating complex searches
Entering:

    miko -miko

is a contradiction that shouldn't have been returning any matches, but
it has nonetheless. This change fixes the construction of negated
expressions that use subqueries.
2016-08-28 18:43:05 +02:00
rr-
22342a29ad client/file-dropper: fix URL validation 2016-08-27 23:45:07 +02:00
rr-
9dc438c391 client/expanders: fix setting empty expander title 2016-08-27 22:19:01 +02:00
rr-
63ec28ddb3 client/posts: don't show notes on videos 2016-08-27 22:19:01 +02:00
rr-
02d631a65d client/css: improve appearance on small screens 2016-08-27 22:19:01 +02:00
rr-
f63d024777 client/css: improve comment edit form background
If text area was bigger than the post, switching to preview mode
showed gray space under the text. Now the preview pane's background
should fill the whole edit box size.
2016-08-27 22:19:01 +02:00
rr-
514c4349e0 client/css: split into files 2016-08-27 22:19:01 +02:00
rr-
702ec3e6fe client/settings: increase default post count to 42
Since on big resolutions the posts use 7 columns, it makes sense to use
a multiple of that.
2016-08-27 22:19:01 +02:00
rr-
473f2a4ddc client/posts: make rating icons consistent 2016-08-27 22:19:01 +02:00
rr-
3c5878cb16 server/tags: improve tag list performance 2016-08-27 22:19:01 +02:00
rr-
c21309aa35 client/models: don't modify API responses
API responses are cached internally - if they're modified, they're
modified in cache too. This can lead to certain anomalies, that can be
easily solved by making object copies.
2016-08-27 15:39:47 +02:00
rr-
63e8683fb8 client/tags: change 'edit time' to 'created on' 2016-08-27 15:29:40 +02:00
rr-
ef0f74297f server/tag-categories: fix default categories
- Don't cache default category in its entirety - cache only its name
- Purge cache on category name changes and default category changes
- Lock records for updates where applicable
2016-08-27 12:39:59 +02:00
rr-
06ab98fa70 server/search: fix sort:random breaking tags
Using sqlalchemy's subqueryload to fetch tags works like this:

1. Get basic info about posts with query X
2. Copy query X
3. SELECT all tags WHERE post_id IN (SELECT post_ids FROM query X)
4. Associate the resulting tags with the posts

When original query contains .order_by(func.random()), it looks like
this:

1. SELECT post.* FROM post ORDER BY random() LIMIT 10
2. Copy "ORDER BY random() LIMIT 10"
3. SELECT tag.* FROM tag WHERE tag.post_id IN (
       SELECT id FROM post ORDER BY random() LIMIT 10)
4. Disaster! Each post now has completely arbitrary tags!

To circumvent this, we replace eager loading with lazy loading. This
generates one extra query for each result row, but it has no chance of
producing such anomalies. This behavior is activated only for
queries containing "sort:random" and derivatives so it shouldn't hit
performance too much.
2016-08-27 01:21:59 +02:00
rr-
f8e91a10e8 server/search: refactor query factories 2016-08-27 01:19:29 +02:00
rr-
8f230f5701 client/css: fix wrapping tags in read-only sidebar 2016-08-26 23:52:03 +02:00
rr-
6d26b5c37a server/search: fix sort:random 2016-08-26 23:27:33 +02:00
rr-
fa60b42f65 server/search: improve post list performance 2016-08-26 17:57:20 +02:00
rr-
422b99ac8d server/search: add content-checksum 2016-08-26 16:26:06 +02:00
rr-
ffb87f1650 server/posts: defer flush; save content lazily
Rather than flushing the post right away only to find out that there
were validation errors, try to postpone flushing for as long as
possible.

The previous behavior has led to too eager spending of post IDs - each
flush calls nextval(post_id_seq), and postgres sequences are not
affected by transaction rollbacks, so each erroneous post creation
discarded a post ID, which has led to gaps in post IDs.
2016-08-26 15:09:08 +02:00
rr-
bb369efa99 server/general: disable autoflush 2016-08-26 14:41:05 +02:00
rr-
7451d16baf client/css: fix tag list style 2016-08-25 00:04:34 +02:00
rr-
9283851862 client/css: don't wrap long file names 2016-08-24 13:32:44 +02:00