Jump to content

PW 3.0.108 – Core updates


Recommended Posts

Continuing from last week's post, ProcessWire 3.0.108 is now available on the dev branch, and it adds support for a new, more powerful live search in the admin. This week we will take a closer look at how it works, as well as how module developers can make their modules searchable too.

https://processwire.com/blog/posts/pw-3.0.108/

  • Like 12
Link to post
Share on other sites

Thanks for the new search features @ryan!

I wonder if the keyword to bring up the search help should be something less likely to be typed in by a site editor, e.g. "~help". Because it's not that unlikely that an editor might want to find a page with the word "help" in it. To test I created a page titled "Help" and that was not included in the results when I searched "help".

The option to include search results from a module sounds interesting but I'm struggling to think of an existing module that might want to give search results other than pages. Maybe @adrian's Admin Actions module? What sorts of modules do you think would use that feature?

  • Like 2
Link to post
Share on other sites
9 hours ago, Robin S said:

What sorts of modules do you think would use that feature?

Let's say you have custom "non-pw" db tables.

 

9 hours ago, Robin S said:

help should be something less likely to be typed in by a site editor

+1 This sprung into my mind too when reading the post. What about being configurable? For example, I would prefer: --?

  • Like 2
Link to post
Share on other sites

Instead of a command, i'd simply include a ? Icon somewhere in the ui where you can click and get the infos… via tool-tip or toggeling a accodion section or any other form…

Or, you could display the help info when clicking into the box right away, the same way spotlight does it:

0182-new-features.jpg.4192cafb7f047892889775991e19b92f.jpg

 

  • Like 2
Link to post
Share on other sites
2 hours ago, Noel Boss said:

Instead of a command, i'd simply include a ? Icon somewhere in the ui

What about a command AND the icon too?

2 hours ago, Noel Boss said:

Or, you could display the help info when clicking into the box right away, the same way spotlight does it:

Maybe optionally. I do not like panels automatically covering anything.

Link to post
Share on other sites
1 hour ago, szabesz said:

I do not like panels automatically covering anything.

I did note find a screenshot of Spotlight no the Mac, there it does not cover everything but just an extension below the search field – more or less exactly linke it is now, as a dropdown when you type the help command – as a first row of results. But before the actual results appear and you type anythin.

Hmmm... Duckduckgo did not find anything, google does:

spotlight_window_new-100525223-large-980x450.png.f6cbb1c3c563fbf19c8d982c6affd4ea.png

  • Like 1
Link to post
Share on other sites
31 minutes ago, Noel Boss said:

does not cover everything

Sure, the example does not cover "everything" but some part of the screen. On a PW edit page, the most important bits of information are usually at the very top, so anything covering that area "automatically" is not something I prefer. Sure, when we start typing results start to cover that area but I'm not fond of covering anything just by getting the focus into the search box.

Link to post
Share on other sites
21 hours ago, matjazp said:

How could I find the page with specific id? I tried id=1234 but shows 0 results. How do I get the previous page search where I could specify "What pages to show"?

pages.id=1234

eventually 😄 

Link to post
Share on other sites
Quote

I wonder if the keyword to bring up the search help should be something less likely to be typed in by a site editor, e.g. "~help". Because it's not that unlikely that an editor might want to find a page with the word "help" in it. To test I created a page titled "Help" and that was not included in the results when I searched "help".

Maybe we can support other options here, though I'm not going to be able to remember special characters or combinations in this (or be able to easily communicate that to others), just need to keep it as straightforward as possible. I did try "?" but it's too short for autocomplete. I'm not too worried about people not being able to search for "help", as I'm guessing it's pretty rare, and there's already the much more power Pages > Find, if someone can't accomplish something with the live search. 

Also, this help thing was really about introducing the feature and communicate how to use it in the blog post. I added it last minute as part of writing the blog post, and not certain it's really needed or will stay long term. Though if it did stick around, I suppose it could show a "type 'help' for instructions" link in a tiny dropdown when you are focused in an empty search box. 

Quote

The option to include search results from a module sounds interesting but I'm struggling to think of an existing module that might want to give search results other than pages. Maybe @adrian's Admin Actions module? What sorts of modules do you think would use that feature?

Any module that manages items of any sort. In the core, these modules implement the searchable interface: ProcessField, ProcessTemplate, ProcessCommentsManager, ProcessPageType, ProcessUser. I left pages and modules implemented internally, because it ended up being more efficient to do so. I can't speak to other people's modules, but for me I'm adding support in FormBuilder, DatabaseBackups, HannaCode and ProcessWireAPI. 

Quote

How could I find the page with specific id? I tried id=1234 but shows 0 results. How do I get the previous page search where I could specify "What pages to show"?

This is primarily a text searching engine. I wasn't thinking folks would search for pages by ID in this search box. But it looks like "id==1001" or "pages.id==1001" does work (like rafaoski mentioned). I'm not sure I understand what you mean about getting your previous search, this sounds more like Lister?

  • Like 1
Link to post
Share on other sites

Thanks for the answers!

5 hours ago, zoeck said:

pages.id=1234

Tried that and didn't work.

4 hours ago, rafaoski said:

You can try pages.id==1234

It seems to me that in the settings the search appliance looks for similar expressions instead of identical ones which you change with the operator's ( == )

Yes, this works.

2 hours ago, ryan said:

This is primarily a text searching engine. I wasn't thinking folks would search for pages by ID in this search box. But it looks like "id==1001" or "pages.id==1001" does work (like rafaoski mentioned). I'm not sure I understand what you mean about getting your previous search, this sounds more like Lister?

Well, there are all kinds of folks 🙂 If I can enter "title=foo" I expected I could also enter "id=1234"... 

What I meant with "What pages to show" is Lister eg. this link: /processwire/page/search/ Maybe this should be the default "result" if the search term is empty and you press enter. Now you get "The process returned no content." and that probably isn't very helpful?

  • Like 3
Link to post
Share on other sites

First of all thank you @ryan for this great addition. I am a heavy user of the page search and use it more often than the page tree. 😃

I am not sure if this is a bug, but I think the new page search breaks the autocompletion of users:

For example if I type in a username in the page search and select the suggested user, I will be redirected to the 404 page in the front-end with following url:
http://example.com/processwire/access/users/username/

Instead the url should be something like this I think:
http://example.com/processwire/access/users/edit/?id=123

Can anyone confirm this or is it maybe something on my side? I have noticed this on two different installations of PW 3.0.108.

Regards, Andreas

  • Like 2
Link to post
Share on other sites
  • 3 weeks later...
On 7/19/2018 at 8:49 PM, AndZyk said:

First of all thank you @ryanI am not sure if this is a bug, but I think the new page search breaks the autocompletion of users:

For example if I type in a username in the page search and select the suggested user, I will be redirected to the 404 page in the front-end with following url:
http://example.com/processwire/access/users/username/

Instead the url should be something like this I think:
http://example.com/processwire/access/users/edit/?id=123

Can anyone confirm this or is it maybe something on my side?

I've also had this problem and opened an issue on github:

https://github.com/processwire/processwire-issues/issues/672

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...