mantinedev / mantine

A fully featured React components library
https://mantine.dev
MIT License
26.87k stars 1.9k forks source link

Spotlight renders out to the left of the screen in Production using Remix (express server) #2107

Closed ihpannu closed 1 year ago

ihpannu commented 2 years ago

What package has an issue

@mantine/spotlight

Describe the bug

Spotlight renders out to the left of the screen in Production using Remix (express server). Works perfectly well using in Dev environment. I had the same issue with modals but solved using within portal props and facing problems on the latest @remix and "@mantine/hooks": "^5.1.5",

Please suggest

What version of @mantine/hooks page do you have in package.json?

5.1.5

If possible, please include a link to a codesandbox with the reproduced problem

No response

Do you know how to fix the issue

No

Are you willing to participate in fixing this issue and create a pull request with the fix

No

Possible fix

No response

rtivital commented 2 years ago

Hi @ihpannu, you can set withinPortal prop on SpotlightProvider the same way as on Modal component. If that does not help, please provide a repository with minimal reproduction, use mantine remix template as base for your repository.

ihpannu commented 2 years ago

-I will submit today also having few other issues such as

Attached some screenshots for now will push an repo to show live results image image

rtivital commented 2 years ago

@ihpannu are you using mantine-remix-template?

ihpannu commented 2 years ago

@rtivital Yes this started happening since I switched to mantine 5 and react 18 using the template provided on the website

ihpannu commented 2 years ago

@rtivital another example of spotlight it's still in the dom tree image

rtivital commented 2 years ago

React 18 is not supported with Remix template, downgrade to react 17 to solve these issues.

ihpannu commented 2 years ago

@rtivital Rolled back to React 17 and Mantine 5.1.6 all same issues still persist. This app is running in production on Railway using remix/express server

rtivital commented 2 years ago

Well, I cannot help much, if you can reproduce an issue in mantine-remix-template and send the repo I can have a look

ihpannu commented 2 years ago

@rtivital attached is the link to the repo using mantine-remix-template on GitHub https://github.com/ihpannu/mantine-remix-template and link to the live site reproducing the error https://mantine-remix-template-production.up.railway.app/

andremonteiro95 commented 2 years ago

React 18 is not supported with Remix template, downgrade to react 17 to solve these issues.

Is supporting React 18 w/ Remix on the roadmap?

rtivital commented 2 years ago

In a long term – maybe, in short term – no. With current remix direction (server streaming as default) I doubt that it will worth the effort to support remix at all. As for current state – remix feels very unstable – we've already had to change ssr logic twice in the past 6 months, so I'm not planning to work on it any time soon until remix becomes at least a little more mature (in terms of css-in-js handling).

ihpannu commented 2 years ago

@rtivital do you recommend porting over to Next.js? we cannot afford to change the UI lib at the moment and given the mantine/remix plan it doesn't seem ideal to continue using the broken framework on the production level

rtivital commented 2 years ago

Well, it's up to you, I have several next.js app running in production without any issues built with Mantine.

ihpannu commented 2 years ago

@rtivital Thank you for advice

alukach commented 2 years ago

Possibly related to https://github.com/mantinedev/mantine/issues/2311

rtivital commented 1 year ago

This issue is closed for one of these reasons:

If you think that this issue was closed by mistake, and it is still an issue in version 7.0, please reopen it.