Discuss Scratch

Jeffalo
Scratcher
1000+ posts

ocular - scratch forum info

breakfast_for_dinner wrote:

Jeffalo wrote:

(#3693)
nobody’s actually found all of my visible forum changes yet - wonder if you can!
did you do this? i don't think i remember this
i didn't touch any of those
breakfast_for_dinner
Scratcher
1000+ posts

ocular - scratch forum info

Jeffalo wrote:

breakfast_for_dinner wrote:

Jeffalo wrote:

(#3693)
nobody’s actually found all of my visible forum changes yet - wonder if you can!
did you do this? i don't think i remember this
i didn't touch any of those
weird it may just be that i haven't really been on that page very much

Last edited by breakfast_for_dinner (July 10, 2024 23:40:58)

Jeffalo
Scratcher
1000+ posts

ocular - scratch forum info

alrighty that's enough scratch forums, back to working on ocular… i fixed user pages, topic pages, and post pages.

i'm working on an advanced search feature.
Jeffalo
Scratcher
1000+ posts

ocular - scratch forum info

introducing: search filtering!

you can now write filters to make some very specific queries, eg. posts by either Jeffalo or DatOneLefty that were edited by scratch team members.



try it now, and let me know what you think https://ocular.jeffalo.net/search

Last edited by Jeffalo (Aug. 5, 2024 21:58:56)

o97doge
Scratcher
500+ posts

ocular - scratch forum info

Jeffalo wrote:

(#3704)
introducing: search filtering!

you can now write filters to make some very specific queries, eg. posts by either Jeffalo or DatOneLefty that were edited by scratch team members.



try it now, and let me know what you think https://ocular.jeffalo.net/search
Now I can see posts written by ceebee that were last edited by Paddle2See.
han614698
Scratcher
1000+ posts

ocular - scratch forum info

Jeffalo wrote:

try it now, and let me know what you think https://ocular.jeffalo.net/search
It's cool, but I'm curious about two things:
  • Is there any way to just type the filter but without a search query? Like, for example I could just show all posts that were “last edited by Paddle2See” without having to type any text?
  • Is there any way for me to show all of my posts that were edited by the ST in general (not a specific user)?
gilbert_given_189
Scratcher
1000+ posts

ocular - scratch forum info

Jeffalo wrote:

introducing: search filtering!

you can now write filters to make some very specific queries, eg. posts by either Jeffalo or DatOneLefty that were edited by scratch team members.



try it now, and let me know what you think https://ocular.jeffalo.net/search
*sniffs* smells like SQL conditions, let me see if I can inject it…
(figures out the error message from entering a semicolon)
oh, it has a filter on it. you beat me this time jefallo
SpyCoderX
Scratcher
1000+ posts

ocular - scratch forum info

gilbert_given_189 wrote:

Jeffalo wrote:

introducing: search filtering!

you can now write filters to make some very specific queries, eg. posts by either Jeffalo or DatOneLefty that were edited by scratch team members.



try it now, and let me know what you think https://ocular.jeffalo.net/search
*sniffs* smells like SQL conditions, let me see if I can inject it…
(figures out the error message from entering a semicolon)
oh, it has a filter on it. you beat me this time jefallo
Literally looks like SQL conditions lol
Maximouse
Scratcher
1000+ posts

ocular - scratch forum info

SpyCoderX wrote:

Literally looks like SQL conditions lol
I think it uses this filter syntax. The list of supported operations is very similar:

Maximouse
Scratcher
1000+ posts

ocular - scratch forum info

Jeffalo wrote:

introducing: search filtering!

you can now write filters to make some very specific queries, eg. posts by either Jeffalo or DatOneLefty that were edited by scratch team members.

[image]

try it now, and let me know what you think https://ocular.jeffalo.net/search
Very useful! I think I found a bug though: typing anything into the filter input clears the search input. Two features I used often in the old version that are currently missing are the ability to filter by status/rank (Scratcher/ST) and search for keywords in the topic title.

What does “quotes” mean? It's on the list of filterable attributes but it seems to always be an empty array.
Maximouse
Scratcher
1000+ posts

ocular - scratch forum info

han614698 wrote:

Is there any way to just type the filter but without a search query? Like, for example I could just show all posts that were “last edited by Paddle2See” without having to type any text?
You can type a space into the “search query” field.
Maximouse
Scratcher
1000+ posts

ocular - scratch forum info

han614698 wrote:

Is there any way for me to show all of my posts that were edited by the ST in general (not a specific user)?
This seems to work:
username = "han614698" AND last_edited_by IS NOT NULL AND NOT last_edited_by = "han614698"

Last edited by Maximouse (Aug. 6, 2024 19:50:44)

Jeffalo
Scratcher
1000+ posts

ocular - scratch forum info

han614698 wrote:

It's cool, but I'm curious about two things:
Is there any way to just type the filter but without a search query? Like, for example I could just show all posts that were “last edited by Paddle2See” without having to type any text?
yup! just searching for a wildcard asterisk (*) seems to work fine!

han614698 wrote:

Is there any way for me to show all of my posts that were edited by the ST in general (not a specific user)?
yup! does this work?
davidtheplatform
Scratcher
500+ posts

ocular - scratch forum info

Where does this get its data from?
Jeffalo
Scratcher
1000+ posts

ocular - scratch forum info

Maximouse wrote:

What does “quotes” mean? It's on the list of filterable attributes but it seems to always be an empty array.

absolutely no clue that comes from scratchdb's meilisearch instance
CST1229
Scratcher
1000+ posts

ocular - scratch forum info

davidtheplatform wrote:

(#3714)
Where does this get its data from?
Still ScratchDB, there's a newer version now.

jeffalo (profile page) wrote:

(https://scratch-mit-edu.ezproxyberklee.flo.org/users/Jeffalo/#comments-340332981)
there’s a new version of scratchdb that some parts of ocular use. when i have time, i’ll fix up the rest of ocular to use it too. there’s more information on the homepage of ocular search i think
Jeffalo
Scratcher
1000+ posts

ocular - scratch forum info

Maximouse wrote:

Very useful! I think I found a bug though: typing anything into the filter input clears the search input
thank you! looks like that's some weird vue 2 reactivity behavior. the legacy ocular codebase is a bit of a mess unfortunately, does anyone know how to fix this?
Pufferfish_Test
Scratcher
500+ posts

ocular - scratch forum info

Jeffalo wrote:

(#3717)
does anyone know how to fix this?
yes
Pufferfish_Test
Scratcher
500+ posts

ocular - scratch forum info

Pufferfish_Test wrote:

(#3718)

Jeffalo wrote:

(#3717)
does anyone know how to fix this?
yes
having said this, npm decided not to work so I can't test my hypothesis. I think if you get rid of the search: blah blah blah in the data bit of the thingy, and then have a function in the thingy like created(){ this.search= blah blh blah }. apologies for my inaccurate vue terminology. this may not work but if it does I expect a fee
Maximouse
Scratcher
1000+ posts

ocular - scratch forum info

Pufferfish_Test wrote:

having said this, npm decided not to work so I can't test my hypothesis. I think if you get rid of the search: blah blah blah in the data bit of the thingy, and then have a function in the thingy like created(){ this.search= blah blh blah }. apologies for my inaccurate vue terminology. this may not work but if it does I expect a fee
It seems to work.

Changing :value=“search” to v-model=“search” also fixes the bug, but it introduces a new one: typing into the search input if the filter is visible but empty hides the filter.

Powered by DjangoBB