Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
ff0b090
initial pfe-navigation changes
kylebuch8 May 5, 2019
054eb31
ch ch ch changes
kylebuch8 May 7, 2019
0148e8b
initial pfe-navigation commit
kylebuch8 May 17, 2019
1e11774
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
May 31, 2019
c59244e
Bring back the pfe-link-list component; updates to structure of navig…
Jun 5, 2019
9b5b9ee
Revert "initial pfe-navigation commit"
Jun 7, 2019
0b20a9b
Merge branch 'pfe-navigation' of github.com:patternfly/patternfly-ele…
Jun 7, 2019
ac9b5d8
Getting navigation to a workabout/style-able place
Jun 18, 2019
d4f93bd
Working on theming the navigation-items based on latest mock-ups
Jun 20, 2019
4a9d49c
Make the navigation item with icons smaller text
Jun 20, 2019
85b7a41
Got icons working again; polishing states for navigation-items; clean…
Jun 25, 2019
170c803
Apply icons using variables
Jun 27, 2019
8e02c9f
Adding styles for the mobile login and language switchers
Jun 27, 2019
e52508f
Update navigation styles
Jun 28, 2019
f27d191
Add sticky navigation setting and set up click outside to close
Jun 28, 2019
8ce5494
Updating cloning
Jun 28, 2019
2269f9f
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
Jun 28, 2019
454c551
Add overflow settings to tray region
Jun 28, 2019
d512a5b
Tweaks to overflow settings inside the navigation-item tray
Jun 28, 2019
d1fdcc5
Port the mobile login and language to shadowDOM
Jun 28, 2019
af963df
Updating variables to map more closely to the design system
Jul 1, 2019
20903e7
Adjusting where JS is defined for Safari
Jul 1, 2019
27b9db2
Trying to get Safari to render correctly
Jul 1, 2019
f9aa3cc
Wrap mobile search in a container so it is easier to hide-show on mobile
Jul 1, 2019
f7746ed
Set up the resize to hide the menu when over 996px
Jul 1, 2019
16ad117
Add path support for Safari and FF
Jul 1, 2019
82b3a65
Add back navigation-main for markup
Jul 1, 2019
9cf2336
Add a few more styles to the link-list component to match mock-ups
Jul 1, 2019
4e9cd55
Replace Red Hat logo with generic placeholder
Jul 1, 2019
9dac510
Remove unused this.slot declaration which was causing a slot attribut…
Jul 2, 2019
326e16d
Updating styles via code review feedback with Kendall
Jul 3, 2019
cf6aa2b
Updates re: design feedback + fix bug with close item state
Jul 3, 2019
b7162ee
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
Jul 11, 2019
b44fbbc
Fix the focus-within issue; remove selector, style on parent trigger …
Jul 15, 2019
8151039
Suppress the fallback link when upgraded
Jul 15, 2019
327accd
Shoring up support for direct links in the top-navigation
Jul 15, 2019
e7aa4a5
Add tests tot he demo page for dynamic content injectin
Jul 15, 2019
b6f958f
Working on fallback and improved styles for edge
Jul 16, 2019
ec8676e
Working on edge styles + add more information to the custom toggled e…
Jul 16, 2019
a1d9aaa
Edge is looking good; fallback styles
Jul 16, 2019
ceeedea
Edge style fixes
Jul 18, 2019
9cdccb0
Adding more comments; wrapping elements in a warning if no light DOM
Jul 18, 2019
8defd54
Add a closeAllNavigationItems function to more consistently handle th…
Jul 18, 2019
1163cc4
Add a more dynamic way to render mobile-search content based on what'…
Jul 18, 2019
6d7a2eb
Remove comments and fix background color styles
Jul 18, 2019
5ac22ad
moving script tag inside closing body tag
kylebuch8 Jul 23, 2019
18024aa
moved the creation of PfeNavigation to top of the list
kylebuch8 Jul 23, 2019
46b9589
Reworking accordion to work inside of the navigation component
Jul 25, 2019
5bf9c62
Updating accordion styles to support hooks and additional properties
Jul 26, 2019
57f7381
Revert accordion updates; moved to new branch: accordion-enhancements…
Jul 26, 2019
67ba352
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
Jul 26, 2019
bc2a73e
Update navigation to use bubble up events on click
Jul 26, 2019
5e43f05
Standardize on open and close custom events
Jul 26, 2019
2d237f0
Pull out link-list component; fix gulpfile configfactory variable; ad…
Jul 30, 2019
d7f1e75
Update examples and test files to remove link-list
Jul 30, 2019
1f136ec
Update height variable on sticky state for more graceful transition b…
Jul 30, 2019
b315117
Code review feedback; remove console output
Jul 30, 2019
5374745
Update markup and imports for storybook instance
Jul 30, 2019
c200e3b
Tidy up navigation storybook, update markup with notes
Jul 30, 2019
25c3a76
Remove demo css for now
Jul 30, 2019
f7d8235
Working with the storybook settings; cleaning up the demo file; adjus…
Jul 31, 2019
5fe7caf
Add light dom styles for tray region; use layouts instead of custom s…
Jul 31, 2019
36accc0
Tweaking implementation of mobile nav for better IE11 experience
Jul 31, 2019
8273cfa
Add a direct link handler since link is disabled on upgrade
Jul 31, 2019
d6a7b91
Fix overlay showing up when escape key is hit twice
Jul 31, 2019
5e46c09
Adding framework for light dom styles for link list
Aug 6, 2019
8430b11
Fix the logic around which elements fire a close on screen resize
Aug 6, 2019
bc5d1ba
Push up updates to the styles based on code review feedback; updated …
Aug 7, 2019
653d7c2
To prevent changes to existing styles, adjusting the radio function t…
Aug 7, 2019
c6b02f9
Update schemas, add documentation to README
Aug 7, 2019
c25d7f0
Push up fix for arrow on to show up on hover; pfe-icon prefixes added…
Aug 9, 2019
9a20de2
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
Aug 9, 2019
742c9b1
Update versions listed in the package.json for navigation
Aug 9, 2019
1bfe836
Add the pfe prefix to the icon in navigation stylesheet; updated pack…
Aug 11, 2019
0fbf975
Building the mobile navigation as light DOM; in a broken state but cl…
Aug 15, 2019
487ae70
pfe-navigation: Cleaning up desktop v. mobile view
Aug 16, 2019
f699739
Styles for the updated mobile navigation working in all screen sizes
Aug 19, 2019
8d15751
Adjusting styles for the nested items, better chevron visibility
Aug 19, 2019
6fd0bea
Updating the breakpoint approach, using attributes to toggle visibility
Aug 21, 2019
a09ec6c
Resurrect mobile search fields
Aug 21, 2019
c43ad3f
Letting breakpoints flow from the JS
Aug 21, 2019
594a9c9
Need to remove the consoles but working through open and close states
Aug 21, 2019
a909e8e
Add exception for hidden attribute on the menu item
Aug 21, 2019
7005280
Cleaning up trigger states in toggleHandler
Aug 22, 2019
afbbedb
Click events are all working at this point
Aug 22, 2019
136ef16
Click events and keyboard navigation working
Aug 22, 2019
4bfaafb
Add attributes so styles can be more efficient and clear
Aug 22, 2019
225edc4
Add close icon
Aug 22, 2019
32faad7
Ensure escape exits open items even if not in the active state list
Aug 22, 2019
6d7e32a
Add todo note
Aug 22, 2019
d5181ef
removing bluebird dependency
kylebuch8 Aug 23, 2019
93f2136
Adjust events to generic toggle; add keymappings for older browsers
Aug 26, 2019
50fb0a4
Move navItem collection for pfe-navigation-main to init function
Aug 26, 2019
64aa20c
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
Aug 26, 2019
ac62bd0
Adjusting layout for mobile menu for better collapsibility
Aug 26, 2019
8d57d22
Update package to latest release; clean up event firing on nav
Aug 27, 2019
a9f563e
Refactor styles for better fallbacks, using slots not the shadow classes
Aug 27, 2019
f1ebd40
Live code review feedback coding updates
Aug 29, 2019
5bb214f
Updating packages; debugging Edge errors
Aug 30, 2019
f7521d5
Update JS to support Edge upgrade; separate navigation files (add com…
Sep 3, 2019
37bf2a7
Adjusting styles for edge compatibility
Sep 3, 2019
6dbf276
Navigation is working in IE11 - note there are debug messages in this…
Sep 5, 2019
45f4f2f
Use pfe-icon to fix IE11 upgrade bug
Sep 5, 2019
e7f2d7a
Adjusting styles for IE11 compatibility
Sep 5, 2019
80340f9
Update package for navigation version
Sep 6, 2019
ed7c549
Merge branch 'master' of https://github.com/patternfly/patternfly-ele…
Sep 6, 2019
b3510bb
IE11 is upgrading!
Sep 12, 2019
e5b29cb
Getting main navigation a little closer in IE11
Sep 12, 2019
c24ad44
Pfe navigation light dom (#484)
LyndseyR Sep 13, 2019
9623f5b
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
Sep 16, 2019
bc79532
Updating branch based on code review feedback
Sep 16, 2019
d882949
Set pfe-icon as a dependency of pfe-navigation-item
Sep 16, 2019
62f33a6
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
Sep 16, 2019
eb72111
Add support for temp compilation with files defined in package.json
Sep 16, 2019
ab9643d
Style tweaks and adjustments based on branch testing; setting pfe-nav…
Sep 17, 2019
befe3b3
Merge branch 'pfe-navigation' of https://github.com/patternfly/patter…
Sep 17, 2019
ab63fd9
Fix gulp build so that all assets are added to the temp directory and…
Sep 19, 2019
6877601
Remove themes from spandx config; remove tab focus trap from navigation
Sep 19, 2019
a925fdd
Merge branch 'master' of https://github.com/patternfly/patternfly-ele…
Sep 20, 2019
8176c8d
Update markup in the demo page, navigation readme
Sep 20, 2019
342ac60
Fix storybook rendering by adjusting outside listener to allow nestin…
Sep 20, 2019
db2330c
Clean up story; commenting out lightdom to debug styles
Sep 20, 2019
1701df3
Improving on the edge experience
Sep 20, 2019
2470779
Tidying up edge experience
Sep 20, 2019
4f43e70
Simplify edge, looking good!
Sep 20, 2019
becf10b
Merge branch 'master' of https://github.com/patternfly/patternfly-ele…
Sep 23, 2019
8964446
updating dynamically injected tray text
kylebuch8 Sep 24, 2019
3e70818
Remove console.log, remove outline on link
Sep 24, 2019
58b2145
Merge branch 'pfe-navigation' of github.com:patternfly/patternfly-ele…
Sep 24, 2019
71a5d72
Add events to documentation
Sep 24, 2019
96577e8
Stub out tests
Sep 24, 2019
f83720d
Remove debug from nav-item; update example in test file; remove __las…
Sep 26, 2019
8fecf68
adding tests for pfe-navigation-main
kylebuch8 Sep 30, 2019
92552bb
test: adding more tests to pfe-navigation and pfe-navigation-item
kylebuch8 Sep 30, 2019
92d9f86
Merge branch 'master' into pfe-navigation
castastrophe Oct 1, 2019
f8203e6
[dev]: Updates to icon to support fallback text, no fallback text, an…
Oct 1, 2019
360339b
[dev]: Add TODO comment for icon hiding
Oct 1, 2019
04e64a6
fix: using the cdn for the polyfills
kylebuch8 Oct 3, 2019
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
7 changes: 3 additions & 4 deletions .storybook/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@ const listProperties = (obj) =>
print = true;
}

// If printing is allowed, the value exists and is not null and is not a slot
// If printing is allowed, the value exists and is not null
if (
print &&
typeof v !== "undefined" &&
(v !== null && v !== "null") &&
p !== "slot"
(v !== null && v !== "null")
) {
string += p;
// If the value is a boolean and is false, or the value is not a string true
Expand All @@ -60,7 +59,7 @@ const listProperties = (obj) =>
}
}
}
return string.toLowerCase();
return string;
})
.join(" ");

