-
Notifications
You must be signed in to change notification settings - Fork 174
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
Fiori3 compliant left navigation collapse #624
Fiori3 compliant left navigation collapse #624
Conversation
core/src/App.html
Outdated
$topNavHeight: 48px; | ||
$leftNavWidth: 320px; | ||
$leftNavWidthCollapsed: 40px; | ||
$desktop-min-width: 600px; |
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 know you didn't write it, but please change $desktop-min-width
to be also camelCased.
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.
Done
@@ -781,8 +783,12 @@ | |||
</script> | |||
|
|||
<style type="text/scss"> | |||
/*Mixins*/ |
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.
Guess that comment is not required.
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.
done
core/examples/luigi-sample-angular/src/luigi-config/extended/settings.js
Outdated
Show resolved
Hide resolved
> | ||
{#if isOpenUIiconName(nodes.metaInfo.icon)} | ||
<span | ||
class="fd-side-nav__icon {'sap-icon--' + nodes.metaInfo.icon} {isSemiCollapsed && !nodes.metaInfo.icon ? 'sap-icon--rhombus-milestone-2' : ''} sap-icon--l" |
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.
Would be cool to add alt attribute of {key}
to that span and img tags, so one can hover over it in collapsed mode to see what is written if he does not recognize the icon? @hardl do you agree?
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.
good idea 👍 done.
core/src/navigation/LeftNav.html
Outdated
document | ||
.getElementsByClassName('fd-side-nav')[0] | ||
.setAttribute('style', 'overflow-y:auto;'); | ||
}, 50); |
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.
Why 50? If you want to have in the next tick, you can just leave the number empty.
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.
done
selectedCategory = nodeOrNodes.metaInfo.label; | ||
} else { | ||
selectedCategory = | ||
(nodeOrNodes.category && nodeOrNodes.category.label) || |
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.
Due to the babel plugin, we can use now (nodeOrNodes.category?.label)
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.
done
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 had to revert it because integration tests were failing with this change
let selectedCategory; | ||
let sideBar = document.getElementsByClassName('fd-app__sidebar')[0]; | ||
|
||
if (nodeOrNodes.metaInfo && nodeOrNodes.metaInfo.label) { |
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.
Due to the babel plugin, we can use now (nodeOrNodes.metaInfo?.label)
.
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.
done
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 had to revert it because integration tests were failing with this change
core/src/navigation/LeftNav.html
Outdated
//Calculate top/bottom position for flyout sublist | ||
let parent = el.closest('.fd-side-nav__group'); | ||
let parentTopPosition = parent.offsetTop; | ||
let shellbarHeight = Luigi.elements().getShellbar().offsetHeight; |
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.
Internally we should not rely on the window.Luigi
object, since you already added import { LuigiElements } from '../core-api';
you can use that one.
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.
good point! done)
}); | ||
|
||
StateHelpers.doOnStoreChange(this.store, () => { | ||
this.set({ | ||
footerText: LuigiConfig.getConfigValue('settings.sideNavFooterText') | ||
}); | ||
}); | ||
|
||
// set isSemiCollapsed to true for mobile |
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.
Check with @hardl if the responsiveNav setting should be able to be changed during runtime. If yes, the following code should be moved into the onStoreChange
block.
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.
@hardl said he sees no usecase where you would change that on runtime.
…ettings.js Co-Authored-By: Markus <[email protected]>
…of github.com:marynakhromova/luigi into 453-Fiori3-compliant-left-navigation-collapse-feature
…nts, remove delay on setTimeOut
Co-Authored-By: Markus <[email protected]>
good job!! |
Description
Changes proposed in this pull request:
fd-app__sidebar
andlui-side-nav__footer
based on flexboxsap-icon--lui-blank
as it's not been usedHow to test it
luigi-sample-angular/src/luigi-config/extended/settings.js
and setsemiCollapsible
forresponsiveNavigation
collapsible: true
to some nodes inluigi-sample-angular/src/luigi-config/extended/projectDetailNav.js