-
Notifications
You must be signed in to change notification settings - Fork 401
Feature: Add The Ability To Hide Viewall Links #1034
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
Merged
bmuenzenmeyer
merged 15 commits into
pattern-lab:dev
from
sghoweri:feature/no-viewall-links
Nov 26, 2019
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
156e609
feat: add the ability to disable Pattern Lab viewall links in the nav…
sghoweri 5a806ea
chore: fresh uikit build
sghoweri de9fe2c
chore: add new commented out config option to the Twig Edition package
sghoweri 6ac1560
chore: remove config duplicate
sghoweri 1462104
Merge remote-tracking branch 'origin' into feature/no-viewall-links
sghoweri 677ae59
Merge branch 'dev' of https://github.com/pattern-lab/patternlab-node …
sghoweri 02d8fc0
chore: fresh uikit build
sghoweri ddb3fad
fix: comment out example config to disable viewAll links
sghoweri 3f8bb01
feat: test adding cross-env to Twig Edition test
sghoweri a259165
Merge branch 'dev' into feature/no-viewall-links
sghoweri c3354e7
refactor: update the UIKIt build to recompile PL when the config changes
sghoweri 71f4654
refactor: update Twig Edition + Handlebars dev edition configs to use…
sghoweri b918cda
refactor: simplify Nav logic + try to patch up some nav / route relat…
sghoweri f4f481c
chore: remove JS from dist folder + update yarn.lock
sghoweri 6dbbd6a
fix: re-add popstate listener
sghoweri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| module.exports = { | ||
| buildDir: __dirname + '/public', | ||
| wwwDir: __dirname + '/public/', | ||
| publicPath: '/public/styleguide/', | ||
| // target the UIKit installed / symlinked under node_modules | ||
| buildDir: __dirname + '/node_modules/@pattern-lab/uikit-workshop/dist', | ||
| // noViewAll: true, | ||
| }; | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
packages/uikit-workshop/src/scripts/components/pl-nav/get-parents.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| export const getParents = (elem, selector) => { | ||
| // Element.matches() polyfill | ||
| if (!Element.prototype.matches) { | ||
| Element.prototype.matches = | ||
| Element.prototype.matchesSelector || | ||
| Element.prototype.mozMatchesSelector || | ||
| Element.prototype.msMatchesSelector || | ||
| Element.prototype.oMatchesSelector || | ||
| Element.prototype.webkitMatchesSelector || | ||
| function(s) { | ||
| var matches = (this.document || this.ownerDocument).querySelectorAll(s), | ||
| i = matches.length; | ||
| while (--i >= 0 && matches.item(i) !== this) {} | ||
| return i > -1; | ||
| }; | ||
| } | ||
|
|
||
| // Set up a parent array | ||
| var parents = []; | ||
|
|
||
| // Push each parent element to the array | ||
| for (; elem && elem !== document; elem = elem.parentNode) { | ||
| if (selector) { | ||
| if (elem.matches(selector)) { | ||
| parents.push(elem); | ||
| } | ||
| continue; | ||
| } | ||
| parents.push(elem); | ||
| } | ||
|
|
||
| // Return our parent array | ||
| return parents; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be removed