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

Making Custom Widgets #5337

Closed
narmstro2020 opened this issue May 16, 2023 · 12 comments
Closed

Making Custom Widgets #5337

narmstro2020 opened this issue May 16, 2023 · 12 comments

Comments

@narmstro2020
Copy link
Contributor

What happened to the code for making custom widgets. The code in the documentation doesn't work anymore. Was this pulled. Is there a new way to make custom widgets. If so how.

@calcmogul
Copy link
Member

calcmogul commented May 16, 2023

Wouldn't widget UI-related stuff be in https://github.com/wpilibsuite/shuffleboard/? Also, what documentation are you referring to?

@sciencewhiz
Copy link
Contributor

I'm not sure what documentation doesn't work any more. Can you be more specific?

If it's the frc-docs shuffleboard custom widget docs those were updated prior to this season in wpilibsuite/frc-docs#2014 any issues with those docs should be put in the frc-docs repository.

@narmstro2020
Copy link
Contributor Author

narmstro2020 commented May 16, 2023 via email

@narmstro2020
Copy link
Contributor Author

Am I missing something. I've got a blank robot project and started a blank class file from the wpilib docs. But no imports are resolving.

@narmstro2020
Copy link
Contributor Author

So for example. And sorry I forgot to mention those are the docs mentioned above.

This import

import edu.wpi.first.shuffleboard.api.data.ComplexData;

does not resolve.

@calcmogul
Copy link
Member

calcmogul commented May 16, 2023

Does it build though? Intellisense can lie sometimes ("imports not resolving" sounds like an intellisense thing). The class exists at https://github.com/wpilibsuite/shuffleboard/blob/main/api/src/main/java/edu/wpi/first/shuffleboard/api/data/ComplexData.java, which means your import should be correct.

@narmstro2020
Copy link
Contributor Author

So just to document my steps.

  1. Creating a test robot project.
  2. Created a java file called test plugin
  3. Copied the sample plugin code at the top of https://docs.wpilib.org/en/stable/docs/software/dashboards/shuffleboard/custom-widgets/creating-plugins.html
  4. imports not recognizing
  5. Ran build
  6. Did not build

@calcmogul
Copy link
Member

The docs say to use a subdirectory of the shuffleboard repo for the build, not a robot project.
https://docs.wpilib.org/en/stable/docs/software/dashboards/shuffleboard/custom-widgets/creating-plugins.html#building-plugin

@narmstro2020
Copy link
Contributor Author

narmstro2020 commented Aug 17, 2023 via email

@calcmogul
Copy link
Member

calcmogul commented Aug 17, 2023

We tagged this issue as "support" because it was about proper usage of existing functionality. It's not clear that there was any bug in need of fixing. As I stated before, you should be using the shuffleboard repo to build plugins. Using a robot project to build them is an instance of "holding the tool wrong".

@narmstro2020
Copy link
Contributor Author

narmstro2020 commented Aug 17, 2023 via email

@calcmogul
Copy link
Member

Please leave a comment on #5339 instead for tracking purposes.

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

4 participants