Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Prefix attr value to prevent conflicts #2089

Closed
jbcullis opened this issue Feb 3, 2019 · 5 comments
Closed

Prefix attr value to prevent conflicts #2089

jbcullis opened this issue Feb 3, 2019 · 5 comments

Comments

@jbcullis
Copy link

jbcullis commented Feb 3, 2019

Feature-Request

Describe the Feature
I recently ran into the issue of a conflict with the attr value aspectRation where the square sdk also had an entry however with a different format.

Possible Implementations
It would be nice to prefix any attr values to clearly identify they belong to react-native-camera and prevent conflicts with other packages.

Related Issues

Love react-native-camera? Please consider supporting our collective: 👉 https://opencollective.com/react-native-camera/donate
Want this feature to be resolved faster? Please consider adding a bounty to it https://issuehunt.io/repos/33218414

@sibelius
Copy link
Collaborator

sibelius commented Feb 3, 2019

Can you send me the link of this sdk?

Does this sdk uses react native camera?

@jbcullis
Copy link
Author

jbcullis commented Feb 3, 2019

This is the sdk - https://github.com/square/react-native-square-reader-sdk

I don't think it uses the camera for taking photos, but it does do image uploads for logo's and product photos.
It may also reference the aspect ratio for the signature pad?

Either way, I though it would be much easier for libraries to prefix their variables to prevent duplicate entries.

@sibelius
Copy link
Collaborator

sibelius commented Feb 3, 2019

What if another library conflicts with the prefixed version?

This can’t scale, we won’t change because of this reason

@sibelius sibelius closed this as completed Feb 3, 2019
@jbcullis
Copy link
Author

jbcullis commented Feb 3, 2019

You would do something like react_native_camera_aspectRatio which would be a safe bet to never conflict.
I realise this would feel clunky...but cloning the repo and making the changes locally feels clunkier.

@sibelius
Copy link
Collaborator

sibelius commented Feb 3, 2019

aspectRatio={props.sdkAspectRatio}

@react-native-camera react-native-camera locked as resolved and limited conversation to collaborators Feb 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants