Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search v2 #63

Merged
merged 26 commits into from
Apr 14, 2012
Merged

Search v2 #63

merged 26 commits into from
Apr 14, 2012

Conversation

gugahoi
Copy link
Collaborator

@gugahoi gugahoi commented Feb 4, 2012

This one is a bit neater and seems to be working

@gugahoi
Copy link
Collaborator Author

gugahoi commented Feb 4, 2012

Okay, things have been redone and seem to be neater

@mrkipling
Copy link
Owner

A really good start! Some suggestions though, as I feel that it needs a few tweaks before it's ready to be merged in:

  • I know that I said to put the search settings inside server settings for now, but I meant that as an easy solution while you were getting things working. API keys and such don't really belong there and it's feeling a little cramped; perhaps the search bar should have a settings cog which exposes search-specific settings? (although "enable search" is probably best left in server settings)
  • Error handling needs to be improved; currently if there is any kind of server-side error (even a template rendering error) then it just displays "could not reach Maraschino". Errors should be more descriptive; examples:

There was a problem reaching Maraschino.
Maraschino encountered an error. (this one isn't great, but at least more accurate)
Please enter an NZBMatrix API key before searching.
etc.

  • "Sites" should not be an option in the dropdown as it doesn't do anything. It could be a non-selectable optgroup heading.
  • Perhaps "enable search feature" should default to "yes", as search is enabled for me by default (i.e. pressing ALT-F opens the search bar), despite the option being set to "no" by default (probably because there is no entry in the database until you save the settings?)
  • Search results are hard to read. Perhaps use solid black, or a 90-95% opaque background?
  • Search bar doesn't line up with the other modules - the positioning is off. Perhaps it should also have a solid/very-opaque background and top:0; left:0; right:0? (I can do this if you have trouble with the styling)
  • If the SABnzbd module isn't set up (no username, API key, etc.) then the search feature still tried to add to SABnzbd. It should display an error instead. It should also display an error if there is a general problem with adding to SABnzbd.
  • You're defining FILTERS['add_to_sab'] out of scope, meaning that the link is generated when you start the server. This is a problem because updating your SABnzbd settings won't have any effect on the link - you have to restart the web server in order to update it, which is something that we avoid.
  • The URL that SABnzb is receiving does not contain my NZBMatrix API key or username. I'm not sure why this is but I can debug if you can't reproduce.

@mrkipling
Copy link
Owner

I should have some time this weekend, so let me know if you want me to pick this up and implement the amends in the list above.

@gugahoi
Copy link
Collaborator Author

gugahoi commented Feb 10, 2012

@mrkipling i'm not sure if i will have time so when you stop to do your weekly updates and this it not updated yet then by all means feel free to finish it up....

@DejaVu
Copy link
Contributor

DejaVu commented Feb 12, 2012

Any updates on this today?

@mrkipling
Copy link
Owner

Didn't get a change to work on it I'm afraid; only had a bit of time this afternoon which I spent on other pull requests.

Added settings cog
@gugahoi
Copy link
Collaborator Author

gugahoi commented Feb 19, 2012

I've had a go today at some of your request and I'm not really sure which way you want to go so maybe I'll leave this one for you, is that ok?

@mrkipling
Copy link
Owner

No problem, I'll take a look as soon as I can.
On Feb 19, 2012 12:47 PM, "Gustavo Hoirisch" <
[email protected]>
wrote:

I've had a go today at some of your request and I'm not really sure which
way you want to go so maybe I'll leave this one for you, is that ok?


Reply to this email directly or view it on GitHub:
#63 (comment)

Conflicts:
	modules/sabnzbd.py
	static/js/index.js
@gugahoi
Copy link
Collaborator Author

gugahoi commented Mar 28, 2012

Tried to get this up to date with master but havent had the chance to test yet.

@gugahoi
Copy link
Collaborator Author

gugahoi commented Mar 29, 2012

Had the chance to test and review somethings now. On a test installation things seem to be working well. Still need to rearrange the settings, fix minor bugs and whatnot but all in all I think it's getting closer to being ready.

@mrkipling Care to comment?

top, right, left and bottom positions set to 0px
@gugahoi
Copy link
Collaborator Author

gugahoi commented Mar 31, 2012

I think the one thing left now is creating the independent settings page for this....

@mrkipling
Copy link
Owner

Erm, bit of a noob question perhaps, but how do I pull this request? I've always just pulled the branch that you've opened the request for, as that is what the email tells me to do :)

e.g. git pull https://github.com/gugahoi/maraschino search-v2

However, that branch hasn't been updated in 2 months... which I didn't find out until I'd spent 30 minutes fixing JS errors :)

@mrkipling
Copy link
Owner

Ignore that last comment... I actually did pull the right branch, but when looking at it on GitHub I was looking at the "search" branch (not "search-v2").

From what I can see, this isn't quite ready. Some observations:

  • the search setting in the server settings dialog doesn't do anything
  • pressing ALT-F multiple times loads in multiple search dialogs and overlays them on top of each other
  • there's no way of closing the search dialog
  • the styling is still a bit wonky (spacing is a bit random, and Times New Roman is used in places) - although this isn't a biggy as I can fix that quickly enough

@DejaVu
Copy link
Contributor

DejaVu commented Apr 4, 2012

Search closes for me with Alt-F (Not tried button bashing yet) and I had a little go at some of the styling for it...
http:https://www.youtube.com/watch?v=dFIojEMktec
The categories are not shown til a site is selected and the inputs no longer 'jump'.

I tried to get the tbody to scroll separately from the thead, but is something CSS3 wont do yet.
Creating the Tablesort (which has stopped working BTW) into Div's on the otherhand, can give a full page scrolling body using something like this -

http:https://www.imaputz.com/cssStuff/bigFourVersion.html

@gugahoi
Copy link
Collaborator Author

gugahoi commented Apr 4, 2012

Alt+F hides for me too...

Also, Search Settings only work after a refresh so it does work, just not the way it's supposed to :-b

I was thinking of adding a close button but you are supposed to be able to close with ALT+F

@mrkipling
Copy link
Owner

The issues that I've been having make it sound like I've been using an
out-of-date version, as there are lots of things broken when I try to use
it, but these things don't seem to be a problem for you guys. I'll have to
take another look.

@mrkipling
Copy link
Owner

I'm reviewing this now, and hope to have it mostly done this evening.

One thing that I've come across: hard-coding the categories for each search site isn't great, as new categories get added (PS4 games, for example). Do they have APIs that you can use to retrieve the list of categories?

@mrkipling
Copy link
Owner

Okay, this is all on branch search-v2. There were quite a few bugs; please go over the commit log when you get a chance and see what I've changed.

Other than bug and styling fixes, I've changed the key combination that invokes search to be "alt-s", as "alt-f" opens the tools menu in Chrome if the window isn't properly focussed (which is to say, a lot of the time). I've also made it so that ESC also closes the search module (I found myself naturally pressing ESC a lot to try to close it).

I think that it still needs some work. Specifically:

  • settings need their own place in the interface
  • you need to be able to invoke the module without using a hidden/magical key combination
  • code needs tidying up (get rid of hard-coded categories, add logging, etc.)
  • it needs to pass NZBMatrix details to SABNZBD (in the short-term, we should make it clear that these details need to be entered in SABNZBD directly)

...but I think this stuff can wait for another day. If you're happy with the search-v2 branch as it is then go ahead and merge it in.

@mrkipling
Copy link
Owner

Oh, and almost forgot - good job! I can already see myself using this a lot :)

@mrkipling
Copy link
Owner

Actually, I was thinking about this last night. Perhaps let's wait until the weekend before merging this in, if you don't mind? I should have some free time to at least move the settings around (and hopefully a few more things), and it would be better if this was done for the first release so that things don't start moving around in the interface for no good reason.

If I don't manage to get it done this weekend, however, I'll just merge it in anyway.

Sound good?

@mrkipling
Copy link
Owner

I've just pushed some changes which move search settings into their own dialog. The remote icon in the top-right has been replaced with an expanded menu which appears when you hover over it. What do you think?

@N3MIS15
Copy link
Collaborator

N3MIS15 commented Apr 13, 2012

The category drop menu doesnt show by default, you need to search for it to show. im guessing this has something to do with polling the python to get the list. also when you have chosen a category and then search it would be nice if it could remember the category you searched.

@mrkipling mrkipling merged commit 1fe0a2f into mrkipling:master Apr 14, 2012
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.

None yet

4 participants