Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Conversation

@clottman
Copy link
Contributor

@clottman clottman commented Jan 7, 2020

Clubhouse ticket

I can't reproduce this bug in the examples at shared-components.glitch.me, but here's what some buttons in the community site look like sometimes:

dev tools
glitch.com

Note the CSS, on the line under border. And that the button is smaller than normal (hard to tell in the screenshot)

I tested this by using createRemoteComponent in a local branch.

Glitch (shared-components) added 7 commits January 6, 2020 22:35
./lib/button.js:708175/105
./lib/button.js:708175/21
./lib/button.js:708175/239
./lib/button.js:708175/357
./package.json:708175/3412
./lib/button.js:708175/91
./rollup.config.js:708175/18
./package.json:708175/29
@sheridanvk
Copy link
Contributor

I'm not sure how to test this because I can't repro the issue you're seeing on glitch.com - CSS looks fine for my user account in the same place where it's broken in your screenshot. You said it was happening only sometimes, do you know under what conditions?

And do you know why this would have been fixed by taking out the textwrap line? This is also not clear to me, so I'm having a hard time reviewing this. Happy to do a quick call later today if that's easiest too!

@sheridanvk
Copy link
Contributor

oh I see, this removes the line that is erroneously putting the value of textWrap directly into the CSS as-is, makes sense!

I managed to reproduce the bug itself on a remix. Trying to test out your fix using createRemoteComponent and it's throwing errors: https://glitch.com/edit/#!/aeolian-guavaberry?path=src/components/project/project-item.js:24:50, but I can't get that to work - have you seen this error before? ReferenceError: window is not defined

@sheridanvk sheridanvk self-assigned this Jan 7, 2020
@clottman
Copy link
Contributor Author

clottman commented Jan 7, 2020

@sheridanvk yes exactly, I removed a line that puts the value of textWrap directly into the CSS; there's a line a few below my removal that actually uses the textWrap property to change some CSS. I

I also was not able to reproduce this in the shared-components examples, but could reproduce it reliably in my remix. I don't know why that is, unfortunately - my guess is something about how we're building the shared component source and webpack transpiling it; that happens differently in the actual shared components project.

The Reference error: window is not defined comes from our server-side rendering. See the note in the remote component section of contributing.md:

this does not currently work with SSR in the community site. The current work around is to go in Glitch-Community/server/routes.js and change this line:
const renderPage = require('./render');
to
const renderPage = () => ({ html: null, helmet: null, styleTags: null });

Copy link
Contributor

@sheridanvk sheridanvk left a comment

Choose a reason for hiding this comment

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

Great thanks for the pointers! Don't know how I missed that step in the README ;) all LGTM!

@clottman clottman merged commit f55fb02 into master Jan 8, 2020
@clottman clottman deleted the ritzy-dichondra branch January 8, 2020 21:38
@keithk
Copy link
Contributor

keithk commented Nov 10, 2020

🚀 PR was released in v0.19.0 🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants