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

Clarify attachTo documentation/add default direction #131

Closed
mister-walter opened this issue Jul 29, 2016 · 6 comments
Closed

Clarify attachTo documentation/add default direction #131

mister-walter opened this issue Jul 29, 2016 · 6 comments

Comments

@mister-walter
Copy link

mister-walter commented Jul 29, 2016

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.

@RobbieTheWagner
Copy link
Member

I think we should potentially throw an error or at least a warning, as I think a default might be unclear to some people.

@RobbieTheWagner
Copy link
Member

@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?

@BrianSipple
Copy link
Contributor

BrianSipple commented Oct 21, 2018

I think the clearest design would be to have two attributes -- say, attachTarget and placement.

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.

@RobbieTheWagner
Copy link
Member

I like them being colocated, but we could enforce only one format.

@BrianSipple
Copy link
Contributor

In that case, I think an object is the better choice. It's declarative and unambiguous for both sides.

@stale
Copy link

stale bot commented Jan 13, 2019

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.

@stale stale bot added the wontfix label Jan 13, 2019
@stale stale bot closed this as completed Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants