GithubHelp home page GithubHelp logo

solidusio / solidus_starter_frontend Goto Github PK

View Code? Open in Web Editor NEW
52.0 13.0 33.0 7.51 MB

๐ŸŽจ Rails-based starter kit for your Solidus storefront.

License: BSD 3-Clause "New" or "Revised" License

Ruby 62.55% JavaScript 5.69% CSS 1.58% HTML 28.56% Shell 0.77% SCSS 0.44% Dockerfile 0.41%
ecommerce rails ror solidus storefront hacktoberfest

solidus_starter_frontend's People

Contributors

adammathys avatar agostin avatar aleph1ow avatar blocknotes avatar christianrimondi avatar cpfergus1 avatar dinohamzic avatar elia avatar francescoaiello01 avatar gsmendoza avatar jontarg avatar kennyadsl avatar mamhoff avatar markmead avatar mfrecchiami avatar mtatheonly avatar nittarab avatar peterberkenbosch avatar rainerdema avatar ryanofwoods avatar samuelmartini avatar spaghetticode avatar vassalloandrea avatar waiting-for-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar

solidus_starter_frontend's Issues

Impossible to override auth frontend views

Some users reported in Slack that it's not possible to override the auth views. We should provide a way to do that (maybe using append_view_path instead of prepend_view_path in the concern that adds those views) or at least document what to change in their application to have custom views.

Remove jQuery

Now that we rewrote and decoupled the JavaScript codebase from the Solidus one (and jQuery), we should find a way to exclude jQuery from being included in the frontend.

Improve gemspec metadata

We could change the homepage field to this repo (in this way the stars count will appear on the Rubygems page).

We could add some badges to the README:

This is the output of gem build:

WARNING:  description and summary are identical
WARNING:  open-ended dependency on generator_spec (>= 0) is not recommended
  use a bounded requirement, such as '~> x.y'
WARNING:  open-ended dependency on rails-controller-testing (>= 0, development) is not recommended
  use a bounded requirement, such as '~> x.y'
WARNING:  open-ended dependency on rspec-activemodel-mocks (>= 0, development) is not recommended
  use a bounded requirement, such as '~> x.y'
WARNING:  open-ended dependency on selenium-webdriver (>= 0, development) is not recommended
  use a bounded requirement, such as '~> x.y'
WARNING:  open-ended dependency on solidus_dev_support (>= 0, development) is not recommended
  use a bounded requirement, such as '~> x.y'
WARNING:  See http://guides.rubygems.org/specification-reference/ for help
  Successfully built RubyGem
  Name: solidus_starter_frontend
  Version: 0.1.0
  File: solidus_starter_frontend-0.1.0.gem

We need to improve some information ๐Ÿ˜…

Update views references for firstname and lastname to name

In our specs we have a lot of:

DEPRECATION WARNING: lastname is deprecated and will be removed from Solidus 3.0 (use name instead) (called from ___solidus_starter_frontend_app_views_spree_components_forms__address_inputs_html_erb___1467724030274288326_70139211483620 at solidus_starter_frontend/app/views/spree/components/forms/_address_inputs.html.erb:26)
DEPRECATION WARNING: firstname is deprecated and will be removed from Solidus 3.0 (use name instead) (called from ___solidus_starter_frontend_app_views_spree_components_forms__address_inputs_html_erb___1467724030274288326_70139211483620 at solidus_starter_frontend/app/views/spree/components/forms/_address_inputs.html.erb:16)

We need to take care of them ๐Ÿ˜„

Review README after first release

After we release the first version, we should review the whole README to update installation instructions and experimental notice

Responsive check

Check the mobile compatibility of the actual code and provide mobile versions when needed.
N.B. The header should be revised from a designer asap.

Locale selector missing in Sandbox

For some reason, the locale selector disappeared in the restored Sandbox.
See app/views/spree/components/navigation/_locale_selector.html.erb
current_store.available_locales just contains [:en] language.
When using the dummy app the selector is present and current_store.available_locales is fully populated with all language choices.

Some of solidus_frontend's JS depends on classes removed in this fork

Hi everyone - thanks so much for this fork that has taken so much of the effort out of implementing a Bootstrap frontend for my store.

I know the goal is to strip out all Skeleton classes, but some of the classes stripped are actually depended on by the JS.

The first example is: https://github.com/solidusio/solidus/blob/master/frontend/app/assets/javascripts/spree/frontend/cart.js#L7

This code expects the line items in the cart to have a class of 'line-item' in order to remove them, but this class has been removed. I'm sure I've seen other examples but I don't have them to hand yet. Something to be aware of, anyway!

Probably flaky test in checkout spec

Rerunning sometimes it disappears, other times it appears with MySQL or Postgres only ๐Ÿ˜‘

https://app.circleci.com/pipelines/github/nebulab/solidus_starter_frontend/664/workflows/dfa3f5fa-4833-4258-baf4-6f256feebc1d/jobs/1522

Checkout with attempted XSS escaped XSS string displays the entered state name without evaluating - spec.system.checkout_spec
spec/system/checkout_spec.rb
Failure/Error: fill_in state_name_css, with: xss_string

Capybara::ElementNotFound:
  Unable to find visible field "order_bill_address_attributes_state_name" that is not disabled

