Skip to content

implement basic categories support for thread index#89

Merged
cblgh merged 7 commits intomainfrom
index-categories
Nov 22, 2024
Merged

implement basic categories support for thread index#89
cblgh merged 7 commits intomainfrom
index-categories

Conversation

@cblgh
Copy link
Copy Markdown
Owner

@cblgh cblgh commented Nov 19, 2024

this feature has been discussed previously:

2024-11-19-164124_1920x1080_scrot

a category is defined as the first bracketed string that can be found in a thread title, e.g. [events] cerca dev circle.

to mitigate the proliferation of multiple tags for the same category, the category names are inflected to only represent it in singular form: events -> event

a category is defined as the first bracketed string that can be found in
a thread title, e.g. `[events] cerca dev circle`.

to mitigate the proliferation of multiple tags for the same category,
the category names are inflected to only represent it in singular form:
events -> event
@cblgh
Copy link
Copy Markdown
Owner Author

cblgh commented Nov 19, 2024

cc @decentral1se :> currently working on this and happy to hear about any viewpoints!


a separate issue is that the later go versions (i have 1.23 installed on this computer) basically forces a high minimum level of the go version and go toolchain in go.mod, see golang/go#65751. you can no longer install a go module without it updating go.mod in this fashion. it doesn't even let you go run until you acquiesce and run go mod tidy 😾

@decentral1se
Copy link
Copy Markdown
Contributor

This is already pretty damn cool!

Just had a play with it. I noticed two things (probably on your radar but anyway). 1) the "filter" button appears when there are no threads. 2) a thread title like [chaos is chaos] foobar gets trimmed to this filter chaos is chao.

I'm unsure if inflecting something like [categories] -> category is not just begging for a bug report from someone demanding complaining that they wanted "categories" as the filter 😂

I think that if the design is documented and people can get along with the limitations, this will work out just fine.

a separate issue is that the later go versions (i have 1.23 installed on this computer) basically forces a high minimum level of the go version and go toolchain in go.mod, see golang/go#65751. you can no longer install a go module without it updating go.mod in this fashion. it doesn't even let you go run until you acquiesce and run go mod tidy 😾

I noticed this as well. Not sure what to do but I'm basically working with a constantly modified go.mod/sum. I mostly follow the latest version for e.g. speed/size optimisations. I'm fine to follow your chosen version for now and we see how to deal with this later when portability is a focus?

@cblgh cblgh marked this pull request as draft November 20, 2024 09:12
@cblgh
Copy link
Copy Markdown
Owner Author

cblgh commented Nov 20, 2024

woop! good points raised! i had not thought of them yet :>

forgot to set this as a wip, i've only put an hour and change into it while keyboarding away at a library. there's some more subtle parts i want to have implemented before it's ready for prime time

[chaos is chaos] foobar gets trimmed to this filter chaos is chao.
+
I'm unsure if inflecting something like [categories] -> category is not just begging for a bug report from someone demanding complaining that they wanted "categories" as the filter 😂

it is trueeee but i also really want to help reduce the multiplication of stupidly similar categories >.< this is why i don't like tag-based systems...........

I noticed this as well. Not sure what to do but I'm basically working with a constantly modified go.mod/sum. I mostly follow the latest version for e.g. speed/size optimisations. I'm fine to follow your chosen version for now and we see how to deal with this later when portability is a focus?

alright, i think i'll reluctantly cave in and then we can circle back to see what/if anything can be done. sucks though

revamped the solution for determining the sort order of threads on the
index page. instead of requiring the url params to always be present to
determine the order, we now use the latest setting and remember it in
the session cookies.

the reason behind this is so that we can combine sort order and filter
categories without having to go through too many gymnastics. the
resulting solution seems to be appropriate based on the small addition
it resulted in.
@cblgh cblgh marked this pull request as ready for review November 21, 2024 11:13
@cblgh
Copy link
Copy Markdown
Owner Author

cblgh commented Nov 21, 2024

@decentral1se alright this a v1 for me! give 'er a spin? still mulling about the inflection business btw. i think i need to come up with some plausible examples for actual categories / topics where the inflection will be bothersome to be convinced

edit: i removed inflection X) makes the edit title feature a lot more important! :>

@cblgh cblgh force-pushed the index-categories branch 3 times, most recently from 155e3c4 to 074a5a7 Compare November 21, 2024 11:21
…ute changes

session code: reduce repetition and use constants to represent keys
@decentral1se
Copy link
Copy Markdown
Contributor

Oh very nice. I think you could merge it as-is!

2 thoughts:

  1. When filtering, there is no visual indication that you are filtering because the filter list is behind a <detail>. People might think they're viewing the entire list but they're still on some session stored filter (i.e when they come back "later")?

  2. Should there be a "reset" button? If you have a big list of filters, then you have to click / unclick them all?

@cblgh
Copy link
Copy Markdown
Owner Author

cblgh commented Nov 21, 2024

ayy great ideas, i've added them! how do they look?

@decentral1se
Copy link
Copy Markdown
Contributor

Perfect, merrrgeeeeeeeee 🎉

@cblgh cblgh merged commit a5837ac into main Nov 22, 2024
@cblgh cblgh deleted the index-categories branch November 22, 2024 08:44
@cblgh cblgh mentioned this pull request Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants