[aur-dev] [PATCH] Limit comment height to 15 lines
Signed-off-by: Eric Engestrom <eric@engestrom.ch> --- web/html/css/aurweb.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/html/css/aurweb.css b/web/html/css/aurweb.css index f5e1037..f777ab8 100644 --- a/web/html/css/aurweb.css +++ b/web/html/css/aurweb.css @@ -148,3 +148,8 @@ label.confirmation, color: red; font-weight: bold; } + +#news div p { + max-height: 15em; + overflow: auto; +} -- 2.7.2
Sorry, I meant to add a comment to that patch :] This is related to the discussion here: https://lists.archlinux.org/pipermail/aur-general/2016-March/032139.html about keeping the AUR readable even when people post huge dumps. The solution suggested here is to make any comment longer than 15 lines appear in its own scrollable box. Cheers, Eric On Sat, Mar 12, 2016 at 02:50:03PM +0000, Eric Engestrom wrote:
Signed-off-by: Eric Engestrom <eric@engestrom.ch> --- web/html/css/aurweb.css | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/web/html/css/aurweb.css b/web/html/css/aurweb.css index f5e1037..f777ab8 100644 --- a/web/html/css/aurweb.css +++ b/web/html/css/aurweb.css @@ -148,3 +148,8 @@ label.confirmation, color: red; font-weight: bold; } + +#news div p { + max-height: 15em; + overflow: auto; +} -- 2.7.2
On Sat, 12 Mar 2016 at 15:50:03, Eric Engestrom wrote:
Signed-off-by: Eric Engestrom <eric@engestrom.ch> --- web/html/css/aurweb.css | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/web/html/css/aurweb.css b/web/html/css/aurweb.css index f5e1037..f777ab8 100644 --- a/web/html/css/aurweb.css +++ b/web/html/css/aurweb.css @@ -148,3 +148,8 @@ label.confirmation, color: red; font-weight: bold; } + +#news div p { + max-height: 15em; + overflow: auto; +}
The idea sounds good, however I am not 100% sure about the implementation. We already do have JavaScript code for collapsing long dependency lists (which we borrowed from archweb). Do we want to use the same code for comments for consistency? It also makes it a bit easier to read long comments since, once you decided that you want to expand it, you no longer need to scroll. On the other hand, I like that this alternative implementation does not require JavaScript... I put your patch on the pu branch for now but I would like to hear some more opinions. Thanks!
-- 2.7.2
On Mar 13, 2016 9:24 AM, "Lukas Fleischer" <lfleischer@archlinux.org> wrote:
On Sat, 12 Mar 2016 at 15:50:03, Eric Engestrom wrote:
Signed-off-by: Eric Engestrom <eric@engestrom.ch> --- web/html/css/aurweb.css | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/web/html/css/aurweb.css b/web/html/css/aurweb.css index f5e1037..f777ab8 100644 --- a/web/html/css/aurweb.css +++ b/web/html/css/aurweb.css @@ -148,3 +148,8 @@ label.confirmation, color: red; font-weight: bold; } + +#news div p { + max-height: 15em; + overflow: auto; +}
The idea sounds good, however I am not 100% sure about the implementation. We already do have JavaScript code for collapsing long dependency lists (which we borrowed from archweb). Do we want to use the same code for comments for consistency? It also makes it a bit easier to read long comments since, once you decided that you want to expand it, you no longer need to scroll. On the other hand, I like that this alternative implementation does not require JavaScript...
I put your patch on the pu branch for now but I would like to hear some more opinions. Thanks!
I am in favor of using JavaScript for the reasons Lukas already mentioned. Once you are willing to read the whole comment it gets annoying to scroll anymore. Furthermore JavaScript is used either way. Best regards, Gordian
* Lukas Fleischer <lfleischer@archlinux.org> (Sun, 13 Mar 2016 09:23:57 +0100):
The idea sounds good, however I am not 100% sure about the implementation. We already do have JavaScript code for collapsing long dependency lists (which we borrowed from archweb). Do we want to use the same code for comments for consistency? It also makes it a bit easier to read long comments since, once you decided that you want to expand it, you no longer need to scroll.
I'm in favour of this approach: right at the moment I'm reading comments to an article (subject doesn't matter) and those are collapsed by default, with a "more" link to show the full contents.
On the other hand, I like that this alternative implementation does not require JavaScript...
I get the point and I don't like heavy JavaScripting on aurweb, but we *can* gracefully degrade the behaviour (by pointing to a page with a collapse comment function). Marcel
participants (4)
-
Eric Engestrom
-
Gordian Edenhofer
-
Lukas Fleischer
-
Marcel Korpel