Expand Down
2 changes: 1 addition & 1 deletion elements/pfe-accordion/src/pfe-accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $LOCAL: accordion;
position: relative;
overflow: hidden;
margin: 0;
color: #{pfe-radio(color--text)};
color: #{pfe-radio(color, text)};
}

:host([on="dark"]) {
Expand Down
38 changes: 31 additions & 7 deletions elements/pfe-icon/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,26 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>PatternFly Element | pfe-icon Demo</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">

<link rel="stylesheet" href="https://overpass-30e2.kxcdn.com/overpass.css" />
<title>PatternFly Element | pfe-icon Demo</title>

<!-- uncomment the es5-adapter if you're using the umd version -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/2.2.10/custom-elements-es5-adapter.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/2.2.10/webcomponents-bundle.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.5/require.min.js"></script>
<script>require(['../pfe-icon.umd.js'])</script>
<script src="/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"></script>
<script src="/@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
<script src="/requirejs/require.js"></script>

<script>require([
'../pfe-icon.umd.js',
'../../pfe-card/pfe-card.umd.js'
])</script>

<noscript>
<link href="../../pfelement/pfelement-noscript.min.css" rel="stylesheet">
</noscript>

<link href="../../pfelement/pfelement.min.css" rel="stylesheet">
<link href="../../pfe-layouts/pfe-layouts.min.css" rel="stylesheet">

<style type="text/css" media="screen">
body {
Expand Down Expand Up @@ -324,5 +328,25 @@ <h2>web icons</h2>
<pfe-icon size="md" icon="web-user"></pfe-icon>
<pfe-icon size="md" icon="web-youtube2"></pfe-icon>
<pfe-icon size="md" icon="web-youtube"></pfe-icon>

<h2>Fail to load tests</h2>
<div class="pfe-l-grid pfe-m-gutters pfe-m-all-6-on-xs pfe-m-all-3-col">
<pfe-card pfe-color="light">
<h3 slot="pfe-card--header">Fail with fallback text, no tags.</h3>
<pfe-icon size="xl" icon="rh-foo-bar">Icon failed to load.</pfe-icon>
</pfe-card>
<pfe-card>
<h3 slot="pfe-card--header">Fail with fallback text, p tag.</h3>
<pfe-icon size="xl" icon="rh-foo-bar"><p>Icon failed to load.</p></pfe-icon>
</pfe-card>
<pfe-card>
<h3 slot="pfe-card--header">Fail with preserve space on.</h3>
<pfe-icon size="xl" icon="foo-bar" style="border: 1px solid hotpink;"></pfe-icon>
</pfe-card>
<pfe-card>
<h3 slot="pfe-card--header">Fail with collapse blank space.</h3>
<pfe-icon size="xl" icon="foo-bar" style="border: 1px solid hotpink;" on-fail="collapse"></pfe-icon>
</pfe-card>
</div>
</body>
</html>
18 changes: 7 additions & 11 deletions elements/pfe-icon/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions elements/pfe-icon/src/pfe-icon.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<div class="pfe-icon--fallback">
<slot></slot>
</div>
<svg xmlns="http://www.w3.org/2000/svg">
<filter color-interpolation-filters="sRGB" x="0" y="0" height="100%" width="100%">
<feFlood result="COLOR" />
Expand Down
13 changes: 10 additions & 3 deletions elements/pfe-icon/src/pfe-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@ function _createIconSetHandler(el, setName) {
}

function _iconLoad(el) {
el.image.classList.remove("load-failed");
el.classList.remove("load-failed");
}

function _iconLoadError(el) {
el.image.classList.add("load-failed");
el.classList.add("load-failed");
if(el.has_fallback) {
el.classList.add("has-fallback");
}
}

class PfeIcon extends PFElement {
Expand All @@ -57,8 +60,12 @@ class PfeIcon extends PFElement {
return "pfe-icon.json";
}

get has_fallback() {
return this.children.length > 0 || this.innerText.length > 0;
}

static get observedAttributes() {
return ["icon"];
return ["icon", "on-fail"];
}

constructor() {
Expand Down
Loading