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

Visual indication of function state #12758

Merged

Conversation

filipeotero
Copy link
Contributor

@filipeotero filipeotero commented Mar 31, 2022

Please Note:

  1. Before submitting the PR, please review How to Contribute to Dynamo
  2. Dynamo Team will meet 1x a month to review PRs found on Github (Issues will be handled separately)
  3. PRs will be reviewed from oldest to newest
  4. If a reviewed PR requires changes by the owner, the owner of the PR has 30 days to respond. If the PR has seen no activity by the next session, it will be either closed by the team or depending on its utility will be taken over by someone on the team
  5. PRs should use either Dynamo's default PR template or one of these other template options in order to be considered for review.
  6. PRs that do not have one of the Dynamo PR templates completely filled out with all declarations satisfied will not be reviewed by the Dynamo team.
  7. PRs made to the DynamoRevit repo will need to be cherry-picked into all the DynamoRevit Release branches that Dynamo supports. Contributors will be responsible for cherry-picking their reviewed commits to the other branches after a LGTM label is added to the PR.

Purpose

This PR implements visual improvements at node ports to indicate if a Function Node is in an active/inactive state.
A new rectangle was added in the output port to represent the active/inactive state.
Considering that Function State is represented by the boolean IsPartiallyApplied, here are how some states are working in the implementation of this PR.

State 1 - Function state but not passing a function (Output port is not connected to another node)

State1

State 2 - Function passing (Output port is connected to another node and passing a function)

State2

State 3 - All input ports are connected, so are not considered at function state anymore (Standard connected input colors)

State3

State4

State 4 - The input ports have default values, so it's not considered at function state (Standard connected input colors)

State5

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated

Reviewers

@QilongTang @mjkkirschner

FYIs

@jesusalvino @RobertGlobant20

@Amoursol
Copy link
Contributor

@filipeotero - A couple of things:

  1. In "State 3" there shouldn't be the grey vertical bar at all (Should only show when a function is present) - Thoughts @Jingyi-Wen ?
  2. In "State 4" I don't think we need the blue bar here.... but I kind of like it 😁 Concern would be around visual clutter. Thoughts @Jingyi-Wen ?

VerticalAlignment="Center"
Fill="{Binding PortValueMarkerColor, UpdateSourceTrigger=PropertyChanged}"
IsHitTestVisible="False"
SnapsToDevicePixels="True" />
Copy link
Contributor

Choose a reason for hiding this comment

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

What are these for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This represents the output bar
State5_OutPutBar

Copy link
Contributor

Choose a reason for hiding this comment

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

Then maybe update the comment to reflect that, I got confused because it says on the left of the port

Copy link
Contributor

Choose a reason for hiding this comment

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

Once the comment updated here, LGTM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment updated. Thanks!

@Jingyi-Wen
Copy link

@filipeotero - A couple of things:

  1. In "State 3" there shouldn't be the grey vertical bar at all (Should only show when a function is present) - Thoughts @Jingyi-Wen ?
  2. In "State 4" I don't think we need the blue bar here.... but I kind of like it 😁 Concern would be around visual clutter. Thoughts @Jingyi-Wen ?
  1. For 3 - yes, the grey bar should be removed
  2. For 4 - I think the blue bar would be necessary - could make the input bars less obvious.

@filipeotero
Copy link
Contributor Author

@Amoursol @Jingyi-Wen
Something like this?
RemoveEmptyBar

@Jingyi-Wen
Copy link

@Amoursol @Jingyi-Wen Something like this? RemoveEmptyBar

Looks great to me!

Set the colors in xaml file;
Minor fixes;
@Amoursol
Copy link
Contributor

Amoursol commented Apr 1, 2022

@Amoursol @Jingyi-Wen Something like this? RemoveEmptyBar

Looks awesome @filipeotero!

@QilongTang QilongTang added this to the 2.14.0 milestone Apr 4, 2022
@QilongTang QilongTang merged commit f0fc14e into DynamoDS:master Apr 4, 2022
@filipeotero filipeotero mentioned this pull request Apr 5, 2022
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants