From b1198595f946046688f927afb3328afb8956eb3d Mon Sep 17 00:00:00 2001 From: Wes Ruvalcaba Date: Thu, 13 May 2021 10:51:01 -0400 Subject: [PATCH 1/3] Minor updates from review --- elements/pfe-navigation/package-lock.json | 2 +- elements/pfe-navigation/package.json | 2 +- elements/pfe-navigation/src/pfe-navigation.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/elements/pfe-navigation/package-lock.json b/elements/pfe-navigation/package-lock.json index da79afa1f7..5dec9d61cf 100644 --- a/elements/pfe-navigation/package-lock.json +++ b/elements/pfe-navigation/package-lock.json @@ -1,6 +1,6 @@ { "name": "@cpelements/pfe-navigation", - "version": "1.0.50", + "version": "1.0.51", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/elements/pfe-navigation/package.json b/elements/pfe-navigation/package.json index 695ace92e2..7ac58e4d64 100644 --- a/elements/pfe-navigation/package.json +++ b/elements/pfe-navigation/package.json @@ -14,7 +14,7 @@ "ie-polyfill.js" ] }, - "version": "1.0.50", + "version": "1.0.51", "publishConfig": { "access": "public" }, diff --git a/elements/pfe-navigation/src/pfe-navigation.js b/elements/pfe-navigation/src/pfe-navigation.js index abdec65482..5978993c36 100644 --- a/elements/pfe-navigation/src/pfe-navigation.js +++ b/elements/pfe-navigation/src/pfe-navigation.js @@ -411,6 +411,7 @@ class PfeNavigation extends PFElement { const dropdownButton = dropdownButtons[index]; dropdownButton.removeEventListener("click", this._dropdownItemToggle); } + // @todo } // end disconnectedCallback() /** @@ -1676,7 +1677,6 @@ class PfeNavigation extends PFElement { const dropdownButtonId = `main-menu__button--${dropdownButton.dataset.machineName}`; const dropdownId = `main-menu__dropdown--${dropdownButton.dataset.machineName}`; dropdownButton.setAttribute("id", dropdownButtonId); - dropdownButton.parentElement.dataset.buttonId = dropdownButtonId; // Create wrapper for dropdown and give it appropriate classes and attributes const dropdownWrapper = document.createElement("div"); From d768ca73eb677f3bf9852f34b42c6c5902a55475 Mon Sep 17 00:00:00 2001 From: Wes Ruvalcaba Date: Fri, 7 May 2021 11:08:37 -0400 Subject: [PATCH 2/3] Updating slot names and making updates to be more in line with PFE --- .../demo/fake-wes-auth.js | 7 +++ .../src/pfe-navigation-account.js | 7 +-- elements/pfe-navigation/demo/access.html | 11 ++-- elements/pfe-navigation/demo/catalog.html | 5 +- elements/pfe-navigation/demo/index.html | 22 +++++-- elements/pfe-navigation/demo/index_react.html | 6 +- elements/pfe-navigation/demo/index_vue.html | 6 +- .../demo/pfe-navigation.story.js | 4 +- .../demo/single-nav-sticky-alert-banner.html | 4 +- .../demo/single-nav-sticky.html | 4 +- elements/pfe-navigation/demo/single-nav.html | 4 +- .../src/pfe-navigation--lightdom.scss | 8 +-- .../pfe-navigation/src/pfe-navigation.html | 8 +-- elements/pfe-navigation/src/pfe-navigation.js | 61 ++++++++++--------- .../pfe-navigation/src/pfe-navigation.scss | 4 +- .../test/pfe-navigation_react_test.html | 10 +-- .../test/pfe-navigation_test.html | 10 +-- .../test/pfe-navigation_vue_test.html | 10 +-- 18 files changed, 104 insertions(+), 87 deletions(-) diff --git a/elements/pfe-navigation-account/demo/fake-wes-auth.js b/elements/pfe-navigation-account/demo/fake-wes-auth.js index c1dc02e914..7e8b2db6a3 100644 --- a/elements/pfe-navigation-account/demo/fake-wes-auth.js +++ b/elements/pfe-navigation-account/demo/fake-wes-auth.js @@ -61,5 +61,12 @@ window.addEventListener("load", function() { username: "wruvalca@redhat.com", fullName: "James Ruvalcaba" }; + + if (!PfeNavigationAccount.hasAttribute("login-link")) { + PfeNavigationAccount.setAttribute("login-link", "#login"); + } + if (!PfeNavigationAccount.hasAttribute("logout-link")) { + PfeNavigationAccount.setAttribute("logout-link", "#logout"); + } } }); diff --git a/elements/pfe-navigation-account/src/pfe-navigation-account.js b/elements/pfe-navigation-account/src/pfe-navigation-account.js index 118efb44a8..861d7e1c3b 100644 --- a/elements/pfe-navigation-account/src/pfe-navigation-account.js +++ b/elements/pfe-navigation-account/src/pfe-navigation-account.js @@ -37,10 +37,9 @@ class PfeNavigationAccount extends PFElement { this._processUserData(userData); } - // static get events() { - // return { - // }; - // } + static get events() { + return {}; + } // Declare the type of this component static get PfeType() { diff --git a/elements/pfe-navigation/demo/access.html b/elements/pfe-navigation/demo/access.html index 766398cbcf..2c94d6ca57 100644 --- a/elements/pfe-navigation/demo/access.html +++ b/elements/pfe-navigation/demo/access.html @@ -42,8 +42,9 @@ "../../pfe-card/dist/pfe-card.umd.js", "../../pfe-primary-detail/dist/pfe-primary-detail.umd.js", "https://unpkg.com/@cpelements/rh-site-switcher@0.0.1/dist/site-switcher.umd.min.js", - ]) - + ]); + +