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

Osulacam minimize steps #659

Merged

Conversation

AustinShalit
Copy link
Member

@AustinShalit AustinShalit commented Aug 9, 2016

closes #327
closes #639

Fix-up of #639

@AustinShalit AustinShalit added this to the v1.5.0 milestone Aug 9, 2016
@AustinShalit AustinShalit changed the title Osulacam minimize steps (#639) Osulacam minimize steps Aug 9, 2016
@@ -82,9 +103,21 @@ private void initialize() {
new Image(InputStream.class.cast(icon))));
buttons.getChildren().add(0, exceptionWitnessResponderButtonFactory.create(step, "Step Error"));

if (step.getInputSockets().stream()
.allMatch(inputSocket -> inputSocket.getSocketHint().getView()
.equals(SocketHint.View.NONE))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this logic holds true. Does it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is saying if there is no user interaction in this step do not show the arrow

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example:
Desaturate does not allow for user interaction - no arrow is shown. Filter Contours does -- the arrow is shown.
untitled

@codecov-io
Copy link

codecov-io commented Aug 9, 2016

Current coverage is 58.03% (diff: 85.93%)

Merging #659 into master will increase coverage by 0.39%

@@             master       #659   diff @@
==========================================
  Files           195        196     +1   
  Lines          6101       6165    +64   
  Methods           0          0          
  Messages          0          0          
  Branches        554        561     +7   
==========================================
+ Hits           3517       3578    +61   
- Misses         2420       2424     +4   
+ Partials        164        163     -1   

Sunburst

Powered by Codecov. Last update 1e5fcd4...59f59f8

@AustinShalit
Copy link
Member Author

I added the ability to double click the arrow. On a double click it will toggle all steps.

@AustinShalit AustinShalit force-pushed the osulacam-MinimizeSteps branch from c8857b6 to eb1b013 Compare August 9, 2016 22:20
@@ -0,0 +1,14 @@
package edu.wpi.grip.ui.events;

public class SetStepsExpandedEvent {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation

@Inject
StepController(Pipeline pipeline,
InputSocketControllerFactory inputSocketControllerFactory,
OutputSocketController.Factory outputSocketControllerFactory,
ExceptionWitnessResponderButton.Factory exceptionWitnessResponderButtonFactory,
StepDragService stepDragService,
@Assisted EventBus eventBus,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this assisted? This doesn't need to be assisted.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaghetti code

@AustinShalit AustinShalit force-pushed the osulacam-MinimizeSteps branch 2 times, most recently from b1cad27 to a93b0fb Compare August 10, 2016 01:09
@Subscribe
public void setExpanded(SetStepsExpandedEvent event) {
expanded.set(event.isExpanded());
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange way that this is written. But sure.
Maybe document that a double click will expand all.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you think it is strange?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would you write it?

@AustinShalit AustinShalit force-pushed the osulacam-MinimizeSteps branch from a93b0fb to 5b1e389 Compare August 10, 2016 16:36
@JLLeitschuh
Copy link
Member

JLLeitschuh commented Aug 11, 2016

@AustinShalit AustinShalit merged commit bbea07c into WPIRoboticsProjects:master Aug 11, 2016
@AustinShalit AustinShalit deleted the osulacam-MinimizeSteps branch August 11, 2016 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Another Useful option "Minimize Operation"
5 participants