dascritch / cpu-audio

An audio WebComponent to provide timecoded links and other features to an audio tag
https://dascritch.github.io/cpu-audio/
GNU Lesser General Public License v3.0
24 stars 2 forks source link

Being able to not include global.css on host page #181

Closed dascritch closed 1 year ago

dascritch commented 1 year ago

Add an attribute option in the calling script for cpu-audio to not include the global cs definition. We may need to not include it to avoid confusions for the integrations

Abirham24 commented 1 year ago

Hello, can I work on this issue?

dascritch commented 1 year ago

Hello @Abirham24 ! Yes ! you're welcome !

I've locked the master branch, so create a feature one. I'm also here to help you. There is a lot of questions as : how to detect when the integrated webpage doesn't want to have global.css inserted ? As an attribute to the <script> tag ? or to the <head> ?

May be you've got a elegant and creative way to do it !

Abirham24 commented 1 year ago

Hello @dascritch, Thank you for your response. I am very interested to work on this issue. Could you help me with how to start with it or send me any guidance links hence I am new to the open source community.

dascritch commented 1 year ago

Most of the useful informations are in https://github.com/dascritch/cpu-audio/blob/master/CONTRIBUTING.md . Code is in vanilla JS, ECMA 2020, CSS grade is v4. We use english for function names, variables and comments. Autodoc is mandatory for any functions, don't hesitate to comment what you do. And think about minimal code to start.

Each time you want to check your code, run ./make.sh --clean --all-themes --test --index to check that something didn't break elsewhere. Test covering is not exhaustive, but I wish to improve it.

dascritch commented 1 year ago

Sorry. I should remove the “good first issue” tag for this story, as the file is included directly and done via the bash script make.sh in the _build_template function. I'll take it later.

Better first issue is perhaps #60 where you have to modify the hashchange event behaviour

dascritch commented 1 year ago

May be the easier way to achieve it would be to do alternate builds, with the global.css merged in the hosted css ? Not a very good option, as integrators will lose the ability to customise style outside of the webcomponent. Needs some rework

dascritch commented 1 year ago

Woops ! NO ! It's easy to do it ! @Abirham24 , you have to call insert_style() from main() on a conditional

dascritch commented 1 year ago

@Abirham24 , are you on it ? I have to do some changes

dascritch commented 1 year ago

@Abirham24 We now have a proper method to pre-parameter global settings

dascritch commented 1 year ago

No answer, i'll take it