Purpose:
This project provides a new display widget for Facets called "Links with scroll". It will show a throbber/spinner after clicking one of the facet links and scroll the screen to the facet on next page load.

Admin page:

  • A minimum screen width before the throbber/scroll functionality activates.
  • Custom whitespace above the element used to create the scroll offset.
  • A list of options with different "scroll to" elements (if the "parent" option is selected, you can then provide your own selector, if you don't use the default facet-blocks, created by the Facet API module.

Background:
It's a very simple module that's developed because I worked on a project where the client didn't like starting at the top of the page every time they selected a facet on mobile devices. This module is a simple alternative to fetching new results with AJAX.

Facet API Scrolling Links

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/kallehauge/2492081.git facet_api_scrolling_links
cd facet_api_scrolling_links

Manual reviews of other projects:

Comments

kallehauge created an issue. See original summary.

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxkallehauge2492081git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

kallehauge’s picture

Status: Needs work » Needs review

Corrected the mistakes found in Pareview, that my outdated PHPCS (Drupal standards) didn't detect and a few other requirements that I missed on the checklist

kallehauge’s picture

Wups, a link to the latest pareview build :)

rashid_786’s picture

Thanks for your contribution, here are my observations.

* Implements Hook_help() to get more understanding about this module to new users.
+ You used constant variables with double underscore e.g. FACETAPI_SCROLLING_LINKS__ACTIVATION_WIDTH, can you explain more on this? why is it necessary to use double underscore?

rashid_786’s picture

Status: Needs review » Needs work
kallehauge’s picture

Status: Needs work » Needs review

Hi Rashid, thank you for reviewing :)

  1. I have added a hook_help with some general information.
  2. The reason I used double underscores is to separate the namespace prefix and the "variable name". The code standards only states it should be uppercase and use underscores (PHPCS with Drupal standards doesn't complain). I feel like this gives better readability (and also a bit inspired by the BEM naming convention coming in D8).

/ Kallehauge :)

Gorka Guridi’s picture

Status: Needs review » Reviewed & tested by the community

Automated Review

Minor problem found by pareview.sh:
http://pareview.sh/pareview/httpgitdrupalorgsandboxkallehauge2492081git-...

Manual Review

Individual user account

Yes: Follows the guidelines for individual user accounts.

No duplication

Yes: Does not cause module duplication and/or fragmentation.

Master Branch

Yes: Follows the guidelines for master branch.

Licensing

Yes: Follows the licensing requirements.

3rd party assets/code

Yes: Follows the guidelines for 3rd party assets/code.

README.txt/README.md

No: Does not follow the guidelines for in-project documentation and/or the README Template.
Observations:
* Section formatting not as in template.

Code long/complex enough for review

Yes: Follows the guidelines for project length and complexity.

Secure code

Yes: Meets the security requirements.

Coding style & Drupal API usage

facetapi_scrolling_links.module:136 : placeholder !default is wrongly added as parameter 'default' in t function.
facetapi_scrolling_links.module:158 : same as above.
widget_scrolling_lincs.inc:59 : why is it returning $this?

The code looks good, well documented. I'm not sure that the module deserve to be back to needs work due to my findings, all of them seem small and won't affect the functionality of the module. I think it's ready for production use.

kallehauge’s picture

Oh, for some reason I never got a notification about new activity in here. Sorry for ignoring you Gorka Giridi!

I have corrected the last issue of the automated test and fixed the wrongfully implemented placeholders. Thank you very much for the detailed review and your time!

/ Kallehauge

kallehauge’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
klausi’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for your reviews. When finishing your review comment also set the issue status either to "needs work" (you found some problems with the project) or "reviewed & tested by the community" (you found no major flaws).

Review of the 7.x-1.x branch (commit 3ba110e):

  • ESLint has found some issues with your code (please check the JavaScript coding standards).
    /home/klausi/pareview_temp/js/jquery.facetapi_scrolling_links.scroll.js: line 7, col 3, Error - Strings must use singlequote. (quotes)
    /home/klausi/pareview_temp/js/jquery.facetapi_scrolling_links.scroll.js: line 61, col 3, Warning - Missing JSDoc parameter type for 'param'. (valid-jsdoc)
    /home/klausi/pareview_temp/js/jquery.facetapi_scrolling_links.scroll.js: line 61, col 3, Warning - Missing JSDoc parameter description for 'param'. (valid-jsdoc)
    /home/klausi/pareview_temp/js/jquery.facetapi_scrolling_links.scroll.js: line 61, col 3, Warning - Missing JSDoc return type. (valid-jsdoc)
    /home/klausi/pareview_temp/js/jquery.facetapi_scrolling_links.scroll.js: line 61, col 3, Warning - Use @return instead. (valid-jsdoc)
    
    5 problems
    
  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

Otherwise looks good after a manual review.

Thanks for your contribution, André!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.