-
-
Notifications
You must be signed in to change notification settings - Fork 650
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
Clarify attachTo documentation/add default direction #131
Comments
I think we should potentially throw an error or at least a warning, as I think a default might be unclear to some people. |
@BrianSipple @chuckcarpenter any ideas about how to make this clearer, document better, provide defaults somehow etc? Perhaps we should just standardize the API and force it to be object form, instead of a string, after we release 2.0? |
I think the clearest design would be to have two attributes -- say, We separate the concerns of targeting and placement, and it's a clarity win-win for users and our code -- which wouldn't have to worry about objects or strings or parsing any potential combination of the two 😄. ... but yeah, if we go that route, I can definitely see it being a 3.0 change. |
I like them being colocated, but we could enforce only one format. |
In that case, I think an object is the better choice. It's declarative and unambiguous for both sides. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Both #129 and #130 are related to users not realizing that a direction is required in an attachTo string. I also ran into this issue, though I eventually realized that this was a requirement after going through the javascript on the demo page.
The documentation does state that the attachTo string must be 'of the form "element on"', but I think that it would be of benefit to the users to add a note or warning somewhere stating this more clearly.
For the future, it might make sense to have a default direction value so that the user doesn't have to think about this detail unless they want to change it. Alternatively, it might make sense to throw an error or at least log a message to the console if a user doesn't provide a direction in attachTo.
The text was updated successfully, but these errors were encountered: