GithubHelp home page GithubHelp logo

wpilibsuite / shuffleboard Goto Github PK

View Code? Open in Web Editor NEW
79.0 17.0 85.0 9.04 MB

A modern dashboard for FRC

License: Other

Java 94.33% CSS 5.65% Shell 0.02%
frc robotics first-frc first-robotics-competition

shuffleboard's Introduction

CI

Shuffleboard

Structure

Shuffleboard is organized into three base projects: api, app, and plugins. plugins has additional subprojects that the main app depends on to provide data types, widgets, and data sources for basic FRC use.

Running

Shuffleboard is installed by the FRC vscode extension: Installation Instructions. It can be launched from the WPILib menu in Visual Studio Code (start tool). It can also be run manually by running the shuffleboard.vbs in c:\Users\public\wpilib\<year>\tools (Windows) or shuffleboard.py in ~/wpilib/<year>/tools (Linux or Mac).

Requirements

  • JRE 11. Java 11 is required. No other version of Java is supported. Java 11 is installed by the WPILib installer.

Building

To run shuffleboard use the command ./gradlew :app:run.

To build the APIs and utility classes used in plugin creation, use the command ./gradlew :api:shadowJar

To build the Shuffleboard application, use the command ./gradlew :app:shadowJar. By default, this will create an executable JAR for your operating system. To build for another OS, use one of the platform-specific builds:

OS Command
Windows 64-bit ./gradlew :app:shadowJar-win64
Windows 32-bit ./gradlew :app:shadowJar-win32
Mac ./gradlew :app:shadowJar-mac64
Linux 64-bit ./gradlew :app:shadowJar-linux64

Only the listed platforms are supported

To build all platform-specific JARs at once, use the command ./gradlew :app:shadowJarAllPlatforms

Requirements

  • JDK 11. JDK 11 is required. No other version of Java is supported.

shuffleboard's People

Contributors

andrewda avatar andrewgazelka avatar austinshalit avatar blucoat avatar calcmogul avatar carbotaniuman avatar devmanso avatar fixermark avatar fovea1959 avatar gftabor avatar jlleitschuh avatar lost1227 avatar nightpool avatar noamzaks avatar octogonapus avatar peterjohnson avatar petermitrano avatar pjreiniger avatar prateekma avatar realsaddy avatar retrodaredevil avatar rlee287 avatar rrlapointe avatar samcarlberg avatar sciencewhiz avatar spacey-sooty avatar starlight220 avatar thadhouse avatar trevnels avatar tylertian123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shuffleboard's Issues

UI is too big

The UI is too large and less information can be presented in a single view. See the attached image of 2 identically sized windows. On the left is shuffleboard. On the right is SmartDashboard.

untitled

Improve recording file organization

They should be saved in a format like SmartDashboard/recordings/YYYY-MM-DD/hh-mm-ss-timestamp.sblog

This makes it easier to clean out super old recordings, and easier to find the recordings you're looking for

Tests fail on travis Linux instance

Class Test
MainWindowControllerTest testDragSingleNetworkTableSourceToWidgetPane
CompositeNetworkTableSourceTest testDataUpdates
SingleKeyNetworkTableSourceTest testValueUpdates
WidgetSaverTest loadSimpleWidget

License should match the rest of WPI Lib

All other software released under WPIlib is BSD 3 clause.

Shuffleboard should be licensed under the same license.

The question that I have is if it should be copyright FIRST or WPI?

GRIP is copyright WPI. WPILib is copyright FIRST.

Consider switching to Junit5

Per the short discussion on one of the recent PRS; there was a thought floated about switching to Junit5.

The Junit5 vintage plugin would be used to run the TestFX tests as I think they rely on the Junit4 API.

I'm opening this so the question can be discussed.

I'm my experience:

  • Intellij can detect and run these tests absolutely fine.
  • Gradle has awesome support including Gradle Script Kotlin staticly typed configuration support (added by yours truly in a PR against the Junit5 project earlier this month).
  • The API is very clean and polished.
  • Works fine with hamcrest assertions.

Widgets only resize on the edge of the screen that is moving

If you have a row with 3 widgets that are {2, 1, 1} grid cells in size and the "2" sized widget could be shrunk. If I drag from the right edge towards the left edge, things only on the right edge start moving, then shrinking. The left edge widget doesn't seem to resize. Probably a bug since the other interior widgets seem to resize properly.

Launches sized too large

Running shuffleboard on my machine results in it launching with the window size too large. It flows off the top and bottom of the screen, hiding the menus.

Widget titlebar probably should default to the root name

The titlebar on widgets currently has the full path for the value. So a typical value would be "SmartDashboard/name". With small widgets, the name isn't shown because "SmartDashboard" fills the entire title area. Maybe show the full value when mousing over or in a properties dialog for the widget.

There should be a default widget for each data type

We currently just grab the first compatible widget alphabetically. We should have an annotation @DefaultWidget that provides an array of data types (in the same format as @Description) that can be placed on widget classes

@Description(name  = "My Number Widget", dataTypes = NumberType.class)
@DefaultWidget(NumberType.class)
public class MyNumberWidget implements Widget {
  // ...
}

Style warning on startup

Jun 19, 2017 4:48:54 PM com.sun.javafx.css.StyleConverterImpl getInstance
SEVERE: StyleConverterImpl : converter Class is null for : com.sun.javafx.scene.layout.region.CornerRadiiConverter
Jun 19, 2017 4:48:54 PM com.sun.javafx.css.StyleConverterImpl readBinary
SEVERE: could not deserialize com.sun.javafx.scene.layout.region.CornerRadiiConverter
could not deserialize com.sun.javafx.scene.layout.region.CornerRadiiConverter

possibly related to controlsfx?

Tabs should be able to auto-populate

For example, a SmartDashboard tab should be able to auto-populate with one widget for each Network Table source that matches ^/SmartDashboard/.+$, and LiveWindow tab auto-populate with network table sources matching ^/LiveWindow/.+$

Since every key can be a source and there's no point in having widgets for unchanging data like /LiveWindow/Subsystem/Name or /LiveWindow/Subsystem/.type, or for keys that are part of a composite object like a SendableChooser, the auto-population should be smart and not add widgets for those sources

Changing key throws exception

When I change the key of a key-value pair, I get this exception:

Exception in thread "JavaFX Application Thread" java.lang.IndexOutOfBoundsException
        at com.sun.javafx.scene.control.ReadOnlyUnbackedObservableList.subList(ReadOnlyUnbackedObservableList.java:136)
        at javafx.collections.ListChangeListener$Change.getAddedSubList(ListChangeListener.java:242)
        at javafx.scene.control.TreeTableView$TreeTableViewArrayListSelectionModel.handleSelectedCellsListChangeEvent(TreeTableView.java:3244)
        at javafx.scene.control.TreeTableView$TreeTableViewArrayListSelectionModel.access$2000(TreeTableView.java:2289)
        at javafx.scene.control.TreeTableView.sort(TreeTableView.java:1817)
        at edu.wpi.first.shuffleboard.widget.NetworkTableTreeWidget.makeBranches(NetworkTableTreeWidget.java:150)
        at edu.wpi.first.shuffleboard.widget.NetworkTableTreeWidget.lambda$null$7(NetworkTableTreeWidget.java:75)
        at java.util.HashMap.forEach(HashMap.java:1288)
        at edu.wpi.first.shuffleboard.widget.NetworkTableTreeWidget.lambda$new$8(NetworkTableTreeWidget.java:75)
        at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:182)
        at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
        at javafx.beans.binding.ObjectBinding.invalidate(ObjectBinding.java:172)
        at org.fxmisc.easybind.monadic.FlatMapBindingBase.mappedInvalidated(FlatMap.java:76)
        at org.fxmisc.easybind.monadic.FlatMapBindingBase.lambda$new$22(FlatMap.java:21)
        at javafx.beans.WeakInvalidationListener.invalidated(WeakInvalidationListener.java:83)
        at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:349)
        at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
        at javafx.beans.property.ObjectPropertyBase.fireValueChangedEvent(ObjectPropertyBase.java:105)
        at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112)
        at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:146)
        at edu.wpi.first.shuffleboard.properties.AsyncProperty.lambda$set$2(AsyncProperty.java:54)
        at edu.wpi.first.shuffleboard.util.FxUtils.runOnFxThread(FxUtils.java:45)
        at edu.wpi.first.shuffleboard.util.AsyncUtils.runAsync(AsyncUtils.java:24)
        at edu.wpi.first.shuffleboard.properties.AsyncProperty.set(AsyncProperty.java:54)
        at javafx.beans.property.ObjectProperty.setValue(ObjectProperty.java:69)
        at edu.wpi.first.shuffleboard.sources.DataSource.setData(DataSource.java:59)
        at edu.wpi.first.shuffleboard.sources.CompositeNetworkTableSource.lambda$new$0(CompositeNetworkTableSource.java:48)
        at edu.wpi.first.shuffleboard.sources.NetworkTableSource.lambda$null$0(NetworkTableSource.java:46)
        at edu.wpi.first.shuffleboard.util.FxUtils.lambda$runOnFxThread$0(FxUtils.java:49)
        at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

Steps to reproduce:

  1. Add a number to shuffleboard
  2. Change the key of that value

Should publish standalone API jar

A tentative list of the classes that should be moved into an api project:

Package Class
components LinearIndicator
NumberField
Scrubber
data Everything in this package
data.types Everything in this package
properties AsyncProperty
sources DataSource
AbstractDataSource
SourceType (should also be split into an interface and util class)
IncompatibleSourceException
widget Widget
AbstractWidget
AnnotatedWidget
SingleTypeWidget
ComplexAnnotatedWidget
@Description
@ParamtrizedController

Other thoughts:

  • Should this be a fatjar or standalone? A fat jar would give users access to guava etc. but would increase the jar size
  • Need to look into how plugins would interact with an API jar and determine any extra classes that should get moved over. Particularly custom JavaFX components.

@JLLeitschuh can you work on splitting the project into an api project and an app project?

Should have support for custom plugins

Plugins would have:

  • A name
  • A list of custom widgets
  • A list of custom source types
  • A list of custom data types

The name must always be set, but plugins can choose to define any or all of the custom lists.

We'll need to change SourceType away from an enum to an interface + util class, like DataType/DataTypes. Should probably also change SourceType to do data recording and playback, so we don't have to add custom code for each source type in the recording/playback classes.

We'd need to add UI stuff to load plugin jars or classes, as well as a simple dialog to show the currently loaded plugins.

Providing the plugin API would let us move classes into their own jars. All the stock widgets can be bundled into a StockWidget plugin, network table sources can be in a NetworkTable Source plugin, etc. Ideally the stock data types would also go into a plugin, but that would mean plugins would either need to be compiled with that jar to let the @Description annotation to function, forcing us to load that jar first to make sure the data type classes are loaded; or remove the @Description annotation entirely.

Because of this, I think we should keep the stock data types in the api jar (#101) to make sure all plugins can use all the data types provided by WPILib, but still split the stock widgets and data sources into plugins.

There are a few pain points like the network table tree widget that we use to display data in network tables and add widgets from. We may want to let source types provide a JavaFX node that we stick in a tab in the sources view.

Multi-select

not really a near term thing, but you should be able to click and drag to select groups of widgets, and then move them (or delete them)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.