microsoft / Msdyn365.Commerce.Online

Dynamics 365 Commerce online project
Other
51 stars 41 forks source link

There is a spelling error in the navigation-menu module and references to it throughout theming. 'deafult' should read 'default'. #38

Closed gallant-dev closed 2 years ago

gallant-dev commented 2 years ago

Example taken from the navigation-menu.scss file:

           >.ms-nav__deafult {
                  >.ms-nav__list {
                      border: 1px solid var(--msv-nav-border);
                      box-shadow: 0 8px 15px rgba(0, 0, 0, 0.132);
                      min-width: $navigation-menu-list-min-width;
                  }
            }

Example, the following is a render function in the node_modules/@msdyn365-commerce-modules/navigation-menu/src/modules/navigation-menu/navigation-menu.view.tsx:

private _renderMenu(level: string, menuOptions: JSX.Element[], currentItem?: number, submenu?: boolean): JSX.Element | null {

        const { DivContainer, MenuList, ImageDivContainer, showCategoryImage, showPromotionalContent, isMobileView } = this.props;
        const categoryImageDisplay = !isMobileView && (showCategoryImage || showPromotionalContent) && !ArrayExtensions.hasElements(this.state.categoryImage) && !submenu;
        const promotionalContentDisplay = !isMobileView && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !submenu;
        const DivContainerClass = this.currentLevel > 2 || categoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';
        this.currentLevel = 1;
        return (
            <Node {...DivContainer} className={DivContainerClass}>
                <Node {...MenuList} className={classnames(MenuList.className, level, categoryImageDisplay && 'havecateImage', categoryImageDisplay && this.props.config.menuLevelSupport && this.props.config.menuLevelSupport > 2 && 'navmenu-multi-level')}>
                    { menuOptions }
                </Node>
                {
                    categoryImageDisplay && this.state.categoryImage && this.state.categoryImage.map(item => (
                        <Node {...ImageDivContainer} className={ImageDivContainer!.className}>
                            { this.state.categoryImage && this._getCategoryImage(item) }
                            { promotionalContentDisplay && this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}
                        </Node>))
                }
            </Node>
        );
    }
mkelan commented 2 years ago

@gallant-dev thank you for reporting this issue. i have logged a ticket internally to track and fix it.

mkelan commented 2 years ago

Closing this old thread. Please use https://community.dynamics.com/365/commerce/f/dynamics-365-commerce-forum as this is not actively monitored