Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Rename Material services to have $material prefixes #314

Closed
btford opened this issue Sep 23, 2014 · 12 comments
Closed

Rename Material services to have $material prefixes #314

btford opened this issue Sep 23, 2014 · 12 comments
Assignees
Labels
a11y This issue is related to accessibility
Milestone

Comments

@btford
Copy link
Contributor

btford commented Sep 23, 2014

With recent releases of Angular 1.3.x, $aria service conflicts with ngAria.
ngAria provides a $aria service, which collides with the $aria service in material.services.aria.

Is there a reason material design services are $-prefixed?

@btford btford added the a11y This issue is related to accessibility label Sep 23, 2014
@ThomasBurleson
Copy link
Contributor

@btford

As I recall, the intention was to identify Angular Material services with conformance to the naming conventions in Angular.

Since currently we only publish expectAttribute(), perhaps we can simply decorate the $aria service instance provided in ngAria ?

@ajoslin
Copy link
Contributor

ajoslin commented Sep 23, 2014

Could we not just make a utility function for expectAria?

@ajoslin
Copy link
Contributor

ajoslin commented Sep 23, 2014

Every service should be prefixed with $material - we could also do $materialAria.

@btford
Copy link
Contributor Author

btford commented Sep 23, 2014

I think a decorator is the wrong approach. I'm going to go with @ajoslin's suggestion for now.

@ThomasBurleson
Copy link
Contributor

No problem with $material (or $md) as service prefix as long as we are consistent.

@ThomasBurleson
Copy link
Contributor

@btford Is the expectAttribute() functionality not something that $aria could use? Or is this a material-specific need?

@marcysutton
Copy link
Contributor

That's actually a great idea @ThomasBurleson. It's a great way to gracefully add a label or other attribute. I could see something like it being very useful in ngAria. https://github.com/angular/material/blob/master/src/services/aria/aria.js

@btford
Copy link
Contributor Author

btford commented Sep 23, 2014

we could move it to ngAria, potentially

@btford
Copy link
Contributor Author

btford commented Sep 23, 2014

I addressed this for now with btford@1e13d58 in my PR.

It looks like the goal of this method is to provide a sensible default and also warn developers consuming the component that they may need to make a more informed decision. I like this, but it does add a few bytes to runtime. I think we may want to use a strategy similar to minerr but for warnings like this.

@ThomasBurleson ThomasBurleson changed the title $aria service conflicts with ngAria Rename Material services to have $material prefixes Sep 23, 2014
@ThomasBurleson ThomasBurleson added this to the 0.0.4 milestone Sep 23, 2014
@ThomasBurleson ThomasBurleson self-assigned this Sep 30, 2014
@marcysutton
Copy link
Contributor

@ThomasBurleson @ajoslin is there more work to do on this or can I close it with #340?

@ThomasBurleson
Copy link
Contributor

Also affected by planned efforts to use mt- prefix notations. @see #357

@ThomasBurleson ThomasBurleson modified the milestones: 0.5, 0.4 Oct 8, 2014
@marcysutton
Copy link
Contributor

Renamed as of 3368c93

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a11y This issue is related to accessibility
Projects
None yet
Development

No branches or pull requests

4 participants