[Screenshot]: /home/circleci/project/spec/dummy/tmp/screenshots/failures_r_spec_example_groups_checkout_with_attempted_xss_escaped_xss_string_displays_the_entered_state_name_without_evaluating_201.png


Shared Example Group: "safe from XSS" called from ./spec/system/checkout_spec.rb:636
./spec/system/checkout_spec.rb:621:in `block (4 levels) in <top (required)>'

Check the components behaviour with cache server enabled

An example is in categories page using bin/rails dev:cache.
After the first visit the partial "Shop by Categories" seems to be cached and the current category is not highlighted anymore.

Image:
image

Without cache the current category is in bold.

Use more semantic prop names

Instead of using prop names such as small and big we should look into naming them in a more semantic way, such as primary, secondary or similar.

Sandbox seems broken

When I create the sandbox I get this error:

/projects/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/actionpack-6.0.3.4/lib/action_dispatch/routing/route_set.rb:578:in `add_route': Invalid route name, already in use: 'root'  (ArgumentError)
You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources` as explained here:
https://guides.rubyonrails.org/routing.html#restricting-the-routes-created

Steps to reproduce

  • Clone the repo: git clone https://github.com/nebulab/solidus_starter_frontend
  • Enter in the project root: cd solidus_starter_frontend
  • Run bundle: bundle
  • Launch the sandbox executable: bin/sandbox

uninitialized constant Spree::UserConfirmationsController

Creating a new app from scratch I get the error:

solidus_starter_frontend/lib/solidus_starter_frontend/engine.rb:20:in `block in <class:Engine>โ€™: uninitialized constant Spree::UserConfirmationsController (NameError)

Steps to reproduce

  • create the Rails app (6.0.3.2): rails new solidus_test
  • add Solidus to Gemfile:
gem 'solidus_core'
gem 'solidus_api'
gem 'solidus_backend'
gem 'solidus_sample'
gem 'solidus_auth_devise'
  • execute bundle
  • run the generator bin/rails g spree:install
  • add the starter to Gemfile:
gem 'solidus_starter_frontend'
  • mkdir -p app/assets/javascripts/spree/frontend
  • add to app/assets/javascripts/spree/frontend/all.js:
//= require spree/frontend/solidus_starter_frontend
  • mkdir -p app/assets/stylesheets/spree/frontend
  • add to app/assets/stylesheets/spree/frontend/all.css:
/*
 *= require spree/frontend/solidus_starter_frontend
 */

Deletion of old shared views

  • spree/shared/nav_bar could be deleted but in turn it renders:

  • spree/shared/locale_selector: we don't render it actually in our header. I think we should do it instead. (Or is it part of the super basic approach?) (see #72 )

  • spree/shared/_login_bar_items: This partial just contains a comment that says:
    "solidus_auth_devise or a custom auth system can replace this partial".
    Also, in this case, should we render it elsewhere?

Copy controllers, helpers and specs from solidus_frontend

In order to replace the solidus_fronted gem and test changes directly on solidus_starter_frontend we need to move some files and folders from the current frontend gem to the new one.

Anything not strictly related to HTML views, JavaScript files and CSS styles should be copied over to the new gem.

Install generator doesn't seem to be working

gem install solidus_starter_frontend hits this error Could not find a valid gem 'solidus_starter_frontend' (>= 0) in any repository

And the old way of bundle exec rails g solidus_starter_frontend:install hits the error Could not find generator 'solidus_starter_frontend:install'

JS error related to locale when the app has a single locale available

With a single locale in the store, I get this console error:

locale_selector.source.js:3 Uncaught TypeError: Cannot read property 'addEventListener' of null
    at locale_selector.source.js:3

Adding another locale to available_locales of the current store makes the error disappear.

Remove all deprecated code

We can assume this project will be used for new stores only and we can safely remove all deprecations in the codebase.

Remove the use of class names for JavaScript functionality

๐Ÿ‘‹ Hey

I've been using this repo for a project recently and found the use of class names for JS functionality rather frustrating.

I kept deleting the class name, replacing it with my own classes and then having functionality not work. There are only a few cases, but I think it's worth looking at.

Keep logic to ID's and style to classes.

I can take a look at this if someone wants me too.

Create docs for getting project up and running for development

I think there are some undocumented steps that developers need to take in order to start development on this project.

I went with the usual:

bundle install
bundle exec rspec

and ran into a bunch of errors immediately related mostly to files missing and uninitialized constants.

It looks like there are probably some steps that need to be taken in order to set up the project that aren't documented anywhere.

Documenting those steps will make on-boarding developers much easier.

Use fetch for component's properties check

It could be cleaner to use this approach for every property check inside all components.

base_class = local_assigns.fetch(:base_class, nil)

in place of

base_class = nil if local_assigns[:base_class].nil?

[Redesign] Header (mobile version)

The mobile version of the header needs a redesign.
LOGIN / MY ACCOUNT and CART() could be replaced by icons.

Signed Out Signed In
87171229-aecfdc00-c2d2-11ea-89c6-efdaf6f5fc9c 87171218-aaa3be80-c2d2-11ea-89b7-0e2533de9378

N.B. The search by category selector is there but is actually hidden.
Is the search by category functionality still wanted?
Does the searchbar require a round of redesign too?
Screenshot 2020-08-14 at 11 26 35

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.