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

Btp layout #3486

Merged
merged 69 commits into from
Feb 13, 2024
Merged

Btp layout #3486

merged 69 commits into from
Feb 13, 2024

Conversation

hardl
Copy link
Contributor

@hardl hardl commented Oct 26, 2023

No description provided.

@hardl hardl marked this pull request as ready for review February 1, 2024 14:08
@JohannesDoberer JohannesDoberer self-assigned this Feb 1, 2024
@ndricimrr ndricimrr self-assigned this Feb 2, 2024
height: 100%;
}

:global(.fd-tool-layout .fd-app__sidebar) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since fd-tool-layout is used in this component, I think this will still work but still be scoped to this component. At least we have similar things in our Svelte 4-based app. Might be worth a try.

Suggested change
:global(.fd-tool-layout .fd-app__sidebar) {
.fd-tool-layout :global(.fd-app__sidebar) {

@@ -2623,6 +2790,16 @@
left: calc(#{$leftNavWidthCollapsed} + #{$globalNavWidth});
}
}
:global(.lui-semiCollapsible:not(.semiCollapsed)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it still matters at this point - but I just saw this. On our side, we tried to avoid top-level global styles because they are not scoped and we had issues with styling conflicts.

You have to use top-level :global here because the class lui-semiCollapsible is set in code in this component. If there is a way to change that to a class:name directive in the template you might be able to change this to something like .lui-semiCollapsible:global(:not(.semiCollapsed))

Comment on lines +583 to +593
<div
class="fd-navigation fd-navigation--vertical {hideNavComponent
? 'hideNavComponent'
: ''} {footerText || semiCollapsibleButton
? 'hasFooter'
: ''} {footerText && !semiCollapsibleButton ? 'hasOnlyFooterText' : ''}
{isSemiCollapsed
? 'fd-navigation--snapped'
: ''}"
role="navigation"
style="width: var(--luigi__left-sidenav--width); height: 100%;">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be easier to understand:

Suggested change
<div
class="fd-navigation fd-navigation--vertical {hideNavComponent
? 'hideNavComponent'
: ''} {footerText || semiCollapsibleButton
? 'hasFooter'
: ''} {footerText && !semiCollapsibleButton ? 'hasOnlyFooterText' : ''}
{isSemiCollapsed
? 'fd-navigation--snapped'
: ''}"
role="navigation"
style="width: var(--luigi__left-sidenav--width); height: 100%;">
<div
class="fd-navigation fd-navigation--vertical"
class:hideNavComponent={hideNavComponent}
class:hasFooter={footerText || semiCollapsibleButton}
class:hasOnlyFooterText={footerText && !semiCollapsibleButton}
class:fd-navigation--snapped={isSemiCollapsed}
role="navigation"
style="width: var(--luigi__left-sidenav--width); height: 100%;">

btpNavTopCnt.querySelector('.fd-navigation__list > .fd-navigation__list-item--overflow').style.display = 'none';
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
* Calculates navigation entries and adjusts their display based on available space.
* Moves entries to the 'more' section if the available space is limited.
*/

}
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
* Executes a series of actions after an update event.
* If the btpNavTopCnt resize observer doesn't exist, it creates a new one.
* Resets navigation entries and recalculates them if the container is semi-collapsed.
*/

@@ -381,6 +446,19 @@
});
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
* Calculates the position of the BTP navigation flyout relative to its parent element.
* Adjusts the offset property of the parent element to ensure the flyout is fully visible.
* @param el - The element representing the BTP navigation flyout.
*/

@@ -248,6 +253,61 @@
});
});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
* Resets navigation entries by moving items from the 'more' section back to the main navigation list.
* Hides the overflow indicator if present.
*/

Comment on lines -260 to +265
return LuigiElements.isCustomLuigiContainer() ? LuigiElements.getLuigiContainer().clientHeight : window.innerHeight;
return IframeHelpers.getIframeContainer().clientHeight;
}

getContentAreaHeight /* istanbul ignore next */() {
const contentAreaHeight = this.getInnerHeight() - this.getShellbarHeight();
const contentAreaHeight = this.getInnerHeight() - IframeHelpers.getIframeContainer().getBoundingClientRect().top;
Copy link
Contributor

@ndricimrr ndricimrr Feb 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💥
I think these changes, might need changing, since this works well when you have a main microfrontend iframe based. But when Having a WebComponent open and opening splitview, it gets distorted:
Screenshot 2024-02-06 at 15 14 13

Copy link
Contributor

@JohannesDoberer JohannesDoberer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 !

@hardl hardl merged commit c18e9a4 into main Feb 13, 2024
@hardl hardl deleted the btp-layout branch February 13, 2024 15:42
@JohannesDoberer JohannesDoberer added the enhancement New feature or request label Feb 13, 2024
@JohannesDoberer JohannesDoberer mentioned this pull request Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants