Add optional noscript parameter with sane default#1343
Add optional noscript parameter with sane default#1343JamesHutchison wants to merge 5 commits intoreactive-python:mainfrom
Conversation
|
Rather than adding a new function parameter for one HTML element, it would be more extensible to allow the user to supply their own |
|
I went down that path and it just seemed to make things substantially more complex because you have this juggle of the renderer taking in a ReactPy object which then forces the user to look up how the function works. I don't see a good reason to customize the Index.html renderer. Complex pages have a different, prescribed use case, which is to not use the single page component. The renderer should, in my opinion, be batteries included and just handle common use cases, which noscript absolutely is. |
|
Makes sense - How about a slight tweak: Instead of having this be specifically named for "noscript", we could tweak the name to be something like My though process is that the current implementation in this PR doesn't have any hard restrictions around the string content being a |
|
Are you good with punting that to an issue? This has already exceeded my timebox for this feature. If nobody is asking for it then it makes sense to just not put further effort into it. I'm only asking for noscript, because I need it, and I have an existing reference implementation that pulls it from an HTML file. There's advantages to simply having it be an argument. Like if you are hosting this online, you NEED that |
|
The argument I'm making is that:
The question I would ask is this method of adding it matches the existing and prescribed pattern for instantiating and running the app. The version I'm used to had an options object where the header configuration went. |
Description
This adds an optional
noscriptparameter that is rendered. It takes a file path. The use case is that many internet bots won't execute javascript and thus won't see any content.Checklist
Please update this checklist as you complete each item:
By submitting this pull request I agree that all contributions comply with this project's open source license(s).