salesforce / lwc

⚡️ LWC - A Blazing Fast, Enterprise-Grade Web Components Foundation
https://lwc.dev
Other
1.63k stars 395 forks source link

lightning-tabset and lightning-tab does not render properly #2147

Open rrcook opened 3 years ago

rrcook commented 3 years ago

Description

The lightning-tabset and lightning-tab combos do not render properly.

Steps to Reproduce

Make a lwc-oss app with lightning base components and styling as described here: https://developer.salesforce.com/blogs/2020/12/build-connected-apps-anywhere-using-lightning-base-components.html Then in between the container div and the link div, add a div with the lightning-tabset example from the component reference,

        <div>
            <lightning-tabset>
                <lightning-tab label="Item One">
                    One Content !
                </lightning-tab>
                <lightning-tab label="Item Two" title="2nd tab extended title">
                    Two Content !
                </lightning-tab>
                <lightning-tab label="Item Three">
                    Three Content !
                </lightning-tab>
            </lightning-tabset>
        </div>

Instead of rendering as it does in the component reference, it looks like this:

Screen Shot 2021-01-03 at 4 50 03 PM
git2gus[bot] commented 3 years ago

This issue has been linked to a new work item: W-8619780

git2gus[bot] commented 3 years ago

This issue has been linked to a new work item: W-8619779

bdub-sfdc commented 3 years ago

@rrcook please see my chatter response, and respond in GUS work item W-8619779 so we can resolve the issue.

rrcook commented 3 years ago

@bdub-sfdc That link takes me to a Salesforce employee login, and I am not a Salesforce employee.

bdub-sfdc commented 3 years ago

@rrcook ok, understand that you can't see the work item.

is the issue you are seeing that the tabs don't have a white background color over top of the blue background in your screenshot? This was a recent change where the background color was removed, and is 'not a bug'. You could wrap your tab component in a card component.

If this is not the issue you are seeing, please describe the issue in a comment. Thanks!

rrcook commented 3 years ago

I surrounded my lightning-tabset with a lightning-card and still got bad results. I don't see the tab labels, and I see all the content for all the tabs at once.

Screen Shot 2021-01-23 at 4 27 00 PM
jeremyvial commented 3 years ago

I face the same issue. Any news about this ?

rrcook commented 3 years ago

I haven't heard anything. I'm concentrating on internal Salesforce dev for the time being, hoping they get things figured out eventually.

JeroenSfdc commented 3 years ago

I can confirm that I face the same issue with both lightning-tabset as well as with the lightning-card base component. Other base components render fine (the few those I tested). Installed version lightning-base-components@1.12.3-alpha. image @rrcook @jeremyvial.

FabienTaillon commented 3 years ago

In your index.js file, can you try inverting these 2 imports:

import { createElement } from 'lwc';
import '@lwc/synthetic-shadow';

to:

import '@lwc/synthetic-shadow';
import { createElement } from 'lwc';