-
Notifications
You must be signed in to change notification settings - Fork 359
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
Geographic search and display #722
Geographic search and display #722
Conversation
Thanks again for sharing this. A few comments: 1.) The Travis build is failing due to some style issues. I've run some automatic cleanup tools, but some problems remain. I can help clean these up if you like, but if you want to go through the exercise yourself, I can leave them for you. (Personally I find code style comformance helpful, but I don't want to force busy-work on you if you have more important things to do). 2.) There were a couple of minor bugs preventing the code from running -- an incorrect namespace on one of the files, and a missing brace in one of the classes that caused a parse error. Presumably these are side effects of copying things from your local customizations into the generic classes... I've corrected them, but there may be more. We'll definitely want to test carefully to be sure we didn't miss anything! (I haven't gotten to the point of running the code yet -- starting out with a higher-level code review). 3.) The OpenLayers files should be kept in js/vendor/ rather than just js/ -- that's how we differentiate between files we wrote and third-party files we incorporated into the project. (This not only helps us manage dependencies better, but it also allows us to avoid getting code style warnings, etc., about code that we don't have control over). I can move these if you don't have time! 4.) We'll want to add a built-in version of your BeanShell script inside SolrMarc before we merge this PR to ensure that BeanShell use is optional. I'll be happy to take care of that. I'm adding a TODO item to the top-level comment so we don't forget about it. Are you happy with the current state of the BeanShell logic? If so, I can port it over now. If you'd prefer to wait until after we've done more testing here, that's fine too -- just let me know! 5.) Right now it looks like the geographic search is hard-coded on in the searchbox.phtml template. I assume we should make this configurable or conditional somehow, since it won't apply to many users. 6.) The map.phtml file has a hard-coded 7.) Another to-do item I've added: we should put something into the upgrade script to warn people that the map tab has been rewritten if they have the "Google" setting turned on. Might also be worth discussing with the group whether there's any reason to keep the old Google functionality in some form (I don't think there is, but it doesn't hurt to ask around to be safe). Anyway, hopefully that gets the ball rolling. I'll wait to see what you have to say before digging deeper! |
Thanks for the feedback Demian. I really appreciate it.
Just an FYI - I've got a lot of projects I'm juggling currently, so it may take me a few weeks to get to all of these items. Thanks again! |
P.S. on 1) I figured out Travis - I'll get those files updated appropriately. |
3, 5-7) Sounds good!
And, of course, no rush. I'm busy too, so if you take your time, I won't object. |
@lmgonzales, a couple more minor things: 1.) I notice that the new MapSelection recommendation module is not documented in the list of recommendation modules in searches.ini. Do you mind adding some brief notes there for completeness? 2.) I notice that the indexing routine is currently hard-coded to use 034. Is this a safe assumption? If not, do you have any thoughts on how we should parameterize this? For example, would it make sense to have a field list that specifies north/south/east/west subfields for a series of different fields? The easiest thing is certainly to just leave it as-is for now and add flexibility as needed. However, if you think the need is likely, it would probably be better to address it now, rather than having to rebuild SolrMarc and coordinate another release to add it later. (I've also added some more checkboxes to the TODO list at the top of the PR to help us keep track of everything). Thanks! |
…/vendor/ol/ol.css
@demiankatz: Just an update on where things stand with this PR: 1.) Updated searches.ini to add notes to the [MapSelection] module. |
Leila, I took a bit of time today to look at this; I was planning to help with the ESLint style issues, but I want to get it working before I change anything, and so far, I have not been able to do that. Some notes/questions/comments: 1.) I tried indexing the test records you sent me. The bbox_geo field appears to be getting populated correctly in Solr and recordMap is set to true in config.ini, but I am not seeing a map tab. What else should I be checking? 2.) The Geographic Search link was resulting in a fatal error. I tracked this to a missing line in module.config.php and fixed that, but it's still not working. I think the filter is getting generated incorrectly -- the URL I end up with is: 3.) I notice that the methods you have added to the RecordDriver/SolrMarc.php file are not actually MARC-specific. You should probably move them to RecordDriver/SolrDefault.php so the functionality can be shared with non-MARC data sources in the future. 4.) I've added a TODO checkbox in the top comment to fix the Javascript style issues... once these other things are sorted out, I'll revisit that issue. Thanks! |
@crhallberg, Thanks so much! I had a quick follow up question for you - When I do a git push, should I push the bootstrap3/css/compiled.css and the bootprint3/css/compiled.css, or only just the search.less and map_selection.js files? Thanks! |
@lmgonzales, you can go ahead and push up the compiled.css files too. It's a little bit redundant, but it's more convenient for everyone that way. |
Thanks @demiankatz . When tried to git add the search.less and the boostrap3/css/compiled.css files but am getting the following error: |
Does your .git directory (or some of the files in it) have a different ownership than the user account that you are logged in under when attempting to commit? |
No. Their group and owner are the same as my user account, and permissions are set the same as the bootprint3/css/compiled.css that I was able to add. |
Very weird. Does sudo help? |
Let me see if I can make the changes manually via the github web interface for those two files. and then git push the other two. |
…ales/vufind into geographic-search-display
@demiankatz, |
@lmgonzales, thanks a lot! I'll give this a closer look on Monday. If nothing new comes up in the way of problems, I think we'll be able to merge it. |
@lmgonzales, I've just put on some finishing touches: I've turned off MapSelection by default, and I've updated/expanded/corrected some of the [MapSelection] comments in searches.ini. Once @crhallberg has time to do his review, I think we can merge this. Just one minor question in the meantime: the searches.ini comment for default_coordinates addresses coordinate order, but it doesn't describe ranges of valid values. Is it worth adding another sentence or two to elaborate on what coordinate system is being used and how to determine values? |
@demiankatz , Thanks for making the finishing touches to the code. I've added a few sentences to searches.ini to elaborate on the coordinate type and also the range of valid values, as well as tips on what to do if the dataset is geographically distributed rather than concentrated in one area. Essentially, we shouldn't encourage users to select the full map extent, otherwise the search could be slow if they have a large database. |
@lmgonzales, wonderful, thank you! I expect we will merge this tomorrow, barring any last-minute problems. |
@demiankatz, That's great news! Here's hoping for no last-minute problems! |
Conflicts: themes/bootprint3/css/compiled.css themes/bootstrap3/css/compiled.css
No last-minute problems -- merged, with thumbs-up from @crhallberg. |
Great to hear! Thanks @demiankatz and @crhallberg!! |
Notes:
To Do List