Skip to content

Commit

Permalink
Merge pull request #178 from hubblecommerce/rc2.10
Browse files Browse the repository at this point in the history
Rc2.10
  • Loading branch information
dm-heinze authored Oct 11, 2024
2 parents a9ba20d + ec93134 commit 86695ef
Show file tree
Hide file tree
Showing 10 changed files with 3,471 additions and 4,124 deletions.
6 changes: 5 additions & 1 deletion docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { defineUserConfig, defaultTheme } from 'vuepress'
import { viteBundler } from '@vuepress/bundler-vite'
import { defaultTheme } from '@vuepress/theme-default'
import { defineUserConfig } from 'vuepress'

export default defineUserConfig({
lang: 'en-US',
title: 'hubble PWA Docs',
description: 'Developer Documentation for hubble PWA',
bundler: viteBundler(),
theme: defaultTheme({
contributors: false,
lastUpdated: false,
Expand All @@ -14,6 +17,7 @@ export default defineUserConfig({
{ text: 'Github', link: 'https://github.com/hubblecommerce/hubble-frontend-pwa/tree/hubble-next' },
],
sidebar: {
'/': [],
'/pwa/': [
{
text: 'What is hubble PWA?',
Expand Down
24 changes: 15 additions & 9 deletions docs/.vuepress/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
:root {
// brand colors
--c-brand: #A20158;
--c-brand-light: #c0026b;
--vp-c-accent: #A20158;
--vp-c-accent-bg: #c0026b;
--vp-c-accent-hover: #A20158;

--c-tip: #A20158;
--vp-c-acc: #A20158;
}

html.dark {
[data-theme=dark] {
// brand colors darkmode
--c-brand: #d00171;
--c-brand-light: #f60189;
--vp-c-accent: #d00171;
--vp-c-accent-bg: #f60189;
--vp-c-accent-hover: #d00171;

--c-tip: #d00171;
--vp-c-acc: #d00171;
}

// Handle darkmode logo inside contents
Expand All @@ -23,7 +25,7 @@ html.dark {
display: none;
}

html.dark {
[data-theme=dark] {
.logo-bright {
display: none;
}
Expand All @@ -39,4 +41,8 @@ html.dark {

.contains-task-list li {
list-style-type: none;
}
}

.vp-page-nav .route-link {
border: none;
}
7,526 changes: 3,426 additions & 4,100 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hubblecommerce/hubble",
"version": "2.9.0",
"version": "2.10.0",
"description": "PWA for eCommerce frameworks based on NuxtJs",
"author": "hubble commerce",
"license": "MIT",
Expand Down Expand Up @@ -66,17 +66,21 @@
"@nuxt/kit": "^3.2.3",
"@nuxtjs/color-mode": "^3.2.0",
"@nuxtjs/i18n": "^8.2.0",
"@nuxtjs/tailwindcss": "^6.4.1",
"@pinia/nuxt": "^0.5.1",
"@vuepress/bundler-vite": "^2.0.0-rc.18",
"@vuepress/theme-default": "^2.0.0-rc.54",
"@vueuse/core": "^11.0.3",
"@vueuse/nuxt": "^11.0.3",
"autoprefixer": "^10.4.20",
"csvtojson": "^2.0.10",
"daisyui": "^4.7.3",
"fs-extra": "^11.1.0",
"globby": "^14.0.0",
"lmify": "^0.3.0",
"mitt": "^3.0.0",
"portal-vue": "^3.0.0",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.13",
"ufo": "^1.3.0",
"untyped": "^1.2.2",
"unzipper": "^0.12.3",
Expand All @@ -95,12 +99,12 @@
"eslint-plugin-vue": "^9.9.0",
"husky": "^9.1.4",
"lint-staged": "^15.2.10",
"nuxt": "^3.13.0",
"nuxt": "^3.13.2",
"openapi-typescript-codegen": "^0.29.0",
"rollup-plugin-copy": "^3.4.0",
"start-server-and-test": "^2.0.0",
"typescript": "^5.3.3",
"vite-plugin-eslint": "^1.8.1",
"vuepress": "2.0.0-beta.68"
"vuepress": "^2.0.0-rc.18"
}
}
3 changes: 2 additions & 1 deletion src/commons/utils/types/HblOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ export interface HblOrder {
status: string,
documents: HblOrderDocument[],
shippingAddress?: HblCustomerShippingAddress,
shippingMethod?: HblShippingMethod
shippingMethod?: HblShippingMethod,
shippingTotal: number | null
}
1 change: 1 addition & 0 deletions src/commons/utils/types/HblProduct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export interface HblProduct {
name: string,
description?: string,
sku: string,
pathInfo: string,
url: string,
media?: HblMedia[] | HblMedia,
active: boolean,
Expand Down
18 changes: 10 additions & 8 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,6 @@ export default defineNuxtModule<ModuleOptions>({
nuxt.options.vite.optimizeDeps?.exclude?.push('@hubblecommerce/hubble')
}

// Add custom error page
// nuxt.hook('app:resolve', (app) => {
// app.errorComponent = resolve(join(targetDir, 'components/misc/MiscError.vue'))
// })

// Performance: Remove dynamic import prefetching
nuxt.hook('build:manifest', (manifest) => {
for (const key in manifest) {
Expand All @@ -280,9 +275,16 @@ export default defineNuxtModule<ModuleOptions>({
/*
* Theming
*/
await installModule('@nuxtjs/tailwindcss', {
configPath: join(targetDir, 'tailwind.config.ts')
})
// Set Standard installation guide: https://tailwindcss.com/docs/guides/nuxtjs as default
// can be overridden via nuxt.config
nuxt.options.css.push(resolve(join(targetDir, 'assets/css/tailwind.css')))
const tailwindPostCSSPlugins = {
tailwindcss: {
config: resolve(join(targetDir, 'tailwind.config.ts'))
},
autoprefixer: {}
}
nuxt.options.postcss.plugins = { ...tailwindPostCSSPlugins, ...nuxt.options.postcss.plugins }

await installModule('@nuxtjs/color-mode', {
preference: 'system', // default theme
Expand Down
1 change: 1 addition & 0 deletions src/platforms/shopware/utils/mapping/hblMapOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export function hblMapOrder (swOrder: SwOrder): HblOrder {
status: swOrder.stateMachineState.translated.name,
// @ts-ignore
documents: hblMapOrderDocuments(swOrder.documents),
shippingTotal: swOrder.shippingTotal != null ? swOrder.shippingTotal : null,
// @ts-ignore
...(swOrder.deliveries?.length > 0 && { shippingMethod: hblMapShippingMethod(swOrder.deliveries?.[0].shippingMethod) }),
// @ts-ignore
Expand Down
2 changes: 2 additions & 0 deletions src/platforms/shopware/utils/mapping/hblMapProduct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export function hblMapProduct (swProduct: SwProduct, swProductConfigurator?: Pro
}

let url = firstUrl?.pathInfo
const pathInfo = url
if (firstUrl?.isCanonical) {
url = firstUrl?.seoPathInfo
}
Expand Down Expand Up @@ -113,6 +114,7 @@ export function hblMapProduct (swProduct: SwProduct, swProductConfigurator?: Pro
manufacturer: swProduct.manufacturer != null ? hblMapManufacturer(swProduct.manufacturer) : null,
metaTitle: swProduct.translated?.metaTitle,
metaDescription: swProduct.translated?.metaDescription,
pathInfo,
...(variants != null && { variants }),
...(defaultOptions != null && { defaultOptions }),
...(parentId != null && { parentId }),
Expand Down
2 changes: 1 addition & 1 deletion src/theme/components/customer/CustomerOrder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{{ t('customer.order.shippingMethod') }}
</div>
<div>
<div>{{ order.shippingMethod.name }} - {{ formatPrice(order.shippingMethod.price) }}</div>
<div>{{ order.shippingMethod.name }}</div>
<div>{{ t('customer.order.deliveryTime') }}: {{ order.shippingMethod.deliveryTime }}</div>
</div>
</div>
Expand Down

0 comments on commit 86695ef

Please sign in to comment.