Commit Graph

9662 Commits

Author SHA1 Message Date
Kristina Lim
a494fb274e Disable rubocop cop Rails/ActiveRecordAliases
The methods :update! and :update (to replace :update_attributes! and
:update_attributes) were not added until Rails 4.

See this for more information:
https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Rails/ActiveRecordAliases
2018-08-06 18:12:43 +08:00
Matt-Yorkley
c8397024e4 Streamline Product Import UX flow v1.18.0 2018-08-03 14:33:35 +10:00
Maikel
d726b0a851 Merge pull request #2509 from coopdevs/update-spree-fork-version
Update Spree's fork revision in Gemfile
2018-07-31 09:26:00 +10:00
Pau Perez
c4b23b62d0 Update Spree's fork revision in Gemfile 2018-07-30 18:11:02 +10:00
Maikel
915531acc4 Add section about documentation updates
This should prevent issues like https://github.com/openfoodfoundation/openfoodnetwork/issues/2427.

Also converted comments into HTML syntax so that you don't have to delete them when creating a PR.
2018-07-30 14:44:07 +10:00
Maikel
8ecc786b99 Include bug severity in issue template
And formatted for easier reading and writing.
2018-07-30 14:28:01 +10:00
Rob H
7f26b1494b Fix syntax error in GETTING_STARTED.md 2018-07-27 12:49:18 +10:00
Rob H
eb89b74022 Fix syntax error in README.md 2018-07-27 12:48:37 +10:00
Maikel
933ff63de2 Merge pull request #2389 from luisramos0/bulk_prod_edit_fix
admin page fetcher is now synchronously fetching all pages before reso…
2018-07-26 14:09:21 +10:00
Maikel
3f91850301 Merge pull request #2499 from mkllnk/update-com-links-in-readme
Add communications links to README
2018-07-26 11:39:29 +10:00
Rob Harrington
a16058f52a Fix link syntax errors in REAME.md and GETTING_STARTED.md 2018-07-26 11:38:39 +10:00
Maikel
02331221ef Merge pull request #2471 from Matt-Yorkley/pi/post_save
PI: post-save UI changes
2018-07-26 11:26:51 +10:00
Maikel Linke
2ceb969925 Style recently merged code
We enabled more Rubocop checks and code that was merged around the same
time, didn't comply with the new checks.
2018-07-26 10:52:56 +10:00
Maikel Linke
f0f9662957 Update gem i18n-js to pick up locale changes
We had some problems recently with changes in en.yml not being picked up
by i18n-js to be included in all.js. There have been some patches for
the current version that have an impact on that:

578555f57e
db3cdf82aa
a88b206644

Trying it out locally, the updated i18n-js gem works while the old
version doesn't update the Javascript translations when new keys are
added. To reproduce the issue, you can add a new key in `en.yml` and
reference it from an Angular template in `app/assets/javascripts/`. The
old version complained about a missing translation until you ran:
```
bundle exec rake tmp:cache:clear
```

We don't need to do that any more.
2018-07-26 10:45:35 +10:00
Pau Pérez Fabregat
97e61dc6f9 Merge pull request #2498 from Matt-Yorkley/embedded_mobile
Fix embedded shopfront menu responsiveness
2018-07-25 15:10:46 +02:00
Matt-Yorkley
ae5fd864d1 Fix embedded shopfront menu responsiveness 2018-07-25 17:41:26 +10:00
Maikel Linke
5db5bc65c0 Add communications links to README
This was originally proposed by Kirsten in:
https://github.com/openfoodfoundation/openfoodnetwork/pull/2478
2018-07-24 11:18:54 +10:00
Maikel
ffd3d28889 Merge pull request #2474 from Matt-Yorkley/pi/import_options
PI: import options UI
2018-07-24 10:34:14 +10:00
Maikel
30be40ebd9 Merge pull request #2441 from kristinalim/fix-scoping_issue_in_sorting_of_tables
Fix front-end sorting in "Customers" index and "Bulk Order Management" page
2018-07-24 10:31:13 +10:00
Pau Pérez Fabregat
26d6ca4a54 Merge pull request #2487 from coopdevs/stricter-code-climate
Make CodeClimate config more strict
2018-07-23 12:42:06 +02:00
Pau Pérez Fabregat
687d7c5f38 Merge pull request #2483 from coopdevs/fix-setup-script
Fix script/setup by making it less clever
2018-07-23 12:31:50 +02:00
Pau Pérez Fabregat
b60bada542 Merge pull request #2495 from mkllnk/remove-newrelic
Remove unused gem newrelic-rpm
2018-07-23 11:19:27 +02:00
Pau Perez
14480b920e Fix script/setup by making it less clever
Now we ask the dev to create the "ofn" user as precondition. This is
way easier than developing a script that fits all possible setups.

It also stops requiring a particlar Postgres version. Although in
production we use 9.5 it is very unlikely we will use any
version-specific feature in the near future. This should make it a bit
easier for new devs to set up their environment.
2018-07-23 10:59:32 +02:00
Matt-Yorkley
67767f86eb Change import and reset logic to work with first page 2018-07-23 02:07:00 +01:00
Matt-Yorkley
bd200c885b Move options to first page 2018-07-23 01:46:32 +01:00
Kristina Lim
89ac558f37 Fix wrong sort predicates in customer index 2018-07-23 10:33:40 +10:00
Kristina Lim
47608525c6 Reset reverse when clicking another column to sort 2018-07-23 10:33:40 +10:00
Kristina Lim
5179f7fd63 Move logic for toggling by column into SortOptions 2018-07-23 10:33:40 +10:00
Kristina Lim
55d0b1dfc5 Generalize sorting through SortOptions service 2018-07-23 10:33:40 +10:00
Kristina Lim
8b6b694244 Remove unused sorting preferences in ColumnsCtrl 2018-07-23 10:33:40 +10:00
Kristina Lim
2bba72c5a9 Fix frontend sorting in "Bulk Order Management" 2018-07-23 10:33:40 +10:00
Kristina Lim
822b2c929a Fix frontend sorting in "Customers" index
The scope for customersCtrl did not have access to the sorting
preferences stored in the nested ColumnsCtrl scope. To address this,
the page has been changed to use a new set of sorting preferences
declared in the customersCtrl scope itself.

Also, these sorting preferences are now stored in an object. This
enables the parent scope to see changes to the sorting preferences which
are done via the nested ColumnsCtrl scope,

The "Bulk Order Management" page is also affected by the same scoping
issue. Once this page is fixed, we can remove remnants of the sorting
preferences initialized in ColumnsCtrl.
2018-07-23 10:33:39 +10:00
Kristina Lim
9f09861d8b Change sorting to be done in ascending order first
Currently, we always toggle "reverse" when triggering a sort.

If "reverse" is initially set to false, triggering a sort for the first
time then toggles this to true. The effect is that, the first time that
sorting is done, the rows are sorted in reverse order.

This is not intuitive - they should be sorted in ascending order first.
2018-07-23 10:33:39 +10:00
Kristina Lim
745390dcd5 Wrap rows in customer index with TBODY tag 2018-07-23 10:33:39 +10:00
Maikel
12838ba61e Merge pull request #2468 from mkllnk/improve-testing-embedded-pages
Improve testing embedded pages
2018-07-23 08:59:11 +10:00
Maikel
add250b30f Merge pull request #2473 from Matt-Yorkley/pi/stop_if_invalid
PI: Don't allow save if invalid entries are present
2018-07-23 08:54:01 +10:00
Maikel
df29d4d611 Merge pull request #2472 from lilwillifo/logo-sizing-to-css
Logo sizing to css
2018-07-23 08:47:45 +10:00
Pau Perez
7d790a7d59 Update .rubocop_todo.yml 2018-07-20 18:58:37 +02:00
Pau Perez
44fe3de732 Make CodeClimate config more strict
There's no point of using Code Climate if most of its checks are
disabled. Now it scores our codebase with an A and reports just 2 code
smells, 64 duplications and 14 other issues. That couldn't farther from
reality. If we care about the architecture and maintainability of our
app, this is a must.

To transition towards enabling all default checks, I started with
scss-lint, duplication and method-complexity. This doesn't mean will
have to fix them all straight away as we'll add the current violations
to the `.rubocop_todo.yml` but it'll point us the parts where we should
focus our efforts.
2018-07-20 09:08:03 +02:00
Maikel Linke
5f4115fbd9 Remove unused gem newrelic-rpm 2018-07-20 16:56:12 +10:00
Margaret Williford
512e974672 move width setting for tagline logo image from HTML to CSS 2018-07-20 14:00:06 +10:00
Margaret Williford
d952276e2a move footer logo sizing from html to css 2018-07-20 14:00:06 +10:00
Maikel
23964b2542 Merge pull request #2422 from luisramos0/1667_email_validation_fix
1667 manage validations emails
2018-07-20 12:19:23 +10:00
Maikel
1b571e9835 Merge pull request #2379 from Matt-Yorkley/uk/guest_label
Add guest label to admin customers index
2018-07-20 08:53:26 +10:00
Maikel Linke
962c54b606 Remove unnecessary expectation
The `iframe` is rendered in pure HTML and should always be there.
2018-07-19 10:45:33 +10:00
Maikel Linke
8a3a617870 DRY specs with new EmbeddedPagesHelper 2018-07-19 10:44:43 +10:00
luisramos0
8246893652 Added notice for unexpected mail in confirmation instructions mail (HugsDaniel) 2018-07-19 09:26:29 +10:00
Maikel
1dbd265b30 Merge pull request #2384 from luisramos0/open_new_tab
added directive to make links open in new tab by default in textangul…
v1.17.0
2018-07-19 09:17:09 +10:00
Matt-Yorkley
e3162b0a14 Change import method to fix missing variable error on asset precompilation 2018-07-18 23:00:50 +01:00
Matt-Yorkley
456e05d5d2 Include subfolders in scss import 2018-07-18 22:56:10 +01:00