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

fix: slug path, uncommented see-all button #37

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

## [Unreleased]

## [2.8.2] - 2022-11-16

## [2.6.0] - 2022-03-11

### Added
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mega-menu",
"vendor": "vtex",
"version": "2.8.1",
"version": "2.8.2",
"title": "Mega Menu",
"description": "Create, personalize and manage the category tree. It's can be used in the shop as main menu",
"mustUpdateAt": "2022-08-28",
Expand Down
1 change: 0 additions & 1 deletion node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"typescript": "3.9.7",
"vtex.css-handles": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.css-handles",
"vtex.device-detector": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.device-detector",
"vtex.mega-menu": "https://megamenubugs--vtexlatam.myvtex.com/_v/private/typings/linked/v1/[email protected]+build1660276857/public/@types/vtex.mega-menu",
"vtex.native-types": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.native-types",
"vtex.store-drawer": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.store-drawer",
"vtex.store-icons": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.store-icons",
Expand Down
24 changes: 14 additions & 10 deletions node/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@
"@types/mime" "^1"
"@types/node" "*"

"@vtex/[email protected].10":
version "6.45.10"
resolved "https://registry.yarnpkg.com/@vtex/api/-/api-6.45.10.tgz#d338d05341e176593124fa171ea5710eee802e61"
integrity sha512-1OllEdBosqGbyGSvQtJzplmOISj2jalpgTDhRWlzhCdkGYbAg0Sm4doudKfZdvizu/6D1Dz4Uy2YncT6M3Vzng==
"@vtex/[email protected].12":
version "6.45.12"
resolved "https://registry.yarnpkg.com/@vtex/api/-/api-6.45.12.tgz#b13c04398b12f576263ea823369f09c970d57479"
integrity sha512-SVLKo+Q/TxQy+1UKzH8GswTI3F2OCRCLfgaNQOrVAVdbM6Ci4wzTeX8j/S4Q1aEEnqBFlH/wVpHf8I6NBa+g9A==
dependencies:
"@types/koa" "^2.11.0"
"@types/koa-compose" "^3.2.3"
Expand Down Expand Up @@ -1567,17 +1567,21 @@ vary@^1.1.2:
version "0.2.6"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.device-detector#3219242fa5c2f14023d33c3549c2d8de93c76d1f"

"vtex.native-types@http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.native-types":
version "0.7.5"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.native-types#52d8c0b675fcdf2b6b1ca93f6a99a630519f618f"
"vtex.native-types@http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.native-types":
version "0.8.0"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.native-types#4fb38349122295832408d511efefa604a0addc57"

"vtex.store-drawer@http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.store-drawer":
version "0.16.2"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.store-drawer#3e3a0e07babcf623922f1eb0c85185bcd12b8002"

"vtex.store-icons@http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.store-icons":
version "0.18.0"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.store-icons#0ee94d549aa283ce3a13ab987c13eac4fdfd1bba"

"vtex.styleguide@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.142.0/public/@types/vtex.styleguide":
version "9.142.0"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.142.0/public/@types/vtex.styleguide#12d22690aa1896a7516eb4b7bc8923216aed7725"
"vtex.styleguide@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.146.1/public/@types/vtex.styleguide":
version "9.146.1"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.146.1/public/@types/vtex.styleguide#66db40ca1b78ad77ce4beedabecee320e1ef2ead"

