Saving Bytes Every Page - Or, How I Learned To Stop Worrying And Enhance Search

Nao

  • Dadman with a boy
  • Posts: 16,080
Quote from Arantor on March 6th, 2013, 02:11 PM
Been busy, sorry, I'll look at it shortly.
So, what do you think..?
Also, I think you missed my bit about thematic groupings of htmlspecialchar & derivates. Although I'm pretty sure you'll disagre... (If only because it requires refactoring everything...)
Quote
Users actually press the button? I thought they just pressed enter for simple searching?
Depends on the user... I usually press Enter myself, but with the big popup, it's tempting to change the settings in there, and the quickest is then to click the Search button...

Anyway, if there's no button, and no JS thus no popup, you still have to rely on JS (AFAIK) to automatically submit the input box when pressing Enter...
Quote
Quote
- Add 'containing all these words..' etc select box to the popup
Sounds like a plan.
Then, would it make more sense to move that one to 'Advanced options' as well, in the dedicated search page..?
Quote
Dislike this idea for the same reason as I said about the notifications - if the sidebar is collapsed, it's not accessible easily.
Oh, we could always have a fallback somewhere for it... Although currently, fallbacks are only for elements added through code, i.e. wetem::load/add, while elements in a skeleton are supposed to be shown all the time so there's no potential fallback...
Quote
Also, as a heads-up, there is going to be a selector growing on there for what should be searched (whole forum, current board, current topic, thoughts, calendar, other items yet to be determined), haven't decided exactly how to handle that yet.
Oh, yes, searching thoughts and gallery comments... That's a good idea. I guess we should deal with that in Search2.php, too... But it'd require quite a bit of refactoring, once again. Not something I'll do with pleasure, and especially not these days... ;)
I'd already busy trying to get my thoughts rewrite to a commitable state.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Quote from Nao on March 6th, 2013, 04:32 PM
Quote from Arantor on March 6th, 2013, 02:11 PM
Been busy, sorry, I'll look at it shortly.
So, what do you think..?
Also, I think you missed my bit about thematic groupings of htmlspecialchar & derivates. Although I'm pretty sure you'll disagre... (If only because it requires refactoring everything...)
I like it. Could do with being a bit wider (and the width limit on the min/max days boxes means it looks like 999 is the limit)

Wait... thematic groupings?
Quote from Nao on March 6th, 2013, 04:32 PM
Quote
Users actually press the button? I thought they just pressed enter for simple searching?
Depends on the user... I usually press Enter myself, but with the big popup, it's tempting to change the settings in there, and the quickest is then to click the Search button...
True.
Quote from Nao on March 6th, 2013, 04:32 PM
Anyway, if there's no button, and no JS thus no popup, you still have to rely on JS (AFAIK) to automatically submit the input box when pressing Enter...
Nope, it's default handling behaviour, if you're in a textbox (as opposed to a textarea) and you press enter, the default submit action occurs.
Quote from Nao on March 6th, 2013, 04:32 PM
Quote
Quote
- Add 'containing all these words..' etc select box to the popup
Sounds like a plan.
Then, would it make more sense to move that one to 'Advanced options' as well, in the dedicated search page..?
Yes, it probably would.
Quote from Nao on March 6th, 2013, 04:32 PM
Quote
Dislike this idea for the same reason as I said about the notifications - if the sidebar is collapsed, it's not accessible easily.
Oh, we could always have a fallback somewhere for it... Although currently, fallbacks are only for elements added through code, i.e. wetem::load/add, while elements in a skeleton are supposed to be shown all the time so there's no potential fallback...
The problem with that is that it's only added server-side, and the sidebar move is a client-side move. I don't think there's much we can do about that, though personally, it seems to me as though that the entire upper-right space is under-used.
Quote from Nao on March 6th, 2013, 04:32 PM
Quote
Also, as a heads-up, there is going to be a selector growing on there for what should be searched (whole forum, current board, current topic, thoughts, calendar, other items yet to be determined), haven't decided exactly how to handle that yet.
Oh, yes, searching thoughts and gallery comments... That's a good idea. I guess we should deal with that in Search2.php, too... But it'd require quite a bit of refactoring, once again. Not something I'll do with pleasure, and especially not these days... ;)
I'd already busy trying to get my thoughts rewrite to a commitable state.
Yes, it requires an overhaul, no question, and I have no idea yet how best to handle that, but I'm plotting quietly (bearing in mind I also want to offer Sphinx and maybe ElasticSearch support as core features too)[1]

Interface, though, I'm thinking I'll break the dropdown select into multiple optgroups, e.g. optgroup label="Forum" with the 'everything'/'this board'/'this topic' options in it.
 1. And before anyone gets into 'why did SMF not offer it as core', it's simple: prior to Sphinx 0.9.9rc2, the only bridge to Sphinx was their API which was a GPL file, which of course didn't play nicely. But after 0.9.9rc2, there is SphinxQL which reuses MySQL functions rather than a custom API. No licence issues to fight with.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

spoogs

  • Posts: 417
Ok shoot me for not realizing the site has been updated :P

Now thats a nice lean menu, I really ALWAYS HATED the search menu button.

Love the way the seach box works, now I dont have to ask for a Search Focus Dropdown-like plugin.

Nice job guys :cool: kinda awkward with the popup when browsing on my phone but I've never felt the need to search while using my phone anyway.

:bravo: :bravo: :bravo: :bravo: :bravo: :bravo: :crazy: :bravo: :bravo: :bravo: :bravo: :bravo: :bravo:
Stick a fork in it SMF