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

Change per-component backdrop to global one #116

Merged
merged 3 commits into from
Oct 12, 2018

Conversation

parostatkiem-zz
Copy link
Contributor

Description
Instead of having separate backdrop for LeftNav and TopNav components we now cover the whole App component with backdrop which is easier to understand and more natural according to what the backdrop actually does. The <iframe> with page content is displayed above the backdrop layer so it has to have its own backdrop (no changes here).
Changes proposed in this pull request:

  • Change per-component backdrop to global one

Related issue(s)
#108

@parostatkiem-zz parostatkiem-zz added bug Something isn't working area/luigi labels Sep 27, 2018
@dariadomagala-sap dariadomagala-sap added this to the Sprint_Swinka_1 milestone Sep 27, 2018
@jesusreal jesusreal self-assigned this Sep 28, 2018
@jesusreal jesusreal self-assigned this Oct 1, 2018
<TopNav pathData={navigationPath} />
<LeftNav pathData={navigationPath} />
</div>
<Backdrop>
Copy link
Contributor

Choose a reason for hiding this comment

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

I personally wouldn't add the Backdrop element outside the application container. And I believe we don't need to wrap any element inside the Backdrop. I would write this markup like that:

<div id="app">
    <Backdrop></Backdrop>
    <div class="fd-page {hideNav? 'iframeContainerNoNav' : 'iframeContainer'}" use:init="context"></div>
    <TopNav pathData={navigationPath} />
    <LeftNav pathData={navigationPath} />
</div>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think my approach is more natural and makes the code more referring to what we can actually see and do in the app. The backdrop wraps whole content and makes it unusable/unclickable, that's why I wrapped content in backdrop. I can change it if you really want, it's basically just code-understanding thing :)

Copy link
Contributor Author

@parostatkiem-zz parostatkiem-zz Oct 1, 2018

Choose a reason for hiding this comment

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

How about modifying your suggestion to

<div id="app">
  <Backdrop>
    <div class="fd-page {hideNav? 'iframeContainerNoNav' : 'iframeContainer'}" use:init="context"></div>
    <TopNav pathData={navigationPath} />
    <LeftNav pathData={navigationPath} />
  </Backdrop>
</div>

?

aria-hidden="false"
>
</div>
<div class="fd-ui__overlay fd-overlay fd-overlay--modal {heightCssClass}" aria-hidden="false">
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need these slot tags here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we wrap App's content in <Backdrop> tags. <slot> is for displaying what's inside component tags. It's the same as <ng-content> in Angular. Am I wrong?

@@ -220,6 +218,10 @@
cursor: pointer;
}

.fd-page{
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree this is the right way to do it, otherwise it will be inconsistent, and we will continue having displaying issues. But I am not convinced with the fact that we are providing a feature but it does not work out of the box, since every app using luigi needs to wrap the iframe in a container styled with this z-index value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This z-index value is assigned at Lugii Core's level so it works out of the box. The app developer doesn't have to implement any z-index value to the container.

@parostatkiem-zz parostatkiem-zz force-pushed the Fix-backdrop-layer-gaps branch from ec92d42 to 94396ed Compare October 2, 2018 09:24
@parostatkiem-zz parostatkiem-zz merged commit 720a9a8 into SAP:master Oct 12, 2018
@parostatkiem-zz parostatkiem-zz deleted the Fix-backdrop-layer-gaps branch November 28, 2018 08:28
stanleychh pushed a commit to stanleychh/luigi that referenced this pull request Dec 30, 2021
* Change per-component backdrop to global one

* Change Backdrop to wrap App's content instead of App
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants