Skip to content

Commit 9d4f4cc

Browse files
authored
Merge pull request #385 from PrestaShop/develop
Merge develop into master
2 parents 2667daa + aebfc39 commit 9d4f4cc

File tree

373 files changed

+6614
-11100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

373 files changed

+6614
-11100
lines changed

.eslintrc.js

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,35 @@ module.exports = {
1818
parserOptions: {
1919
parser: '@typescript-eslint/parser',
2020
},
21-
extends: ['prestashop', 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'plugin:jest/recommended'],
22-
plugins: ['import', '@typescript-eslint', 'jest'],
21+
extends: ['airbnb-base', 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'plugin:jest/recommended'],
22+
plugins: ['import', '@typescript-eslint', 'jest'],
2323
rules: {
24+
indent: ['error', 2, {SwitchCase: 1}],
25+
'function-paren-newline': ['off', 'never'],
26+
'object-curly-spacing': ['error', 'never'],
27+
'padding-line-between-statements': [
28+
'error',
29+
{
30+
blankLine: 'always',
31+
prev: ['for', 'switch', 'var', 'let', 'const'],
32+
next: 'return',
33+
},
34+
{
35+
blankLine: 'always',
36+
prev: ['for', 'switch'],
37+
next: ['var', 'let', 'const'],
38+
},
39+
{
40+
blankLine: 'always',
41+
prev: ['var', 'let', 'const'],
42+
next: ['switch', 'for', 'if'],
43+
},
44+
],
45+
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
46+
'no-console': process.env.NODE_ENV === 'production' ? 2 : 0,
47+
'import/no-unresolved': 0,
48+
'import/extensions': ['off', 'never'],
49+
'no-use-before-define': 0,
2450
'class-methods-use-this': 0,
2551
'func-names': 0,
2652
'import/no-extraneous-dependencies': [
@@ -29,26 +55,28 @@ module.exports = {
2955
devDependencies: ['tests/**/*.js', '.webpack/**/*.js'],
3056
},
3157
],
32-
'max-len': ['error', { code: 120 }],
58+
'max-len': ['error', {code: 120}],
3359
'no-alert': 0,
3460
'no-bitwise': 0,
3561
'no-new': 0,
3662
'max-classes-per-file': 0,
37-
'no-param-reassign': ['error', { props: false }],
63+
'no-param-reassign': ['error', {props: false}],
3864
'no-restricted-globals': [
3965
'error',
4066
{
4167
name: 'global',
4268
message: 'Use window variable instead.',
4369
},
4470
],
45-
'prefer-destructuring': ['error', { object: true, array: false }],
71+
'prefer-destructuring': ['error', {object: true, array: false}],
72+
'no-shadow': 'off',
73+
'@typescript-eslint/no-shadow': ['error'],
4674
},
4775
settings: {
4876
'import/resolver': 'webpack',
4977
},
5078
env: {
51-
'jest/globals': true
79+
'jest/globals': true,
5280
},
5381
overrides: [
5482
{

CONTRIBUTING.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,47 @@
33
### Understanding
44

55
Before getting started, you should read our article introducing the project:
6-
[We're Building A Starter Theme For PrestaShop 1.7.0.0](http://build.prestashop.com/news/starter-theme-kickoff/).
6+
[We're Building A Starter Theme For PrestaShop 1.7.8 and 8](https://build.prestashop.com/news/new-theme-announce/).
77

88
If you are contributing to this theme, you are probably interested in PrestaShop development as well. Please the following article to get familiar with [PrestaShop branching model](http://build.prestashop.com/news/introducing-new-branching-model-prestashop/).
99

10-
You got any questions ? Join the gitter chat room.
11-
12-
[![Join the chat at https://gitter.im/PrestaShop/StarterTheme](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PrestaShop/StarterTheme?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
10+
You got any questions ? Join the open source slack.
1311

12+
[Join the slack at https://www.prestashop-project.org/slack/](https://www.prestashop-project.org/slack/)
1413

1514
### Setting up
1615

1716
There are few things to do before you are ready to contribute.
1817

1918
1. Check your _Git_ configuration. Read [Set Up Your Git For Contributing](http://build.prestashop.com/howtos/misc/set-up-your-git-for-contributing/)
20-
1. Check your editor configuration. The rules are defined in `.editorconfig`. Do it manually or [install the available plugin](http://editorconfig.org/#download).
19+
2. Check your editor configuration. The rules are defined in `.editorconfig`. Do it manually or [install the available plugin](http://editorconfig.org/#download).
20+
3. Make sure you at least have [NodeJS 14](https://nodejs.org/en/download/) installed.
21+
4. You should install the theme inside a PrestaShop instance, please refer to [the developers docummentation of the project](https://devdocs.prestashop.com/1.7/basics/installation/).
22+
23+
### How to build the theme
24+
25+
First you need to install every node module:
26+
27+
`npm i`
28+
29+
then create a `.env` file inside the *webpack* folder by copying `webpack/.env-example` and complete it with your environment's informations. Please use a free tcp port.
30+
31+
then build assets:
32+
33+
`npm run build`
34+
35+
### Good practices
2136

37+
- Follow the BEM convention
38+
- Be careful about creating SCSS files in the right folder, refer to the [documentation](https://build.prestashop.com/hummingbird/) for further informations.
39+
- When you want to submit a PR, please make sure that you ran both linters using `npm run lint-fix && npm run scss-fix` and fixed every lint issues.
40+
- If your PR is a work in progress, make sure that you use the Github draft mode.
41+
- Fill the PR template as much as possible, it's important to speed the process of testing, reviewing...
42+
- Try to organize your commits in a way to simplify the review.
2243

2344
### Reporting issues
2445

2546
Open an issue:
2647

2748
1. To report a bug.
28-
1. To propose an improvement and get feedbacks before you code it. ([example](https://github.com/PrestaShop/StarterTheme/issues/2))
49+
2. To propose an improvement and get feedbacks before you code it. ([example](https://github.com/PrestaShop/hummingbird/issues/))

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Hummingbird theme
22

3-
This is the new theme of PrestaShop we are working on. Please, if you work on this theme, use the `develop` branch of PrestaShop, because this theme will be available from version 8.0.
3+
This is a PrestaShop's theme we are working on. Please, if you work on this theme, use the `1.7.8.x` branch of PrestaShop to make sure this theme is compatible with the latest `1.7` version.
44

55
[Read more](https://build.prestashop.com/news/new-theme-announce/) about this theme on the blog.
66

77
## How to build assets
88

9-
Same as the PrestaShop project, you need **NodeJS 14.x** and **NPM 7** in order to build the project.
9+
Same as the PrestaShop project, you need at least **NodeJS 14.x** and **NPM 7** in order to build the project.
1010

1111
First you need to install every node module:
1212

@@ -18,6 +18,22 @@ then build assets:
1818

1919
`npm run build`
2020

21+
## Documentation
22+
23+
We use Storybook as a [documentation](https://build.prestashop.com/hummingbird/). As the theme is currently in development, there is a lot of work on documentation. Don't hesitate to add whatever you feel usefull to it.
24+
25+
## Contributing
26+
27+
Please refer to the [contributing guide](https://github.com/PrestaShop/hummingbird/blob/develop/CONTRIBUTING.md)
28+
29+
## Continuous Integration
30+
31+
The CI runs contain stylelint, eslint, TypeScript type checks.
32+
33+
## Continuous Deployment
34+
35+
When develop is merged into master, the Storybook is delivered almost instantly to his public link using a Github Pages.
36+
2137
## License
2238

2339
This theme is released under the [Academic Free License 3.0][AFL-3.0]

config/theme.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 0.1.0
44
author:
55
name: "PrestaShop Team"
66
7-
url: "https://www.prestashop.com"
7+
url: "https://www.prestashop-project.org/"
88

99
meta:
1010
compatibility:
@@ -67,16 +67,19 @@ global_settings:
6767
- ps_searchbar
6868
displayHome:
6969
- ps_imageslider
70+
- ps_customtext
7071
- ps_featuredproducts
7172
- ps_banner
72-
- ps_customtext
73+
- ps_newproducts
74+
- ps_bestsellers
7375
displayFooterBefore:
7476
- ps_emailsubscription
7577
- ps_socialfollow
7678
displayFooter:
7779
- ps_linklist
7880
- ps_customeraccountlinks
7981
- ps_contactinfo
82+
- ~
8083
displayLeftColumn:
8184
- ps_categorytree
8285
- ps_facetedsearch

jest.config.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
const path = require('path');
2-
31
const config = {
2+
preset: 'ts-jest',
43
testEnvironment: 'jsdom',
5-
'moduleNameMapper': {
4+
moduleNameMapper: {
65
'^@js(.*)$': '<rootDir>/src/js$1',
76
'^@services(.*)$': '<rootDir>/src/js/services$1',
87
'^@constants(.*)$': '<rootDir>/src/js/constants$1',
98
'^@helpers(.*)$': '<rootDir>/src/js/helpers$1',
10-
}
9+
},
1110
};
1211

1312
module.exports = config;

modules/blockreassurance/views/templates/hook/blockreassurance.tpl

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,6 @@
11
{**
2-
* Copyright since 2007 PrestaShop SA and Contributors
3-
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
4-
*
5-
* NOTICE OF LICENSE
6-
*
7-
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
8-
* that is bundled with this package in the file LICENSE.md.
9-
* It is also available through the world-wide-web at this URL:
10-
* https://opensource.org/licenses/AFL-3.0
11-
* If you did not receive a copy of the license and are unable to
12-
* obtain it through the world-wide-web, please send an email
13-
* to [email protected] so we can send you a copy immediately.
14-
*
15-
* DISCLAIMER
16-
*
17-
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
18-
* versions in the future. If you wish to customize PrestaShop for your
19-
* needs please refer to https://devdocs.prestashop.com/ for more information.
20-
*
21-
* @author PrestaShop SA and Contributors <[email protected]>
22-
* @copyright Since 2007 PrestaShop SA and Contributors
23-
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
2+
* For the full copyright and license information, please view the LICENSE
3+
* file that was distributed with this source code.
244
*}
255
{if $elements}
266
<div id="block-reassurance">

modules/contactform/views/templates/widget/contactform.tpl

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,6 @@
11
{**
2-
* Copyright since 2007 PrestaShop SA and Contributors
3-
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
4-
*
5-
* NOTICE OF LICENSE
6-
*
7-
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
8-
* that is bundled with this package in the file LICENSE.md.
9-
* It is also available through the world-wide-web at this URL:
10-
* https://opensource.org/licenses/AFL-3.0
11-
* If you did not receive a copy of the license and are unable to
12-
* obtain it through the world-wide-web, please send an email
13-
* to [email protected] so we can send you a copy immediately.
14-
*
15-
* DISCLAIMER
16-
*
17-
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
18-
* versions in the future. If you wish to customize PrestaShop for your
19-
* needs please refer to https://devdocs.prestashop.com/ for more information.
20-
*
21-
* @author PrestaShop SA and Contributors <[email protected]>
22-
* @copyright Since 2007 PrestaShop SA and Contributors
23-
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
2+
* For the full copyright and license information, please view the LICENSE
3+
* file that was distributed with this source code.
244
*}
255
<section class="contact-form">
266
<form action="{$urls.pages.contact}" method="post" {if $contact.allow_file_upload}enctype="multipart/form-data"{/if}>

modules/productcomments/views/templates/hook/alert-modal.tpl

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,6 @@
11
{**
2-
* Copyright since 2007 PrestaShop SA and Contributors
3-
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
4-
*
5-
* NOTICE OF LICENSE
6-
*
7-
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
8-
* that is bundled with this package in the file LICENSE.md.
9-
* It is also available through the world-wide-web at this URL:
10-
* https://opensource.org/licenses/AFL-3.0
11-
* If you did not receive a copy of the license and are unable to
12-
* obtain it through the world-wide-web, please send an email
13-
* to [email protected] so we can send you a copy immediately.
14-
*
15-
* DISCLAIMER
16-
*
17-
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
18-
* versions in the future. If you wish to customize PrestaShop for your
19-
* needs please refer to https://devdocs.prestashop.com/ for more information.
20-
*
21-
* @author PrestaShop SA and Contributors <[email protected]>
22-
* @copyright Since 2007 PrestaShop SA and Contributors
23-
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
2+
* For the full copyright and license information, please view the LICENSE
3+
* file that was distributed with this source code.
244
*}
255

266
{assign var='icon' value=$icon|default:'check_circle'}

modules/productcomments/views/templates/hook/confirm-modal.tpl

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,6 @@
11
{**
2-
* Copyright since 2007 PrestaShop SA and Contributors
3-
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
4-
*
5-
* NOTICE OF LICENSE
6-
*
7-
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
8-
* that is bundled with this package in the file LICENSE.md.
9-
* It is also available through the world-wide-web at this URL:
10-
* https://opensource.org/licenses/AFL-3.0
11-
* If you did not receive a copy of the license and are unable to
12-
* obtain it through the world-wide-web, please send an email
13-
* to [email protected] so we can send you a copy immediately.
14-
*
15-
* DISCLAIMER
16-
*
17-
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
18-
* versions in the future. If you wish to customize PrestaShop for your
19-
* needs please refer to https://devdocs.prestashop.com/ for more information.
20-
*
21-
* @author PrestaShop SA and Contributors <[email protected]>
22-
* @copyright Since 2007 PrestaShop SA and Contributors
23-
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
2+
* For the full copyright and license information, please view the LICENSE
3+
* file that was distributed with this source code.
244
*}
255

266
{assign var='icon' value=$icon|default:'check_circle'}

modules/productcomments/views/templates/hook/empty-product-comment.tpl

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,6 @@
11
{**
2-
* Copyright since 2007 PrestaShop SA and Contributors
3-
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
4-
*
5-
* NOTICE OF LICENSE
6-
*
7-
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
8-
* that is bundled with this package in the file LICENSE.md.
9-
* It is also available through the world-wide-web at this URL:
10-
* https://opensource.org/licenses/AFL-3.0
11-
* If you did not receive a copy of the license and are unable to
12-
* obtain it through the world-wide-web, please send an email
13-
* to [email protected] so we can send you a copy immediately.
14-
*
15-
* DISCLAIMER
16-
*
17-
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
18-
* versions in the future. If you wish to customize PrestaShop for your
19-
* needs please refer to https://devdocs.prestashop.com/ for more information.
20-
*
21-
* @author PrestaShop SA and Contributors <[email protected]>
22-
* @copyright Since 2007 PrestaShop SA and Contributors
23-
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
2+
* For the full copyright and license information, please view the LICENSE
3+
* file that was distributed with this source code.
244
*}
255

266
<div id="empty-product-comment" class="product-comment-list-item">

0 commit comments

Comments
 (0)