widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #16320
Re: [Merge] lp:~widelands-dev/widelands-website/more_latest_posts into lp:widelands-website
Thanks. I have replied to one of your inline comments below.
About grouping: I agree that this can be confusing. Currently the list is always sorted by the posts dates, so grouping lead into this situation were some topics appear double. Say we have:
post1 created 12.3.2019 in topic foo
post2 created 11.3.2019 in topic bar
post3 created 10.3.2019 in topic baz
post4 created 1.1.2019 in topic foo
Will lead to:
topic foo:
post1 (12.3.2019)
topic bar:
post2 (11.3.1019)
topic baz:
post3 (10.3.2019)
topic foo:
post4 (1.1.2019)
If we change this to something like:
topic foo:
post1 (12.3.2019)
post4 (1.1.2019)
topic bar:
post2 (11.3.1019)
topic baz:
post3 (10.3.2019)
The posts are not sorted by date anymore: A post created yesterday may appear at the bottom of the page then, after several other old posts.
I am unsure about a good grouping. Maybe this should be tested in production to have real time data? Or adding a third option 'no grouping' which shows the posts by date descending and change the grouping by topic/forum to have no double entries?
Diff comments:
>
> === modified file 'pybb/forms.py'
> --- pybb/forms.py 2018-12-21 11:26:08 +0000
> +++ pybb/forms.py 2019-03-18 21:30:36 +0000
> @@ -87,3 +87,17 @@
> post.updated = datetime.now()
> post.save(*args, **kwargs)
> return post
> +
> +
> +class LastPostsDayForm(forms.Form):
> + days = forms.IntegerField(
> + max_value = 1000,
> + min_value = 5,
> + label = 'Show posts created these days before today:'
Can't we have a sentence ending with <form>? The reason to have it like this is accessibility. See the red marked paragraph here: https://wiki.selfhtml.org/wiki/HTML/Formulare/label
> + )
> +
> + sort_by = forms.ChoiceField(
> + #widget = forms.RadioSelect,
> + choices = [('forum','Forum'),('topic', 'Topic'),],
> + label = 'Sort by:',
> + )
--
https://code.launchpad.net/~widelands-dev/widelands-website/more_latest_posts/+merge/364706
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands-website/more_latest_posts into lp:widelands-website.
References