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

Namespace issues #24

Open
danielpuglisi opened this issue Apr 13, 2022 · 6 comments
Open

Namespace issues #24

danielpuglisi opened this issue Apr 13, 2022 · 6 comments
Labels

Comments

@danielpuglisi
Copy link
Contributor

Hey @damoiser during working on #23 I noticed two namespacing issues I would like to address:

  1. Classes are not namespaced currently. This could lead to name conflicts with base applications and other gems. Best practice would be to move classes into a QRBills module. E.g. QRGenerator becomes QRBills::QRGenerator and so forth.
  2. The css classes within the HTML layout are also not namespaced which could lead to css issues with applications that use the same class names. Best practice would be to prefix the css classes with a configurable name prefix. E.g. .subtitle becomes .qrbills__subtitle. qrbills__ could be changed to whatever the developer wishes.
@damoiser
Copy link
Owner

Thanks for the inputs, yes, the gem has room of improvement, will put this on the backlog and try to tackle these tasks when I will have some spare time

@damoiser damoiser added the enhancement New feature or request label Apr 14, 2022
@danielpuglisi
Copy link
Contributor Author

I can gladly put together a PR next week. Unless you want to tackle that one yourself?

@damoiser
Copy link
Owner

if you have time would be superb!

@danielpuglisi
Copy link
Contributor Author

I do. Will tackle this after finishing #23.

The ruby class namespace changes will not be backwards compatible though. So this could be a good chance for a major release and to remove the png code that touches the filesystem. What do you think?

@damoiser
Copy link
Owner

good point, I would maybe wait a bit until we regroup some others breaking changes before releasing v2 of the gem

@danielpuglisi
Copy link
Contributor Author

Agreed. I'll create a first PR just for the CSS namespacing as those can be backwards compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants