I have just noticed (with other libraries too) that the samples don’t build out the box.
But when you just change something on the code and save that change the sample builds - rather confusing, but give it a try
How do you remove a legacy library from a project in the WebIDE? The X button that used to appear next to each of them no longer shows for me in Chrome.
Not meaning to rain on your parade, but the web-IDE version of the library manager is not very friendly. It needs some kind of classification system, or filter system in order to narrow down the list when looking to see if theres something useful in there. Adding simple tags like software , hardware, networking, display, temperature, signalling etc would be very helpful, especially when the library titles are not especially meaningful. With ~380 libraries, having wade through the whole lot looking for that gem you need seems rather stupid. Also - why are there no descriptions of what each library does? Its there in the screenshot in the OP, where is it in the web-IDE?
But a categorization would be good, as long contributors populate the category field of library.properties in a meaningful way - which currently is not the case for all of them, since it's not demanded by the libraries validation process.
And hence I've created a GitHub issue for that point
Have you first created the new project with particle project create?
To add a v2.0 library to a project, this project needs to be v2.0 too.
// ---------- without a v2.0 project ----------
C:\tmp\test>particle library add internetbutton
Project or library not found in directory C:\tmp\test
// ---------- with a v2.0 project ----------
C:\tmp\test>particle project create
What would you like to call your project? [myproject]:
Would you like to create your project in the default project directory? [Y/n]: n
Would you like to create your project in C:\tmp\test? Type "n" to cancel. [Y/n]:
Initializing project in directory C:\tmp\test\myproject...
> A new project has been initialized in directory C:\tmp\test\myproject
C:\tmp\test>cd myproject
C:\tmp\test\myproject>particle library add internetbutton
> Library InternetButton 0.1.11 has been added to the project.
> To get started using this library, run particle library view InternetButton to view the library documentation and sources.
C:\tmp\test\myproject>
@will, we had compained about this already when Libs v2.0 got first introduced.
Web IDE projects that already contain a legacy library cannot be updated to use v2.0 libraries since there is no way to remove the legacy lib from the project to reimport the v2.0 lib.
That is really annoying, since currently the only way around that is to clone the entire project.
Thanks for clarifying. Unless I’m misreading the comments, this looks like a simple UI styling issue for the Web IDE. I’ll make sure that one of our engineers jumps on this first thing next week. The individual I have in mind for the job is on vacation but will be back next week.