Git Product home page Git Product logo

solidus_reviews's Introduction

Solidus Reviews

CircleCI codecov

Straightforward review/rating functionality, updated for Solidus.

While the gem's name has changed, the module namespace and commands are still spree for now.

Installation

Add solidus_reviews to your Gemfile:

gem 'solidus_reviews'

Bundle your dependencies and run the installation generator:

bin/rails generate solidus_reviews:install

Usage

The Spree::ReviewsController controller provides all the CRUD functionality for product reviews.

The Spree::FeedbackReviewsController allows user to express their feedback on a specific review. You can think of these as meta-reviews (e.g. the classic "Was this useful?" modal).

You can approve, edit and delete reviews and feedback reviews from the backend.

Development

Testing the extension

First bundle your dependencies, then run bin/rake. bin/rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using bin/rake extension:test_app.

bin/rake

To run Rubocop static code analysis run

bundle exec rubocop

When testing your application's integration with this extension you may use its factories. You can load Solidus core factories along with this extension's factories using this statement:

SolidusDevSupport::TestingSupport::Factories.load_for(SolidusReviews::Engine)

Running the sandbox

To run this extension in a sandboxed Solidus application, you can run bin/sandbox. The path for the sandbox app is ./sandbox and bin/rails will forward any Rails commands to sandbox/bin/rails.

Here's an example:

$ bin/rails server
=> Booting Puma
=> Rails 6.0.2.1 application starting in development
* Listening on tcp://127.0.0.1:3000
Use Ctrl-C to stop

Releasing new versions

Please refer to the dedicated page in the Solidus wiki.

License

Copyright (c) 2023 Solidus Contrib, released under the New BSD License.

solidus_reviews's People

Contributors

aitbw avatar aldesantis avatar alexblackie avatar alexshuhin avatar dgra avatar dmasur avatar ericsaupe avatar fabien avatar futhr avatar hnatt avatar iloveitaly avatar jdutil avatar jhawthorn avatar johanb avatar joshk avatar jumph4x avatar kennyadsl avatar lbrapid avatar mamhoff avatar memotoro avatar nirebu avatar parallel588 avatar paulcc avatar pelargir avatar radar avatar relu avatar romul avatar schof avatar spaghetticode avatar tvdeyen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

solidus_reviews's Issues

Needs Edit Review endpoint

If a user has already written a review for the product and clicks on the /new endpoint, they should be redirected to the edit page. There should also be an edit page.

Duplicate Content Warnings

The native functionality of this extension creates a bad experience for SEO and crawlers. Currently any product page with review functionality is creating a new url of /products/PRODUCT/reviews/new

Due to this new page having no content it creates un-needed pages which flag for dup content. Ideally this should not exist and when clicking to add a review it should just be handled on the product page

Example:
image

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::GemNotFound with message: Could not find gem 'solidus_extension_dev_tools' in git://github.com/solidusio-contrib/solidus_extension_dev_tools.git (at master@27a4e38).
The source does not contain any versions of 'solidus_extension_dev_tools'

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Cannot select star rating when creating or editing a review

When creating a review as a customer or when editing a review as an admin, clicking on the ratings links does nothing. There is no JS error in the console. All other review functionality seems to be working as intended.

Screenshot from 2020-07-13 13-29-14

I am using a fresh install of Solidus with the default storefront.

ruby '2.7.1'
gem 'rails', '~> 6.0.3', '>= 6.0.3.2'
gem 'solidus', '~> 2.10.1'
gem 'solidus_auth_devise', '~> 2.4.0'
gem 'solidus_reviews', github: 'solidusio-contrib/solidus_reviews'

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "codecov":
  In Gemfile:
    solidus_dev_support was resolved to 1.5.0, which depends on
      codecov (~> 0.1.16)

Could not find gem 'codecov (~> 0.1.16)', which is required by gem 'solidus_dev_support', in any of the sources.

Bundler could not find compatible versions for gem "rubocop":
  In Gemfile:
    solidus_dev_support was resolved to 1.5.0, which depends on
      rubocop-rspec (~> 1.36) was resolved to 1.41.0, which depends on
        rubocop (>= 0.68.1)

    solidus_dev_support was resolved to 1.5.0, which depends on
      rubocop (~> 0.76.0)

Bundler could not find compatible versions for gem "solidus_core":
  In Gemfile:
    solidus was resolved to 2.11.0.alpha, which depends on
      solidus_core (= 2.11.0.alpha)

    solidus_auth_devise was resolved to 2.4.0, which depends on
      solidus_core (>= 2.6, < 3)

    solidus_reviews was resolved to 0.0.1, which depends on
      solidus_core (>= 2.0.0, < 3)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

uninitialized constant SolidusReviews::Spree::Admin (NameError)

Hello,

I got this error after deploying to production server (it works well on my local):

 uninitialized constant SolidusReviews::Spree::Admin (NameError)

After checking, I found that I have to disable eager_load on production env for it to works

# environment/production.rb
config.eager_load = false

However this would affect my app performance. I still can not find out the root cause. Please help!

Thanks in advance!

P/S: My production system

  • ubuntu 18.04
  • ruby 2.6.3
  • rails 6.0.2.1
  • solidus_review 1.3.0

Rubygems release

Can we cut a new rubygems release for this that includes the route fixes and Rails 5 support?

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "solidus_core":
  In Gemfile:
    solidus was resolved to 3.1.0.alpha, which depends on
      solidus_core (= 3.1.0.alpha)

    solidus_reviews was resolved to 0.0.1, which depends on
      solidus_core (>= 2.0.0, < 3)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::GemNotFound with message: Could not find gem 'solidus_extension_dev_tools' in git://github.com/solidusio-contrib/solidus_extension_dev_tools.git (at master@5b33a25).
The source does not contain any versions of 'solidus_extension_dev_tools'

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Need add key to translate file ru.yml

Hi!

After install your module, I see a missing transaltion key

ru.spree.admin.tab.reviews

Can you add it and put Отзывы for him?

Best,
Stan

Installing fresh solidus and solidus_reviews, rails g solidus_reviews:install fails

Gemfile

gem 'rails', '> 6.0.3', '>= 6.0.3.4'
gem 'pg'
gem 'puma', '
> 4.1'
gem 'sass-rails', '>= 6'
gem 'webpacker', '> 4.0'
gem 'turbolinks', '
> 5'
gem 'jbuilder', '~> 2.7'
gem 'solidus'
gem 'solidus_reviews', github: 'solidusio-contrib/solidus_reviews'

Reduces boot times through caching; required in config/boot.rb

gem 'bootsnap', '>= 1.4.2', require: false

bundle added the gem, but running 'be rails solidus_reviews:install' fails, with the following error

/Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:inrequire': cannot load such file -- deface (LoadError)
from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in block in require_with_bootsnap_lfi' from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in register'
from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require_with_bootsnap_lfi' from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in require'
from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in block in require' from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:291:in load_dependency'
from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in require' from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/bundler/gems/solidus_reviews-dec46eae286f/lib/solidus_reviews.rb:5:in

'
from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in require' from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in block in require_with_bootsnap_lfi'
from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in register' from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require_with_bootsnap_lfi'
from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in require' from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:74:in block (2 levels) in require'
from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:69:in each' from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:69:in block in require'
from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:58:in each' from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:58:in require'
from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/site_ruby/2.7.0/bundler.rb:174:in require' from /Users/matt/code/solidus-commerce/config/application.rb:7:in <top (required)>'
from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:92:in require' from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:92:in preload'
from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:157:in serve' from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:145:in block in run'
from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:139:in loop' from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:139:in run'
from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application/boot.rb:19:in <top (required)>' from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in require'
from /Users/matt/.rbenv/versions/2.7.0/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in require' from -e:1:in '
`

Settings > Reviews styling is broken

Screen Shot 2019-05-28 at 11 20 17

I think this is because there's a translation missing and therefore it's added <span class="translation_missing" title="" data-original-title="translation missing: en.spree.admin.tab.reviews" aria-describedby="tooltip663538">Reviews</span> which makes it red on white.

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::GemNotFound with message: Could not find gem 'solidus_extension_dev_tools' in git://github.com/solidusio-contrib/solidus_extension_dev_tools.git (at master@8140198).
The source does not contain any versions of 'solidus_extension_dev_tools'

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Can't modify frozen String error when trying to open Admin

After adding the gem Im getting the following error:

Deface: 1 overrides found for 'spree/admin/shared/_product_sub_menu'
Deface: 'reviews_admin_tab' matched 1 times with '[data-hook='admin_product_sub_tabs']'
Deface: [WARNING] No :original defined for 'reviews_admin_tab', you should change its definition to include:
 :original => 'd1a70da8f31da0a082c6c5333d9837dcaca65c65'
  Rendered vendor/bundle/gems/solidus_backend-2.7.2/app/views/spree/admin/shared/_tabs.html.erb (15.3ms)
  Rendered vendor/bundle/gems/solidus_backend-2.7.2/app/views/spree/admin/shared/_menu.html.erb (18.0ms)
  Rendered vendor/bundle/gems/solidus_backend-2.7.2/app/views/spree/admin/shared/_navigation.html.erb (25.6ms)
Completed 500 Internal Server Error in 2956ms (ActiveRecord: 68.1ms)



ActionView::Template::Error (can't modify frozen String):
     8:         url: menu_item.url.is_a?(Symbol) ? spree.public_send(menu_item.url) : menu_item.url
     9:       ) do
    10:     %>
    11:       <%- render partial: menu_item.partial if menu_item.partial %>
    12:     <%- end %>
    13:   <% end %>
    14: <% end %>

vendor/bundle/gems/deface-1.3.2/lib/deface/parser.rb:93:in `force_encoding'
vendor/bundle/gems/deface-1.3.2/lib/deface/parser.rb:93:in `convert'
vendor/bundle/gems/deface-1.3.2/lib/deface/override.rb:154:in `source_element'

