Skip to content

Extract the playground in its own HTML file#24

Merged
lmangani merged 1 commit into
Query-farm:mainfrom
vhiairrassary:vhiairrassary/extract-playground-in-its-own-html-file
Dec 16, 2024
Merged

Extract the playground in its own HTML file#24
lmangani merged 1 commit into
Query-farm:mainfrom
vhiairrassary:vhiairrassary/extract-playground-in-its-own-html-file

Conversation

@vhiairrassary

@vhiairrassary vhiairrassary commented Dec 16, 2024

Copy link
Copy Markdown
Collaborator

I have found src/include/play.h very complex to audit (it loads JS scripts from 3rd party sources) so I have extracted and formatted it in its own HTML file. Wdyt? I am happy to discard the PR if it does not make sense for you

@lmangani

lmangani commented Dec 16, 2024

Copy link
Copy Markdown
Collaborator

This was the initial noob hack to have the play UI embedded instead of it being served from a file to keep the application stand-alone. If this method retains the same approach (as it seems) and allows serving the UI without requiring it on the filesystem or sacrificing its readability, then it's nothing short of fantastic! TIL

@lmangani

Copy link
Copy Markdown
Collaborator

Since we're adding flexibility to this part, maybe we could also add an ENV option to allow loading any static UI from arbitrary local path as an alternative to the embedded play UI? Might be overwill but could be useful for customization.

@vhiairrassary

vhiairrassary commented Dec 16, 2024

Copy link
Copy Markdown
Collaborator Author

If this method retains the same approach (as it seems)

Yes it should be the same (and maybe at some point in the future we could move to #embed or std::embed)

add an ENV option to allow loading any static UI from arbitrary local path

Sounds like a good idea, but I would prefer to focus on parameters before, wdyt? Do we merge this one as is?

@lmangani lmangani merged commit bd381c1 into Query-farm:main Dec 16, 2024
@vhiairrassary vhiairrassary deleted the vhiairrassary/extract-playground-in-its-own-html-file branch December 16, 2024 19:58
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