Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 35 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"parserOptions": {
"requireConfigFile": false,
"babelOptions": {
"presets": [
"@babel/preset-env"
]
}
},
"rules": {
"indent": [
2,
Expand All @@ -24,15 +32,39 @@
"prefer-destructuring": 0,
"import/no-named-as-default": 0,
"import/no-named-as-default-member": 0,
"import/prefer-default-export": "off"
"import/prefer-default-export": "off",
"no-tabs": "warn",
"no-mixed-spaces-and-tabs": "warn",
"import/order": "warn"
},
"overrides": [
{
"files": [
"**/*.spec.js"
],
"rules": {
"no-multi-str": "warn"
}
},
{
"files": [
"assets/js/theme/*.js"
],
"rules": {
"object-curly-newline": "warn",
"no-else-return": "warn"
}
}
],
"globals": {
"$": true,
"jQuery": true
},
"env": {
"es6": true,
"browser": true
"browser": true,
"jasmine": true,
"jest": true
},
"extends": "airbnb/base"
}
10 changes: 5 additions & 5 deletions .github/workflows/pull_request_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ jobs:

strategy:
matrix:
node: [16.x]
node: [20.x]

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: npm cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -49,12 +49,12 @@ jobs:
run: npx stencil bundle --name bundle

- name: Upload bundled theme
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Bundled Theme
path: bundle.zip
- name: Upload bundle analysis
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Webpack Analysis
path: assets/dist/report.html
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.18.1
10 changes: 6 additions & 4 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"extends": "stylelint-config-sass-guidelines",
"customSyntax": "postcss-scss",
"plugins": [
"@stylistic/stylelint-plugin",
"stylelint-scss"
],
"rules": {
"color-named": null,
"indentation": 4,
"max-nesting-depth": null,
"property-no-vendor-prefix": null,
"selector-no-vendor-prefix": null,
Expand All @@ -17,7 +17,9 @@
"selector-max-compound-selectors": null,
"selector-max-id": null,
"selector-no-qualifying-type": null,
"string-quotes": "double",
"value-no-vendor-prefix": null
"value-no-vendor-prefix": null,
"scss/no-global-function-names": null,
"@stylistic/indentation": 4,
"@stylistic/string-quotes": "double"
}
}
173 changes: 173 additions & 0 deletions CUSTOMIZATIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
# Midwest Nice Theme Customizations

This document tracks all customizations made to the BigCommerce Cornerstone theme that need to be preserved during future upgrades.

## Overview
- **Theme Version:** 6.16.2 (upgraded from 6.12.0)
- **Last Updated:** September 2024
- **Customization Count:** 8 major areas

## Customization Inventory

### 1. Header Customizations
**Files:** `assets/scss/layouts/header/_header.scss`
- **Logo positioning:** `margin: 0 auto`, `width: 70%` for mobile
- **Border styling:** Commented-out `border-bottom` lines preserved
- **Mobile menu toggle:** Custom styling with `background: $header-font-color`, `top: remCalc(27)`

### 2. Product List Customizations
**Files:** `assets/scss/layouts/products/_productList.scss`
- **Focus/hover effects:** Custom `:focus-within` and `.focus-within` styling for `.listItem-figureBody`
- **Interactive states:** Enhanced hover and focus behavior for product list items

### 3. Product Card Hover Effect
**Files:** `assets/scss/components/citadel/cards/_cards.scss`
- **Two-image fade effect:** Product cards with two images that fade between on hover
- **Key CSS:**
```scss
.card-image-2 {
position: absolute;
top: 0;
left: 0;
opacity: 0;
transition: opacity 0.3s ease;
z-index: 2;
}
.card-figure:hover .card-image-2 {
opacity: 1;
}
```

### 4. Product Sale Badge Customizations
**Files:** `assets/scss/layouts/products/_productSaleBadges.scss`
- **Hover effects:** Multiple `.product:hover .sold-out-flag-sash` rules
- **Custom styling:** Enhanced sold-out badge behavior on product hover

### 5. Product Swatch Customizations
**Files:** `assets/scss/layouts/products/_productSwatch.scss`
- **Border radius:** Custom `border-radius` for `.form-option.form-option-swatch`
- **Spacing:** `margin-right: .75rem` for form options
- **Variant styling:** `border-radius` for `.form-option-variant--color, .form-option-variant--pattern`

### 6. Product View Customizations
**Files:** `assets/scss/layouts/products/_productView.scss`
- **Size chart styling:** Reduced padding for `table.size-chart th, td`
- **Product detail page:** Custom table styling for size charts

### 7. Product Details JavaScript Customizations
**Files:** `assets/js/theme/common/product-details.js`
- **Date selector function:** `updateDateSelector` function for custom date option handling
- **Cart celebration:** `addToCartCelebration` function for visual effect on adding to cart
- **Import paths:** Updated to use relative paths for `nod`, `form-utils`, and `forms`

### 8. NavUser Section Customizations
**Files:**
- `assets/scss/settings/stencil/navUser/_settings.scss`
- `assets/scss/components/stencil/navUser/_navUser.scss`

**Settings:**
- **Background color:** `$navUser-backgroundColor: #314a6d;`

**Styling:**
- **Section styling:** Custom background and border-radius for `.navUser-section--styled`
- **Action styling:** Different font-weight (normal vs bold), custom font-size (14px)
- **Cart styling:** Specific margin-top (12px mobile, 2px desktop), custom padding
- **CountPill styling:** Commented out background, custom positioning (left: 17px, top: 14px)
- **Cart label display:** Custom display settings for different breakpoints

### 9. Language Customizations
**Files:** `lang/en.json`
- **Gift Cards:** Changed "Gift Certificates" to "Gift Cards" in multiple locations
- `"gift_cert": "Gift Cards"`
- `"heading": "Gift Cards"`

### 10. Footer Template Customizations
**Files:** `templates/components/common/footer.html`
- **Duplicate info removal:** Removed duplicate store information section
- **Clean layout:** Store info now displays only once in the footer

### 11. Klaviyo Script Integration
**Files:** `templates/layout/base.html`
- **Klaviyo initialization:** Added Klaviyo object initialization script to base layout
- **Global tracking:** Ensures Klaviyo tracking works across all pages
- **Newsletter integration:** Klaviyo footer form integration preserved

## Template Customizations

### Product Card Template
**Files:** `templates/components/products/card.html`
- **Two-image structure:** Contains `card-image-2` span for hover effect
- **Conditional rendering:** Shows second image when `images.length > 1`

## Upgrade Strategy

### Before Upgrading:
1. **Backup current theme:** Create a backup branch
2. **Review this document:** Ensure all customizations are documented
3. **Test current functionality:** Verify all customizations work

### During Upgrade:
1. **Use selective merge:** `git merge upstream/master -X theirs --no-commit`
2. **Resolve conflicts:** Prioritize upstream changes for core files
3. **Preserve customizations:** Manually restore customizations from backup

### After Upgrading:
1. **Restore customizations:** Apply each customization from this document
2. **Test functionality:** Verify all customizations work with new version
3. **Update documentation:** Add any new customizations to this file
4. **Build and test:** Run `stencil bundle` to ensure everything works

## Critical Files to Monitor

### SCSS Files:
- `assets/scss/layouts/header/_header.scss`
- `assets/scss/layouts/products/_productList.scss`
- `assets/scss/components/citadel/cards/_cards.scss`
- `assets/scss/layouts/products/_productSaleBadges.scss`
- `assets/scss/layouts/products/_productSwatch.scss`
- `assets/scss/layouts/products/_productView.scss`
- `assets/scss/components/stencil/navUser/_navUser.scss`
- `assets/scss/settings/stencil/navUser/_settings.scss`

### JavaScript Files:
- `assets/js/theme/common/product-details.js`

### Template Files:
- `templates/components/products/card.html`
- `templates/components/common/footer.html`
- `templates/layout/base.html`

### Language Files:
- `lang/en.json`

### Configuration Files:
- `config.json` (usually preserved)
- `schema.json` (usually preserved)
- `config.stencil.json` (usually preserved)

## Testing Checklist

After each upgrade, verify:
- [ ] Header logo positioning and mobile menu styling
- [ ] Product list hover and focus effects
- [ ] Product card two-image hover effect
- [ ] Product sale badge hover effects
- [ ] Product swatch styling and spacing
- [ ] Product view size chart styling
- [ ] Product details date selector and cart celebration
- [ ] NavUser section background color (#314a6d) and styling
- [ ] Language text shows "Gift Cards" instead of "Gift Certificates"
- [ ] Footer displays store info only once (no duplicates)
- [ ] Klaviyo scripts are properly initialized and working
- [ ] Theme builds successfully with `stencil bundle`

## Notes

- **Version 6.16.2:** Successfully upgraded from 6.12.0 with all customizations preserved
- **Build Status:** All customizations work correctly with current version
- **Dependencies:** Node.js 20.x required for Stencil CLI compatibility
- **Last Tested:** September 2024

---

**Remember:** Always test thoroughly after upgrades and update this document with any new customizations or changes to existing ones.
85 changes: 85 additions & 0 deletions UPGRADE_CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Theme Upgrade Checklist

Use this checklist when upgrading to newer versions of the BigCommerce Cornerstone theme.

## Pre-Upgrade Steps

- [ ] **Create backup branch:** `git checkout -b backup-before-upgrade`
- [ ] **Document current version:** Note the current theme version
- [ ] **Test current functionality:** Verify all customizations work
- [ ] **Review CUSTOMIZATIONS.md:** Ensure all customizations are documented

## Upgrade Process

- [ ] **Fetch upstream changes:** `git fetch upstream`
- [ ] **Start selective merge:** `git merge upstream/master -X theirs --no-commit`
- [ ] **Resolve any conflicts:** Prioritize upstream changes for core files
- [ ] **Check Node.js version:** Ensure Node.js 20.x is being used
- [ ] **Update dependencies:** `npm install`

## Post-Upgrade Recovery

- [ ] **Run recovery script:** `./scripts/restore-customizations.sh`
- [ ] **Or manually restore:** Follow CUSTOMIZATIONS.md for each customization
- [ ] **Test theme build:** `npm run build`
- [ ] **Test Stencil build:** `stencil bundle`
- [ ] **Verify all customizations:** Use testing checklist below

## Testing Checklist

After upgrade, verify these customizations work:

### Visual Customizations
- [ ] Header logo positioning and mobile menu styling
- [ ] Product card two-image hover effect (fade between images)
- [ ] Product list hover and focus effects
- [ ] Product sale badge hover effects
- [ ] Product swatch styling and spacing
- [ ] Product view size chart styling
- [ ] NavUser section background color (#314a6d)

### Functional Customizations
- [ ] Product details date selector functionality
- [ ] Cart celebration effect on add to cart
- [ ] NavUser section styling and positioning
- [ ] Cart behavior and countPill styling

### Text Customizations
- [ ] "Gift Cards" appears instead of "Gift Certificates"

### Build Verification
- [ ] `npm run build` completes successfully
- [ ] `stencil bundle` completes successfully
- [ ] No critical errors in build output
- [ ] Theme bundle generated successfully

## Final Steps

- [ ] **Update documentation:** Add any new customizations to CUSTOMIZATIONS.md
- [ ] **Commit changes:** `git add . && git commit -m "Restore customizations after upgrade to vX.X.X"`
- [ ] **Test in staging:** Deploy to staging environment for final testing
- [ ] **Update version notes:** Document any issues or changes in this checklist

## Troubleshooting

### Common Issues:
- **Build failures:** Check Node.js version (should be 20.x)
- **Missing customizations:** Run recovery script or manually restore from backup
- **CSS conflicts:** Check for variable name changes in SCSS files
- **JavaScript errors:** Verify import paths and function names

### Recovery Commands:
```bash
# Restore specific file from backup
git checkout backup-before-upgrade -- path/to/file

# Run automated recovery
./scripts/restore-customizations.sh

# Check what changed
git diff backup-before-upgrade -- path/to/file
```

---

**Remember:** Always test thoroughly in a staging environment before deploying to production!
Loading