Rails: 5.1.6.2
ruby: 2.6.3p62

I also try it with ruby 2.5.5 and the same error occurred.

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::GemNotFound with message: Could not find gem 'solidus_extension_dev_tools' in git://github.com/solidusio-contrib/solidus_extension_dev_tools.git (at master@042f10b).
The source does not contain any versions of 'solidus_extension_dev_tools'

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

undefined method url for Spree::Image

Everywhere where in the views the url method is call on a Spree::Image the following error occurs:

Completed 500 Internal Server Error in 265ms (ActiveRecord: 21.9ms)
ActionView::Template::Error (undefined method `url' for #<Spree::Image:0x00007fd1481a8418>):
    26:     </div>
    27:     <% review.images.each do |image| %>
    28:       <div itemprop="image">
    29:         <%= link_to image_tag(image.url(:product)), image.url(:original) %>
    30:       </div>
    31:     <% end %>
    32:     <% if Spree::Reviews::Config[:feedback_rating] && (!Spree::Reviews::Config[:require_login] || spree_current_user) %>

app/views/spree/products/show.html.erb:71:in `_174fa07ddc6fc2509a9b13441a25a1d0'

Support rating only reviews

Requiring users to fill out their name / message can discourage users from leaving a review. Currently users can't leave a review with just a rating, but doing so would make it more accessible to users willing to at least leave a rating without a message. This is also a pretty common ability with most rating/review systems.

Expectations

I would expect that if a user leaves only a rating, it would bypass the approval system. If a user leaves a rating only review, they should be able to add a full review at a later time (edit their review). If a user edits their rating only review to add content, I would expect it to go back through the approval system, BUT I would think the rating should still be used as part of the total average rating. I would think this would mean that all reviews would have their rating counted as part of the average rating whether they're pending/approved/rejected.

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::GemNotFound with message: Could not find gem 'solidus_extension_dev_tools' in git://github.com/solidusio-contrib/solidus_extension_dev_tools.git (at master@fe57891).
The source does not contain any versions of 'solidus_extension_dev_tools'

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "codecov":
  In Gemfile:
    solidus_dev_support was resolved to 1.5.0, which depends on
      codecov (~> 0.1.16)

Could not find gem 'codecov (~> 0.1.16)', which is required by gem 'solidus_dev_support', in any of the sources.

Bundler could not find compatible versions for gem "rubocop":
  In Gemfile:
    solidus_dev_support was resolved to 1.5.0, which depends on
      rubocop-performance (~> 1.5) was resolved to 1.6.1, which depends on
        rubocop (>= 0.71.0)

    solidus_dev_support was resolved to 1.5.0, which depends on
      rubocop-rspec (~> 1.36) was resolved to 1.41.0, which depends on
        rubocop (>= 0.68.1)

    solidus_dev_support was resolved to 1.5.0, which depends on
      rubocop (~> 0.76.0)

Bundler could not find compatible versions for gem "solidus_core":
  In Gemfile:
    solidus was resolved to 2.11.0.alpha, which depends on
      solidus_core (= 2.11.0.alpha)

    solidus_auth_devise was resolved to 2.4.0, which depends on
      solidus_core (>= 2.6, < 3)

    solidus_reviews was resolved to 0.0.1, which depends on
      solidus_core (>= 2.0.0, < 3)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Autoloading broken on Rails 7

Autoloading is broken on Rails 7 due to referencing a constant in the load_preferences.rb initializer:

in `<module:Reviews>': uninitialized constant Spree::ReviewsConfiguration (NameError)

This PR fixes the problem.

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::GemNotFound with message: Could not find gem 'solidus_extension_dev_tools' in git://github.com/solidusio-contrib/solidus_extension_dev_tools.git (at master@7c47ece).
The source does not contain any versions of 'solidus_extension_dev_tools'

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.