-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(Tile): recalculate tile rect height on component did mount #9593
fix(Tile): recalculate tile rect height on component did mount #9593
Conversation
✔️ Deploy Preview for carbon-react-next ready! 🔨 Explore the source changes: 2250284 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/614ddea67b8b480008df2766 😎 Browse the preview: https://deploy-preview-9593--carbon-react-next.netlify.app |
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: 2250284 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/614ddea6a2c3040007cf051b 😎 Browse the preview: https://deploy-preview-9593--carbon-elements.netlify.app |
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: 2250284 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/614ddea6ca1aac00087e1a1c 😎 Browse the preview: https://deploy-preview-9593--carbon-components-react.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting a CORS error in deploy preview.
This reminds me exactly of a PR i just recently spent way too much time debugging. I think it's Storybook acting up. I ended up removing the Storybook Actions Add-on for Button so it would work.
Also, looks like tests are failing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small note with the id
change.
A question that I don't know if we considered, why do we need to calculate the height of the "above the fold" content in the first place? Can't we just only render the above the fold content until the tile is expanded and then render the rest of the content? 🤔
Co-authored-by: Josh Black <[email protected]>
That makes sense to me @joshblack -- should I open a ticket for a minor tile refactor? |
@dakahn sounds great to me! |
@joshblack wrapped the resizeObserver work in before/after each blocks and scoped it to the expandable tile tests, but it doesn't seem to be firing off properly |
@dakahn I think it'll need to be |
Hmmm -- @joshblack something funnier is going on I don't understand. If I lift up |
@dakahn yeah, I'd make sure that it's inside of the |
@dakahn just pushed up a fix that should cover it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still getting CORS errors on deploy preview.
Looks like the CORS errors are only present on Netlify's deploy preview. They work perfectly locally and in prod. |
Closes #9187
Adds a resize observer to Tile that recalculates the rect height to account for tiles initially rendered as hidden (like in a set of tabs)