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

Add iframe render mode #16

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SevereOverfl0w
Copy link

No description provided.

@SevereOverfl0w SevereOverfl0w force-pushed the render-mode-iframe branch 2 times, most recently from 0e2a877 to 09e68da Compare January 11, 2024 19:24
@SevereOverfl0w
Copy link
Author

I haven't tested extensively, but I don't think CSS reloading works correctly in the new render mode.

@SevereOverfl0w
Copy link
Author

Adding this to my portfolio.html got react devtools working:

    <script>
if (window.parent !== window) {
  window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;
}
    </script>

@Reefersleep
Copy link

Reefersleep commented Feb 14, 2024

This seems to fix an issue I have with ReactSelect not rendering correctly due to a dependency on emotions/css, which mutates the global document head. More details about the general problem (in js-land) and various reports (by other people than me 😁 ) in this issue: JedWatson/react-select#3680

Instructions on how to test (in a leiningen project)

To build this branch, clone Portfolio from that account locally, cdto it and switch to the correct git branch.
Then

clj -A:jar  

to build a portfolio.jar directly in the directory. (This requires that you have clj installed).

Then, edit pom.xml so that

  <groupId>io.dominic.forks</groupId>

Now, use maven to "install" the jar into ~/.m2, so that it is useable from your own leiningen project. (This requires that you have mvn installed.)

mvn install:install-file -Dfile=portfolio.jar -DpomFile=pom.xml

Now, we can refer to the built jar in the project.clj:

                         #_[no.cjohansen/portfolio "2023.12.07"]
                         [io.dominic.forks/portfolio "2023.12.07"]

@zikajk
Copy link

zikajk commented Nov 20, 2024

@SevereOverfl0w solution doesn't seem to work with a react-select, are there any other workarounds at the moment?

@SevereOverfl0w
Copy link
Author

I have this working with react-select.

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.

4 participants