reflex icon indicating copy to clipboard operation
reflex copied to clipboard

Allow Script Tags

Open picklelo opened this issue 2 years ago β€’ 4 comments

Sometimes the user may need to provide JS scripts (for example, adding a Google Analytics script to their site). We need a clean way to allow this.

picklelo avatar Jan 15 '23 19:01 picklelo

Could I work on this? If so, could you tell me where to start?

gringrape avatar Jan 23 '23 07:01 gringrape

@gringrape i guess add one more component ScriptTag to the codebase. Then we can render that component to the page. So the whole feature would be sth like this?:

script_tag = ScriptTag(url='....')

app = pc.App()
app.add_page(index, scripts=[script_tag])

What's @Alek99 idea

TommyDew42 avatar Jan 23 '23 07:01 TommyDew42

Is @gringrape still working on this? If no, i can help with that.

There's a discussion on discord about how we should implement the Script tag.

TommyDew42 avatar Jan 29 '23 06:01 TommyDew42

Is @gringrape still working on this? If no, i can help with that.

There's a discussion on discord about how we should implement the Script tag.

Thank you! I will check on discord :)

gringrape avatar Jan 29 '23 07:01 gringrape

Just for reference, I have a self-hosted umami script waiting to be implemented

'<script async defer data-website-id="3c907df2-dc16" src="https://xx.vercel.app/umami.js"></script>'

Ideally there would be something like pc.script where you could either copy&paste the whole external or define embeds?

ngmisl avatar Feb 10 '23 15:02 ngmisl

watching this to be implemented.

Shahin-rmz avatar Feb 23 '23 13:02 Shahin-rmz

Can I pick this issue up ?

wassafshahzad avatar Mar 04 '23 18:03 wassafshahzad

@wassafshahzad Yes definitely! If you need help/guidance you can post on our Discord for faster replies.

picklelo avatar Mar 05 '23 00:03 picklelo

Sure

wassafshahzad avatar Mar 05 '23 11:03 wassafshahzad