Skip to content
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

Responsive padding for the Shellbar Component #2770

Merged
merged 30 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d3b031c
revert the commit without feature branch
UlianaMunich Jan 21, 2022
913edcc
Merge remote-tracking branch 'upstream/master'
UlianaMunich Jan 21, 2022
6ccdcb8
Merge remote-tracking branch 'upstream/master'
UlianaMunich Jan 28, 2022
d42519c
Merge remote-tracking branch 'upstream/master'
UlianaMunich Feb 3, 2022
a79cb08
Merge remote-tracking branch 'upstream/master'
UlianaMunich Feb 16, 2022
4929e09
Merge remote-tracking branch 'upstream/master'
UlianaMunich Feb 22, 2022
026aa65
Merge remote-tracking branch 'upstream/master'
UlianaMunich Mar 21, 2022
079ac4a
Merge remote-tracking branch 'upstream/master'
UlianaMunich Mar 24, 2022
855fd75
Merge remote-tracking branch 'upstream/master'
UlianaMunich Mar 28, 2022
579e787
Merge remote-tracking branch 'upstream/master'
UlianaMunich Apr 12, 2022
1aa600c
Merge remote-tracking branch 'upstream/master'
UlianaMunich Apr 25, 2022
36ac326
Merge remote-tracking branch 'upstream/master'
UlianaMunich Apr 29, 2022
4370e62
Merge remote-tracking branch 'upstream/master'
UlianaMunich May 2, 2022
fc4c6a9
Merge remote-tracking branch 'upstream/master'
UlianaMunich May 5, 2022
d316f7f
Merge remote-tracking branch 'upstream/master'
UlianaMunich May 10, 2022
9d9d4c5
Merge remote-tracking branch 'upstream/master'
UlianaMunich May 12, 2022
deb76d9
Merge remote-tracking branch 'upstream/master'
UlianaMunich May 18, 2022
6467b44
Merge remote-tracking branch 'upstream/master'
UlianaMunich May 23, 2022
c9d9685
Merge remote-tracking branch 'upstream/master'
UlianaMunich Jun 2, 2022
8af58c5
Merge remote-tracking branch 'upstream/master'
UlianaMunich Jun 8, 2022
27384df
Merge remote-tracking branch 'upstream/master'
UlianaMunich Jun 13, 2022
2531f42
Merge remote-tracking branch 'upstream/master'
UlianaMunich Jun 22, 2022
4058e21
Extend API to set th responsive padding tot h Shellbar when needed
UlianaMunich Jun 23, 2022
c1fb96b
keep old paddings for default usecase
hardl Jun 23, 2022
b2be40a
Update docs/general-settings.md
UlianaMunich Jun 24, 2022
f209d9c
Update docs/general-settings.md
UlianaMunich Jun 24, 2022
8e3488c
Merge branch 'master' into 2764-api-for-responsive-shellbar
UlianaMunich Jun 24, 2022
99ea8c3
Merge branch 'master' into 2764-api-for-responsive-shellbar
wdoberschuetz Jun 27, 2022
4f6fbb7
remove the docu since the feature isn't released by FD Styles
UlianaMunich Jun 28, 2022
20f4738
Merge branch 'master' into 2764-api-for-responsive-shellbar
UlianaMunich Jun 28, 2022
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
14 changes: 9 additions & 5 deletions core/src/navigation/TopNav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
export let displayCustomSearchResult;
export let searchResult;
export let burgerTooltip;
export let responsiveShellbarPadding;

let store = getContext('store');
let contextSwitcherToggle = false;
Expand Down Expand Up @@ -109,6 +110,9 @@
profileTypeSettings = LuigiConfig.getConfigValue(
'settings.profileType'
);
responsiveShellbarPadding = LuigiConfig.getConfigValue(
'settings.header.responsiveShellbarPaddings'
);
productSwitcherConfig = NavigationHelpers.getProductSwitcherConfig();
globalSearchConfig = LuigiConfig.getConfigValue('globalSearch');
isGlobalSearchCentered =
Expand Down Expand Up @@ -305,9 +309,9 @@
<svelte:window on:click={closeAllDropdowns} on:blur={closeAllDropdowns} />
{#if showTopNav}
<div
class="fd-shellbar lui-shellbar-wrapper {hideNavComponent
? 'hideNavComponent'
: ''}"
class="fd-shellbar {responsiveShellbarPadding
? 'fd-shellbar--responsive-paddings'
: ''} lui-shellbar-wrapper {hideNavComponent ? 'hideNavComponent' : ''} "
tabindex="0"
>
<div class="fd-shellbar__group fd-shellbar__group--product">
Expand Down Expand Up @@ -809,8 +813,8 @@
.fd-shellbar:focus {
outline: none;
}

.fd-shellbar {
.fd-shellbar:not(.fd-shellbar--responsive-paddings) {
padding: 0 0.5rem;
}

Expand Down
11 changes: 11 additions & 0 deletions docs/general-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,17 @@ Take a look at our [i18n](i18n.md) section for an implementation suggestion.
},
```

### header.responsiveShellbarPaddings
- **type**: boolean
- **description**: based on the browser window size the responsiv padding will be applied to the Shellbar Component when set to `true`.
UlianaMunich marked this conversation as resolved.
Show resolved Hide resolved
UlianaMunich marked this conversation as resolved.
Show resolved Hide resolved
- **default**: by default, the parameter is set to `false` and the padding for Shellbar Component will stay the same and inherited from `.fd-shellbar` class.
UlianaMunich marked this conversation as resolved.
Show resolved Hide resolved
- **example**:
```
header: { object / function / Promise
responsiveTopNavPaddings: true
},
```

### responsiveNavigation
- **description**: allows customizing the navigation display settings. For example, you can define a button which shows or completely hides the left navigation, or a button which collapses the navigation to only show the icons.
You can set the following values:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ describe('Navigation', () => {
cy.visitLoggedIn('/projects/pr2');
});

it.only('withOptions - no context updated -> it should remain on the current page', () => {
it('withOptions - no context updated -> it should remain on the current page', () => {
cy.expectPathToBe('/projects/pr2');
cy.getIframeBody().then(result => {
// Link on Main page PR2 exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ class Settings {
'data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MTIuMzggMjA0Ij48ZGVmcz48c3R5bGU+LmNscy0xLC5jbHMtMntmaWxsLXJ1bGU6ZX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LTMxLjY4IDUuNi00MC42IDE0LjgzQTM0LjIzIDM0LjIzIDAgMCAwIDUuNzcgNzQuN0M1LjU0IDg3LjE1IDEwLjExIDk2IDE5LjcxIDEwM2M4LjEgNS45NCAxOC40NiA5Ljc5IDI3LjYgMTIuNjIgMTEuMjcgMy40OSAyMC40NyA2LjUzIDIwLjM2IDEzQTkuNTcgOS41NyAwIDAgMSA2NSAxMzVjLTIuODEgMi45LTcuMTMgNC0xMy4wOSA0LjEtMTEuNDkuMjQtMjAtMS41Ni0zMy42MS05LjU5TDUuNzcgMTU0LjQyYTkzLjc3IDkzLjc3IDAgMCAwIDQ2IDEyLjIyaDIuMTFjMTQuMjQtLjI1IDI1Ljc0LTQuMzEgMzQuOTItMTEuNzEuNTMtLjQxIDEtLjg0IDEuNDktMS4yOGwtNC4xMiAxMC44NUgxMjNsNi4xOS0xOC44MmE2Ny40NiA2Ny40NiAwIDAgMCAyMS42OCAzLjQzIDY4LjMzIDY4LjMzIDAgMCAwIDIxLjE2LTMuMjVsNiAxOC42NGg2MC4xNHYtMzloMTMuMTFjMzEuNzEgMCA1MC40Ni0xNi4xNSA1MC40Ni00My4yIDAtMzAuMTEtMTguMjItNDMuOTQtNTcuMDEtNDMuOTR6TTE1MC45MSAxMjFhMzYuOTMgMzYuOTMgMCAwIDEtMTMtMi4yOGwxMi44Ny00MC41OWguMjJsMTIuNjUgNDAuNzFhMzguNSAzOC41IDAgMCAxLTEyLjc0IDIuMTZ6bTk2LjItMjMuMzNoLTguOTRWNjQuOTFoOC45NGMxMS45MyAwIDIxLjQ0IDQgMjEuNDQgMTYuMTQgMCAxMi42LTkuNTEgMTYuNTctMjEuNDQgMTYuNTciLz48L3N2Zz4=',
title: 'Luigi Demo',
subTitle: version || 'unknown',
favicon: '/assets/favicon-sap.ico'
favicon: '/assets/favicon-sap.ico',
responsiveShellbarPaddings: false
};
appLoadingIndicator = {
hideAutomatically: false
Expand Down