~ihabunek

Zagreb, Croatia

~ihabunek/triglav-discuss

Last active 3 months ago

~ihabunek/toot-discuss

Last active 7 months ago
View more

Recent activity

[PATCH todo.sr.ht 1/1] Implement ticket ordering 7 months ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

By default order tickets by last updated, if not otherwise defined.
---
 tests/test_search.py           | 115 ++++++++++++++++++++++-----------
 todosrht/blueprints/tracker.py |   3 +-
 todosrht/search.py             |  32 ++++++++-
 3 files changed, 109 insertions(+), 41 deletions(-)

diff --git a/tests/test_search.py b/tests/test_search.py
index 5f87887..624abf5 100644
--- a/tests/test_search.py
+++ b/tests/test_search.py
@@ -1,5 +1,6 @@
import pytest

[message trimmed]

[PATCH todo.sr.ht 0/1] Implement ticket ordering 7 months ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

This adds ordering by id and updated, using ! for reversing, similar to
negation of terms. E.g. sort:updated, !sort:updated.

I wanted to add ordering by number of comments, but it required changing
the base query to include the comment count, which was a pain to get to
work correctly using sqlalchemy so leaving it for later.

Ivan Habunek (1):
  Implement ticket ordering

 tests/test_search.py           | 115 ++++++++++++++++++++++-----------
 todosrht/blueprints/tracker.py |   3 +-
 todosrht/search.py             |  32 ++++++++-
 3 files changed, 109 insertions(+), 41 deletions(-)

Re: [PATCH] Favourites and reblogs also use this id and it's sometimes strings. 7 months ago

From Ivan Habunek to ~ihabunek/toot-discuss

Thanks, applied. Sorry for the longish wait.

Ivan

Re: [PATCH] Reply to non-int, and also longer posts, Pleroma style 8 months ago

From Ivan Habunek to ~ihabunek/toot-discuss

Thanks, applied.

-- Ivan

Re: todo.sr.ht search: reversing order, other sort orders 8 months ago

From Ivan Habunek to ~sircmpwn/sr.ht-discuss

On Fri, 28 Aug 2020, at 21:23, Denis Laxalde wrote:
> It might also be nice to support more than one parameter. E.g.
> "sort=-creation_date,title", meaning sort by creation_date reversed,
> then title.

It might be simpler to specify sort multiple times, e.g. 
`sort=-creation_date sort=title`, or whatever syntax is agreed upon.

I actually have a WIP patch for sorting, could finish it up.

Ivan

Re: [PATCH core.sr.hr] Implement markdown checkbox lists with icons 11 months ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

On Sun, May 24, 2020 at 07:26:18AM +0000, Simon Ser wrote:
> IMHO rendering as checkboxes is already a step forward. I don't mind
> having to edit the Markdown source to update the checkbox status.

I agree with Simon. Having read-only checkboxes is better than not
having them at all.

-- Ivan

Re: [PATCH core.sr.hr 0/1] Markdown checklists using inputs 11 months ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

On Sun, May 24, 2020 at 07:25:01AM +0000, Simon Ser wrote:
> There's a "readonly" attribute that makes it look like regular
> checkboxes while being immutable.

The readonly attribute does not apply to checkboxes unfortunately.

MDN says:
"Note: Only text controls can be made read-only, since for other
controls (such as checkboxes and buttons) there is no useful distinction
between being read-only and being disabled, so the readonly attribute
does not apply."

I would argue that visuals are a useful distinction, but hey.

Re: [PATCH core.sr.hr] Implement markdown checkbox lists with icons 11 months ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

On Sat, May 23, 2020 at 08:43:38AM -0400, Drew DeVault wrote:
> Yeah, it would only work for ticket descriptions. But that's not the
> hard part: the hard part is extending the markdown parser with
> line/colno annotations, so that we know what characterse to edit to
> apply the change.

Is that even possible in Misaka or would you have to change Hoedown?

Apparently FSX is working on replacing Hoedown:
https://github.com/FSX/misaka/issues/69

I can see why this issue is unresolved.

-- Ivan

Re: [PATCH core.sr.hr] Implement markdown checkbox lists with icons 11 months ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

On Sat, May 23, 2020 at 08:40:07AM -0400, Drew DeVault wrote:
> The problem with either approach is that the checklists are read-only.
> Making checklists has never been difficult; making them writable has
> been.

I didn't realize that was a wanted feature. It does complicate things,
e.g. editing comments is not permitted at all currently.

-- Ivan

[PATCH core.sr.hr] Implement markdown checkbox lists with icons 11 months ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

---
 srht/markdown.py                   | 27 +++++++++++++++++++++++++--
 srht/static/icons/check-square.svg |  1 +
 srht/static/icons/square.svg       |  1 +
 3 files changed, 27 insertions(+), 2 deletions(-)
 create mode 100644 srht/static/icons/check-square.svg
 create mode 100644 srht/static/icons/square.svg

diff --git a/srht/markdown.py b/srht/markdown.py
index b48d2a4..9e2fc6b 100644
--- a/srht/markdown.py
+++ b/srht/markdown.py
@@ -10,7 +10,7 @@ import bleach
import misaka as m
[message trimmed]