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

[pickers] Date Picker style lost in prod env when loading SEEK API script #12404

Closed
uito-s opened this issue Mar 10, 2024 · 2 comments
Closed
Labels
component: pickers This is the name of the generic UI component, not the React module! external dependency Blocked by external dependency, we can’t do anything about it status: waiting for author Issue with insufficient information

Comments

@uito-s
Copy link

uito-s commented Mar 10, 2024

Steps to reproduce

The project is not public so I can't put link here, but those are the steps:

  1. put MUI datepicker into the react page
  2. use nextjs to build the project
  3. load https://integration.seek.com/panels/SeekApi.js script in order to use seek functions
  4. build project again

Current behavior

I am using MUI X for more than 1 year and recently I found that as long as I use the default Date Range Picker with some of my external script loaded, its popup date picker style gets lost, while it only happens in prod env, I’ve double checked the issue, it never happens in dev env, it never happens if I remove the external script in prod env(which is says, dev env always work)
Here is the datepicker with external script loaded in dev env, everything works:
image
Here is the date picker with external seek api script loaded in prod env, style get lost:
image
Here is the date picker without external script loaded in prod env, everything works fine:
image

Expected behavior

The date picker style and its modal style never lost no matter which env its running

Context

No response

Your environment

No response

Search keywords: style lost
Order ID: 86023

@uito-s uito-s added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Mar 10, 2024
@michelengelen michelengelen added component: pickers This is the name of the generic UI component, not the React module! component: DateRangePicker The React component. labels Mar 11, 2024
@LukasTy
Copy link
Member

LukasTy commented Mar 11, 2024

Hey @uito-s
It looks like an issue on the Seek side.
It looks like they are doing too much magic with styles which could be interacting negatively with the @emotion that is used on our end. 🙈
I haven't found their source code which is built into SeekApi as I'm not sure where it resides, but it looks like they are using https://vanilla-extract.style/

Would it be possible for you to put the Seek code in a Shadow DOM to avoid leaking its buggy behavior to the overall DOM? 🤔
Otherwise, feel free to open an issue on their end so that they can fix this problem... 🙈

IMHO, such a solution (having a React app that uses SeekApi via CDN - which internally also bundles a version of React) does not seem optimal as your end users have to download at least 2 versions of React. 🤷
I'd argue that there has to be a way to bundle Seek in a regular frontend app with a build step or you ought to go the full manual integration route. 🙈

@LukasTy LukasTy added status: waiting for author Issue with insufficient information external dependency Blocked by external dependency, we can’t do anything about it and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer component: DateRangePicker The React component. labels Mar 11, 2024
@LukasTy LukasTy changed the title (order:86023) Date Range Picker style lost in prod env when loading seek api script [pickers] Date Picker style lost in prod env when loading SEEK API script Mar 11, 2024
Copy link

The issue has been inactive for 7 days and has been automatically closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! external dependency Blocked by external dependency, we can’t do anything about it status: waiting for author Issue with insufficient information
Projects
None yet
Development

No branches or pull requests

3 participants