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

bug: component content duplicated (with hydrate app on a SSG) #3593

Closed
3 tasks done
bsastregx opened this issue Sep 9, 2022 · 4 comments
Closed
3 tasks done

bug: component content duplicated (with hydrate app on a SSG) #3593

bsastregx opened this issue Sep 9, 2022 · 4 comments

Comments

@bsastregx
Copy link

bsastregx commented Sep 9, 2022

Prerequisites

Stencil Version

2.13.0

Current Behavior

Hi, greetings.
I am using stencil with hydrate app output target, since I need to use my library of components with a static site generator (Eleventy). On stenciljs everything works fine, but on eleventy, I am experiencing a buggy behavior with a specific component: gwds-button. This component prints a simple a tag along with some css classes:

image

On eleventy, I am using another component (gwds-loot-at-me), which has as slotted content a gwds-button component (along with other content such as a paragraph). Here is where the strangeness begins: two link elements gets printed inside gwds-button, where just one is expected to be display.

image

Now, if I place a gwds-button outside of another component, the button behaives as expected, tag duplication does not ocurrs. The duplication only seems to happen when gwds-button is nested inside another gwds-component.

Expected Behavior

gwds-component to display only one a tag.

Steps to Reproduce

  1. clone the repo
  2. npm install
  3. npm start
  4. open the site
  5. see the first big component with green background. you will see two pink buttons, and two white buttons, and you should see one pink and one white only.
  6. To check the markup, go to src/en/index.html

Code Reproduction URL

https://github.com/bsastregx/gwds-eleventy

Additional Information

May be this helps, not sure: #2611 | #3413

@alicewriteswrongs
Copy link
Contributor

Hello @bsastregx, thanks for filing this issue and for providing a reproduction case!

You linked to #3413 and it looks at first glance like this issue may be a duplicate of that - could you confirm that it's the case? If so I think we'd prefer to close this one so that we can keep a one-to-one relationship between Github issues and reported problems, and so that all discussion and updates related to the problem can happen on a single issue.

If this issue is not a duplicate of #3413, can you share more about why and what is different here?

Thanks!

@alicewriteswrongs alicewriteswrongs added the Awaiting Reply This PR or Issue needs a reply from the original reporter. label Sep 13, 2022
@ionitron-bot ionitron-bot bot removed the triage label Sep 13, 2022
@bsastregx
Copy link
Author

Hi @alicewriteswrongs

You are welcome.
Yes, it is a duplicate.
You can close this issue if you would like.

Thanks for your time.

@ionitron-bot ionitron-bot bot removed the Awaiting Reply This PR or Issue needs a reply from the original reporter. label Sep 13, 2022
@alicewriteswrongs
Copy link
Contributor

@bsastregx thanks for letting me know, any updates on the problem will be on #3413 and, as I wrote over there, while I can't promise it will be addressed on any particular timeline at present I can promise that we will take a look at it soon.

Thanks again!

@bsastregx
Copy link
Author

@alicewriteswrongs I understand. I really appreciate the time you took to respond. Thanks very much. I hope this bug gets fixed whenever you can. Bests, Bruno.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants