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

Added Portal to ErrorMessage to stack it on top of the view #7655

Merged

Conversation

andrefernandes-95
Copy link
Contributor

@andrefernandes-95 andrefernandes-95 commented Feb 5, 2025

📝 Summary

Wrapped ErrorMessage within a Portal so that it correctly positions it above all the other elements.

Right now, it seems every View component has a z-index: 0, which makes it very tricky to work with the children z-index, causing the issue described here #7524

I think using a Portal could be the right idea here.

Update:

  • Replaced Portal implementation with <Layout.Center /> as suggested below.

📝 Related Issues

#7524

🚀 Demos (Updated after @mozzius suggestion)

Scroll.test.2.mp4

@mozzius
Copy link
Member

mozzius commented Feb 5, 2025

Ah thanks for trying to fix it - however, we don't want stack it on top of everything, it just needs to fit in the center column, like it used to (and still does on native). I think wrapping it in <Layout.Center> will do the trick?

@andrefernandes-95
Copy link
Contributor Author

andrefernandes-95 commented Feb 5, 2025

Ah thanks for trying to fix it - however, we don't want stack it on top of everything, it just needs to fit in the center column, like it used to (and still does on native). I think wrapping it in <Layout.Center> will do the trick?

Thanks for the tip, I've gone back and followed the suggestion, you're spot on, it looks much better and it's within the layout like you mentioned. Took some screenshots from several ErrorMessage instances to check:

Notifications

Layout Center

Lists

Other Screens 2

Profile

Other Screens 3

I'll commit the change and take new evidences. Thanks a lot!

@mozzius
Copy link
Member

mozzius commented Feb 5, 2025

Awesome, thank you so much 🙏 looks great!

Copy link
Member

@mozzius mozzius left a comment

Choose a reason for hiding this comment

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

Beautiful

@mozzius mozzius merged commit 856c799 into bluesky-social:main Feb 5, 2025
7 checks passed
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 this pull request may close these issues.

2 participants