Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Component prefixing #4373

Closed
18 tasks done
Foxandxss opened this issue Sep 8, 2015 · 8 comments
Closed
18 tasks done

Component prefixing #4373

Foxandxss opened this issue Sep 8, 2015 · 8 comments

Comments

@Foxandxss
Copy link
Contributor

So this is the proposal for the prefixing.

Steps for a foo component:

  • Create a comment at the bottom of foo.js, copy all the content of the file below that comment (removing modules dependencies in here so it is a get module instead of create).
  • Prefix the directive (and controllers) and make the needed changes if any (for example check if there is any $watch using the old directive name)
  • Fix the tests, normally just change the elements to compile.
  • Add a value service in the module after the comment to suppress the deprecation warnings.
  • add an if inside the deprecated directives to log the deprecation.
  • Add a comment at the bottom of foo.spec.js and below that, a new describe to check that the suppression works.
  • Update the demo and docs to show the prefix.

For the commit title, it is more a feature than a bug fix (It features a prefix now).

Here is the list in strict order (some component depend on other components). If you want to tackle one, edit this to add yourself.

Important: If there is any $ in a service / controller / directive, remove it.

@Foxandxss
Copy link
Contributor Author

About the $ thing, Angular guidelines states that $ is only for angular use.

@wesleycho
Copy link
Contributor

I don't think we should remove the $ - pretty much any third party library still uses it, such as UI Router. In truth, I doubt Angular will remove support of this in service names.

@Foxandxss
Copy link
Contributor Author

@wesleycho
Copy link
Contributor

I have seen that before, but I'm speaking of the reality of the ecosystem. It can be found in third party libraries all over the place.

@Foxandxss
Copy link
Contributor Author

That doesn't mean it is done correctly.

Personally I don't like them, adds nothing. But I don't mind leaving them anyway.

@wesleycho wesleycho changed the title Components prefixing Component prefixing Sep 10, 2015
@RobJacobs
Copy link
Contributor

@BobbieBarker @wesleycho My schedule is getting back to normal, I can tackle Datepicker and Typeahead if you haven't started these yet.

Sorry, I should have looked at PR's! Will take a look at #4509 tests.

@Foxandxss
Copy link
Contributor Author

@RobJacobs There is a PR for datepicker but @wesleycho tried to do a bit too much with it and well, it is more stuck. Typeahead is almost done I think.

@wesleycho
Copy link
Contributor

If you want to fix the tests in my attempt at the datepicker one, you're more than welcome to :) .

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

3 participants