wrappy@1:
version "1.0.2"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"@vtex/prettier-config": "^0.3.5",
"eslint": "^7.14.0",
"eslint-config-vtex": "^12.8.11",
"eslint-config-vtex-react": "^6.8.3",
"eslint-config-vtex-react": "^9.0.3",
"husky": "^4.3.0",
"lint-staged": "^10.5.1",
"prettier": "^2.2.0",
"prettier": "^2.7.1",
"typescript": "^3.9.6"
},
"dependencies": {
Expand Down
12 changes: 3 additions & 9 deletions react/MegaMenu/components/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { observer } from 'mobx-react-lite'
import React, { useMemo } from 'react'
import type { FC } from 'react'
import { useCssHandles } from 'vtex.css-handles'
import { useRuntime } from 'vtex.render-runtime'
import { Icon, IconCaret } from 'vtex.store-icons'

import type { IconProps } from '../../shared'
Expand Down Expand Up @@ -39,22 +38,20 @@ const Item: FC<ItemProps> = observer((props) => {
iconProps,
iconPosition,
typography = defaultTypography[level],
tabIndex,
className,
onClick,
children,
style,
enableStyle,
closeMenu,
...rest
// tabIndex,
// closeMenu,
// ...rest
} = props

// Only for level 1
const isOpen = departmentActive?.id === id
const hasLink = to && to !== '#'

const { rootPath } = useRuntime()

const linkClassNames = classNames(
handles.styledLink,
'no-underline c-on-base w-100 pa0',
Expand Down Expand Up @@ -134,9 +131,6 @@ const Item: FC<ItemProps> = observer((props) => {
</div>
)

console.info(rootPath)
console.info({ ...rest })

return (
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
<div
Expand Down
4 changes: 2 additions & 2 deletions react/MegaMenu/components/Submenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const Submenu: FC<ItemProps> = observer((props) => {
)}
>
<Link
to={to}
to={`/${to}`}
className={classNames(
handles.seeAllLink,
'link underline fw7 c-on-base'
Expand Down Expand Up @@ -260,7 +260,7 @@ const Submenu: FC<ItemProps> = observer((props) => {
) : (
<>
{items}
{/* showBtnCat ? seeAllLink(departmentActive.slug) : <div /> */}
{showBtnCat ? seeAllLink(departmentActive.slug) : <div />}
</>
)}
</div>
Expand Down
27 changes: 18 additions & 9 deletions react/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4396,6 +4396,11 @@ react-dom@^16.8.6, react-dom@^16.9.0:
prop-types "^15.6.2"
scheduler "^0.19.1"

react-icons@^4.4.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.6.0.tgz#f83eda179af5d02c047449a20b702c858653d397"
integrity sha512-rR/L9m9340yO8yv1QT1QurxWQvWpbNHqVX0fzMln2HEb9TEIrQRGsqiNFQfiv9/JEUbyHmHPlNTB2LWm2Ttz0g==

react-intl@^5.20.6:
version "5.20.6"
resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-5.20.6.tgz#fc64d09143d0df233b373d40a646542b167c118c"
Expand Down Expand Up @@ -5273,21 +5278,25 @@ [email protected]:
version "0.2.6"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.device-detector#3219242fa5c2f14023d33c3549c2d8de93c76d1f"

"vtex.native-types@http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.native-types":
version "0.7.5"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.native-types#52d8c0b675fcdf2b6b1ca93f6a99a630519f618f"
"vtex.native-types@http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.native-types":
version "0.8.0"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.native-types#4fb38349122295832408d511efefa604a0addc57"

"vtex.render-runtime@http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.render-runtime":
version "8.132.4"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.render-runtime#66bb41bd4d342e37c9d85172aad5f7eefebfb6dc"

"vtex.render-runtime@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.[email protected]/public/@types/vtex.render-runtime":
version "8.128.4"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.[email protected]/public/@types/vtex.render-runtime#63491782d44910c4edc8528bc645c7c335c33128"
"vtex.store-drawer@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.[email protected]/public/@types/vtex.store-drawer":
version "0.16.2"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.[email protected]/public/@types/vtex.store-drawer#3e3a0e07babcf623922f1eb0c85185bcd12b8002"

"vtex.store-icons@http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.store-icons":
version "0.18.0"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.store-icons#0ee94d549aa283ce3a13ab987c13eac4fdfd1bba"

"vtex.styleguide@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.142.0/public/@types/vtex.styleguide":
version "9.142.0"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.142.0/public/@types/vtex.styleguide#12d22690aa1896a7516eb4b7bc8923216aed7725"
"vtex.styleguide@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.146.1/public/@types/vtex.styleguide":
version "9.146.1"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.146.1/public/@types/vtex.styleguide#66db40ca1b78ad77ce4beedabecee320e1ef2ead"

w3c-hr-time@^1.0.1:
version "1.0.2"
Expand Down
Loading