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

Add paged Atom feed option to search results #365

Open
wants to merge 12 commits into
base: 7.x
Choose a base branch
from

Conversation

bondjimbond
Copy link

JIRA Ticket: (https://jira.duraspace.org/browse/ISLANDORA-2440)

  • Other Relevant Links (Google Groups discussion, related pull requests, Release pull requests, etc.)

https://groups.google.com/d/topic/islandora/8eZCuy2NCCc/discussion

What does this Pull Request do?

Provides a new Secondary Display Profile option: Atom feed, an alternative to RSS with more features (especially paged results).

What's new?

The new Atom option rewrites the RSS output to make it compatible with Atom feed standards, and is offered as a new display profile. The Atom feed is paged and so can provide more results than the current Solr limit.

How should this be tested?

  • Open the Solr configuration page
  • Check off the Atom feed option
  • Run a search
  • Click the button and view the Atom results
  • Try the paged link options to confirm that paging works too

Additional Notes:

Currently using the RSS icon for the feed, which may be confusing if you're using both Atom and RSS -- although you shouldn't really be using both at the same time, should you? Open to alternative icons.

Interested parties

@Islandora/7-x-1-x-committers

@bondjimbond bondjimbond requested a review from DiegoPino June 10, 2019 15:18
Copy link

@jonathangreen jonathangreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bondjimbond. Great work. I really like the idea of providing an atom feed as well as RSS. I made some comments of a few things I'd like to see changed in the code. All the comments really revolve around my thought that the ATOM display should be totally separate from the RSS display, in its hooks alters and function names, so the ATOM display can stand on its own.

islandora_solr_config/includes/atom_results.inc Outdated Show resolved Hide resolved
islandora_solr_config/includes/atom_results.inc Outdated Show resolved Hide resolved
islandora_solr_config/includes/atom_results.inc Outdated Show resolved Hide resolved
islandora_solr_config/includes/atom_results.inc Outdated Show resolved Hide resolved
islandora_solr_config/includes/atom_results.inc Outdated Show resolved Hide resolved
islandora_solr_config/includes/atom_results.inc Outdated Show resolved Hide resolved
islandora_solr_config/includes/atom_results.inc Outdated Show resolved Hide resolved
islandora_solr_config/includes/atom_results.inc Outdated Show resolved Hide resolved
'class' => 'IslandoraSolrResultsAtom',
'function' => 'printAtom',
'description' => t("Show search results as an Atom feed"),
'logo' => '<img src="' . $path . '/images/rss.png" class="secondary-display-rss" alt="' . t("Atom Feed") . '">',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have its own image and class.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any suggestions for an Atom image?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like in general, the same icon is used for both Atom and RSS.

Copy link

@DiegoPino DiegoPino Jun 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its the same, when Atom was invented bitmaps where just a dream.... I would either go with the same or duplicate the file and give it another name so people could eventually decide for a replacement?

@jonathangreen
Copy link

It looks like the code is failing travis on copy paste detection:

phpcpd --names *.module,*.inc,*.test sites/all/modules/islandora_solr_search
phpcpd 2.0.4 by Sebastian Bergmann.
Found 2 exact clones with 115 duplicated lines in 2 files:
  -	/home/travis/build/Islandora/islandora_solr_search/islandora_solr_config/includes/atom_results.inc:131-186
 	/home/travis/build/Islandora/islandora_solr_search/islandora_solr_config/includes/rss_results.inc:93-148
 
  -	/home/travis/build/Islandora/islandora_solr_search/islandora_solr_config/includes/atom_results.inc:187-247
 	/home/travis/build/Islandora/islandora_solr_search/islandora_solr_config/includes/rss_results.inc:146-206
 
1.12% duplicated lines out of 10301 total lines of code.

I think that can probably be solved by reworking the ATOM feed to be its own thing, and not rely on the RSS item. Alternatively ATOM could use RSS as its base class. I think they are different enough to be completely separate though.

@bondjimbond
Copy link
Author

@jonathangreen I think we may be there. Any further comments?

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.

3 participants