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

Enterprise css breaks Monaco Editor #2898

Closed
Fruko opened this issue Oct 4, 2019 · 9 comments
Closed

Enterprise css breaks Monaco Editor #2898

Fruko opened this issue Oct 4, 2019 · 9 comments
Assignees
Labels
focus: refactor Label for tasks we should include for a major release refactor type: breaking change 💥 type: enhancement ✨ [5] Velocity rating (Fibonacci)

Comments

@Fruko
Copy link

Fruko commented Oct 4, 2019

Describe the bug
Using Enteprise css together with Monaco editor causes Monaco editor to not render popups properly due to css conflicts

To Reproduce
Steps to reproduce the behavior:

  1. Clone project from this repo
  2. Run it with cd app && yarn install && ng server
  3. Type import in the file
  4. See that with light theme css included in the index.html the popups do not render properly
  5. Looks like .tree a is conflicting
  6. Use trick setTimeout(() => {debugger;}, 3000) to start a debugger up when its open.

Expected behavior
Enterprise css to be encapsulated so that it wouldn't break other libraries

@tmcconechy tmcconechy added type: enhancement ✨ [5] Velocity rating (Fibonacci) labels Oct 4, 2019
@tmcconechy
Copy link
Member

This is a good use case to support #1199

@tmcconechy
Copy link
Member

tmcconechy commented May 6, 2020

@Fruko

Not sure if you solved this or not but i was testing out https://github.com/vanillawc/wc-monaco-editor and if you embed your monaco editor with that it moves the css into the shadow DOM so it seems like with this it wont conflict.

We are still resistent to make the breaking change yet. Thinking if that doesnt work to do something here so .tree specifically works. Then in a future version we will have ids-tree and an eventual web component version that won't conflict.

@tmcconechy tmcconechy self-assigned this May 6, 2020
@Fruko
Copy link
Author

Fruko commented May 7, 2020

@tmcconechy thank you for this! Actually because of these issues we de-scoped the adoption of Monaco. I will try wc-monaco-editor

@tmcconechy
Copy link
Member

Please give it a shot if it works great, if not i can find a non breaking way to fix the tree so it doesnt conflict.

@Fruko
Copy link
Author

Fruko commented Jun 5, 2020

@tmcconechy we tried with wc monaco editor and unfortunately the styles are broken anyway

image

I think manually fixing the style conflicts is our only option to make it work for now

@tmcconechy
Copy link
Member

Ok, i thought i saw the issue with the typeahead popupmenu was definately working. Any idea what classes are conflicting here?

Should we just test with wc monaco editor then?

@tmcconechy tmcconechy added this to To do in Enterprise 4.31.x (July 2020) Sprint via automation Jun 5, 2020
@Fruko
Copy link
Author

Fruko commented Jun 5, 2020

it seems that quick fix could be removing the font-size: 0
image

but there can be a number of these cases.
facing the issue as it is, I would say our team will try to use angular wrapper for monaco
https://github.com/atularen/ngx-monaco-editor

and override the styles to make it work

@tmcconechy
Copy link
Member

OK yes thats probably easier. It would be tough to remove that font-size right now. What i'll do is do it on the bit of the rework we are starting then. (no reset ect)

@tmcconechy tmcconechy added the focus: refactor Label for tasks we should include for a major release refactor label Jun 5, 2020
@tmcconechy
Copy link
Member

Descoping this for now. But in 5.0 we have encapsulation so it will work in 5.0. For now have to use your current workarounds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: refactor Label for tasks we should include for a major release refactor type: breaking change 💥 type: enhancement ✨ [5] Velocity rating (Fibonacci)
Projects
None yet
Development

No branches or pull requests

2 participants