Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for node iron lts #155

Merged
merged 9 commits into from
Sep 30, 2024
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup node env
uses: actions/setup-node@v3
with:
node-version: 14
node-version: 20

- name: Install dependencies
working-directory: ./_dev
Expand All @@ -32,7 +32,7 @@ jobs:
rm _dev/ -rf

- name: Create & Upload artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}
path: ./
Expand All @@ -42,7 +42,7 @@ jobs:
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
steps:
- name: Download artifact
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: ${{ github.event.repository.name }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '14.x'
node-version: '20.x'

- name: FrontOffice Theme `classic`
run: cd _dev && npm install && npm run scss-lint
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '14.x'
node-version: '20.x'

- name: Validate npm config
run: cd _dev && npm ci
Expand Down
15 changes: 15 additions & 0 deletions .hintrc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be put in the _dev folder along with the package.json file and all the other configs?

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": [
"development"
],
"hints": {
"compat-api/css": [
"default",
{
"ignore": [
"-moz-appearance"
]
}
]
}
}
1 change: 1 addition & 0 deletions _dev/.stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodes_modules
6 changes: 3 additions & 3 deletions _dev/.stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"stylelint-config-prestashop"
],
"rules": {
"selector-id-pattern": null,
"selector-max-id": null,
"selector-max-class": null,
"selector-max-type": null,
"selector-max-compound-selectors": null,
"selector-no-qualifying-type": null,
"selector-max-combinators": null,
"selector-class-pattern": null,
"selector-descendant-combinator-no-non-space": null,
"function-blacklist": null,
"function-disallowed-list": null,
"scss/dollar-variable-default": null,
"property-blacklist": null
"property-disallowed-list": null
}
}
2 changes: 0 additions & 2 deletions _dev/css/components/products.scss
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@
width: auto;

.btn {
padding: 0.5rem 0.6875rem;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove this one? This seems like an UX change not required for the Node 20 compatibility no?
Unless this is related to the bootstrap-touchspin update you mentioned?


i {
top: 0.125rem;
left: 0.1875rem;
Expand Down
15 changes: 10 additions & 5 deletions _dev/css/partials/_commons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,11 @@ textarea {
$gray-light
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAAAPklEQVR4Ae3TwREAEBQD0V/6do4SXPZg7EsBhsQ8IEmSMOsiuEfg3gL3oXC7wK0bd1G4o8X9F4yIkyQfSrIByQBjp7QuND8AAAAASUVORK5CYII=")
no-repeat scroll right 0.5rem center / 1.25rem 1.25rem;
/* stylelint-disable */
/* stylelint-disable-next-line property-no-vendor-prefix */
-moz-appearance: none;
/* stylelint-disable-next-line property-no-vendor-prefix */
-webkit-appearance: none;
/* stylelint-enable */
appearance: none;
}

.form-control-valign {
Expand Down Expand Up @@ -599,7 +600,6 @@ form {
.modal-dialog-centered {
display: flex;
align-items: center;
// 30px corresponds to the default margin size from bootstrap 4.0.0-alpha.5 for modal-dialog class
min-height: calc(100% - (30px * 2));
}

Expand All @@ -608,17 +608,22 @@ form {
}

input[type="number"] {
/* stylelint-disable */
/* stylelint-disable-next-line property-no-vendor-prefix */
-moz-appearance: textfield;
appearance: textfield;

&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button {
margin: 0;
/* stylelint-disable-next-line property-no-vendor-prefix */
-webkit-appearance: none;
}
/* stylelint-enable */
}

.ui-autocomplete.ui-front {
z-index: 999;
}

.btn.btn-touchspin.js-touchspin.bootstrap-touchspin-up {
border-radius: 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question as above, what is the link between this and the Node 20 compatibility?

}
5 changes: 2 additions & 3 deletions _dev/css/partials/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
font-size: 24px; /* Preferred icon size */
font-style: normal;
font-weight: 500;
font-feature-settings: "liga";
line-height: 1;
text-transform: none;
letter-spacing: normal;
Expand All @@ -35,11 +36,9 @@
-webkit-font-smoothing: antialiased;

/* Support for Safari and Chrome. */
text-rendering: optimizeLegibility;
text-rendering: "optimizeLegibility";

/* Support for Firefox. */
-moz-osx-font-smoothing: grayscale;

/* Support for IE. */
font-feature-settings: "liga";
}
1 change: 1 addition & 0 deletions _dev/css/partials/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ $gray-lighter-second: #f7f7f7;
$border-gray: #ddd;
$brand-primary: #24b9d7;
$brand-secondary: #f39d72;
$brand-info: #5bc0de;
$brand-success: #4cbb6c;
$brand-warning: #ff9a52;
$brand-danger: #ff4c4c;
Expand Down
2 changes: 1 addition & 1 deletion _dev/css/theme.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* stylelint-disable */
@import "~bourbon/app/assets/stylesheets/bourbon";
@import "partials/_variables";
@import "~bourbon/core/bourbon";
@import "~bootstrap/scss/bootstrap";
@import "~bootstrap-touchspin/dist/jquery.bootstrap-touchspin.min.css";
@import "partials/_mixins";
Expand Down
4 changes: 2 additions & 2 deletions _dev/js/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ function createSpin() {
$.each($(spinnerSelector), (index, spinner) => {
$(spinner).TouchSpin({
verticalbuttons: true,
verticalupclass: 'material-icons touchspin-up',
verticaldownclass: 'material-icons touchspin-down',
verticalupclass: 'glyphicon glyphicon-plus',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this change the style of all the icons?
Is it also because of bootstrap-touchspin update?

verticaldownclass: 'glyphicon glyphicon-minus',
buttondown_class: 'btn btn-touchspin js-touchspin js-increase-product-quantity',
buttonup_class: 'btn btn-touchspin js-touchspin js-decrease-product-quantity',
min: parseInt($(spinner).attr('min'), 10),
Expand Down
4 changes: 2 additions & 2 deletions _dev/js/listing.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ $(document).ready(() => {
}
qv.find(prestashop.selectors.quantityWanted).TouchSpin({
verticalbuttons: true,
verticalupclass: 'material-icons touchspin-up',
verticaldownclass: 'material-icons touchspin-down',
verticalupclass: 'glyphicon glyphicon-plus',
verticaldownclass: 'glyphicon glyphicon-minus',
buttondown_class: 'btn btn-touchspin js-touchspin',
buttonup_class: 'btn btn-touchspin js-touchspin',
min: 1,
Expand Down
4 changes: 2 additions & 2 deletions _dev/js/product.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ $(document).ready(() => {

$quantityInput.TouchSpin({
verticalbuttons: true,
verticalupclass: 'material-icons touchspin-up',
verticaldownclass: 'material-icons touchspin-down',
verticalupclass: 'glyphicon glyphicon-plus',
verticaldownclass: 'glyphicon glyphicon-minus',
buttondown_class: 'btn btn-touchspin js-touchspin',
buttonup_class: 'btn btn-touchspin js-touchspin',
min: parseInt($quantityInput.attr('min'), 10),
Expand Down
Loading
Loading