~ihabunek

Zagreb, Croatia

~ihabunek/toot-discuss

Last active a month ago
View more

Recent activity

Re: [PATCH core.sr.hr] Implement markdown checkbox lists with icons a month 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 a month 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 a month 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 a month 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 a month 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]

[PATCH core.sr.hr 0/1] Markdown checklists using icons a month ago

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

This is the second option.

In my opinion this looks nicer, is immutable, but renders a bunch of
svg and allows adding some svg elements to the markdown whitelist.

Your pick.

Ivan Habunek (1):
  Implement markdown checkbox lists with icons

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

[PATCH core.sr.hr 1/1] Implement markdown checkbox lists with inputs a month ago

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

---
 srht/markdown.py | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/srht/markdown.py b/srht/markdown.py
index b48d2a4..5a69a1b 100644
--- a/srht/markdown.py
+++ b/srht/markdown.py
@@ -10,7 +10,7 @@ import bleach
import misaka as m
import re

SRHT_MARKDOWN_VERSION = 4
SRHT_MARKDOWN_VERSION = 5
[message trimmed]

[PATCH core.sr.hr 0/1] Markdown checklists using inputs a month ago

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

This is the first option.

It has the advantage of being very simple, but looks kinda crap on some
browsers since the inputs need to be disabled to make them immutable.

Ivan Habunek (1):
  Implement markdown checkbox lists with inputs

 srht/markdown.py | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

-- 
2.26.2

Re: [PATCH] Fix crash on empty timeline a month ago

From Ivan Habunek to ~ihabunek/toot-discuss

Thanks!

-- Ivan

[PATCH todo.sr.ht 1/1] Implement ticket ordering a month ago

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

---
 todosrht/blueprints/tracker.py |  3 +--
 todosrht/search.py             | 32 +++++++++++++++++++++++++++++---
 2 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/todosrht/blueprints/tracker.py b/todosrht/blueprints/tracker.py
index 6ef75fc..34e9fc2 100644
--- a/todosrht/blueprints/tracker.py
+++ b/todosrht/blueprints/tracker.py
@@ -74,8 +74,7 @@ def return_tracker(tracker, access, **kwargs):
    tickets = (Ticket.query
        .filter(Ticket.tracker_id == tracker.id)
        .options(subqueryload(Ticket.labels))
        .options(subqueryload(Ticket.submitter))
[message trimmed]