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

Footer #12774

Merged
merged 23 commits into from
Apr 21, 2022
Merged

Footer #12774

merged 23 commits into from
Apr 21, 2022

Conversation

dnenov
Copy link
Collaborator

@dnenov dnenov commented Apr 4, 2022

Purpose

This PR contains changes and additions to the footer of the Dynamo View and in relation to the Dynamo Graph Node Manager task.

  • Notification Message has been restyled as per the design intent
  • New visual elements (icons) added to display the number of active Errors/Warnings/Info nodes after a Run

hover state

footer notifications - run message persistent

footer notifications - footer icons

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

Release Notes

Visual fix to UI feature + new UI feature around footer Notifications Control in Dynamo View.

Reviewers

@reddyashish

FYIs

@mjkkirschner
@Amoursol

dnenov added 5 commits April 1, 2022 18:55
- added 2 new resources related to run completing with error
- the HomeWorkspaceViewModel now captures the case when the run has finished with error
- aligned the visual style of the footer notification text element to the design intent
- changed border colors to match current design style
- fixed animation (it wasn't working at all before) of the element, but question remains if that's the desired behaviour?
Major
- added a new ItemsControl icon element to the footer displaying the number of errors, warnings and info states (not implemented yet) on Run
- added a new ObservableCollection to the HomeWorkspaceViewModel to bind to
- added a new FooterNotificationItem class to contain the properties of the new element
Minor
- a new visual brush style added
- HomeSpaceViewModel property of the DynamoViewModel changed to cast to HomeWorkspaceViewModel (from WorkspaceViewModel) to rectify some of the resolve issues in the NotificationsControl view
- remove the text label from the footer notification item when 0 of the notification type (errors, warnings, info) are found
- added a new DynamoViewTests class for Dynamo UI tests
- added a test to check for
   -- notification text when Running as script with an Error, Warning and no state
   -- the correct states of the Footer Notification Items
- added names to some of the elements of the NotificationsControl for ease of targetting
footerItems.Add( new FooterNotificationItem() { NotificationCount = Model.Nodes.Count(n => n.State == ElementState.Error), NotificationImage = "/DynamoCoreWpf;component/UI/Images/error.png" });
footerItems.Add( new FooterNotificationItem() { NotificationCount = Model.Nodes.Count(n => n.State == ElementState.Warning || n.State == ElementState.PersistentWarning), NotificationImage = "/DynamoCoreWpf;component/UI/Images/warning_16px.png" });

FooterNotificationItems = new ObservableCollection<FooterNotificationItem>( footerItems );
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 is a good pattern, all the old changed events will be no longer be valid, I think it's better to reuse the same collection.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Really appreciate the comment, @mjkkirschner! I made a tweak to the code and hopefully addressed your concern. Let me know if that's still iffy and I will follow up to the best of my abilities!

@Amoursol
Copy link
Contributor

Amoursol commented Apr 5, 2022

@dnenov looking pretty awesome! A couple of comments:

  1. Can we either have a persistent message box with a default (i.e. "Graph ready to run") or have the error/warning/info counters move next to the run button? They are floating out right now with no message box. Thoughts @Jingyi-Wen?
  2. Can we please use the grey icons when the counter is set to zero? Thoughts @Jingyi-Wen?

@Jingyi-Wen
Copy link

@dnenov looking pretty awesome! A couple of comments:

  1. Can we either have a persistent message box with a default (i.e. "Graph ready to run") or have the error/warning/info counters move next to the run button? They are floating out right now with no message box. Thoughts @Jingyi-Wen?
  2. Can we please use the grey icons when the counter is set to zero? Thoughts @Jingyi-Wen?
  1. Yeah I think having a persistent box with a default makes more sense
  2. I think we don't need to show the warning and error box if there isn't any - to make it cleaner and less scary

@Amoursol
Copy link
Contributor

Amoursol commented Apr 5, 2022

@dnenov looking pretty awesome! A couple of comments:

  1. Can we either have a persistent message box with a default (i.e. "Graph ready to run") or have the error/warning/info counters move next to the run button? They are floating out right now with no message box. Thoughts @Jingyi-Wen?
  2. Can we please use the grey icons when the counter is set to zero? Thoughts @Jingyi-Wen?
  1. Yeah I think having a persistent box with a default makes more sense
  2. I think we don't need to show the warning and error box if there isn't any - to make it cleaner and less scary

In addition, the point of the persistent box was to stop the "Bouncing" of the boxes around - so IMHO we should still keep the warning boxes but put them as grey, so that users know that they "Can be counted". Grey isn't scary, and we can have a state-based hover message if needed to bring clarity.

@Jingyi-Wen
Copy link

@dnenov looking pretty awesome! A couple of comments:

  1. Can we either have a persistent message box with a default (i.e. "Graph ready to run") or have the error/warning/info counters move next to the run button? They are floating out right now with no message box. Thoughts @Jingyi-Wen?
  2. Can we please use the grey icons when the counter is set to zero? Thoughts @Jingyi-Wen?
  1. Yeah I think having a persistent box with a default makes more sense
  2. I think we don't need to show the warning and error box if there isn't any - to make it cleaner and less scary

In addition, the point of the persistent box was to stop the "Bouncing" of the boxes around - so IMHO we should still keep the warning boxes but put them as grey, so that users know that they "Can be counted". Grey isn't scary, and we can have a state-based hover message if needed to bring clarity.

That makes sense! We can grey them out and shows "No warning/error" when hovering

dnenov added 9 commits April 5, 2022 20:02
- change to the way the FooterNotificationItems ObservableCollection is initialized and updated introducing reusability
- correctly implemented the NotificationObject on the level of the properties of the FooterNotificationItem class to allow the update of the binding
- added the ability to grey-out notification images if counter value is 0 meaning that after the run has completed there are no Error/Warning/Info nodes respectively
- removed legacy animation to the message box
- added a WIP default text to the message box
- minor visual adjustments
- added tooltips to the notification items
- constraint to the Run Message Box by giving it a minimal width. The minimal width should accomodate the longest typical messages while retaining the ability of the control to expand on longer messages (different languages)
- added a Resource Property value for a pre-run state called "RunRead"
- swap the places of the message box and the footer icons. This should prevent the icons from "jumping" as the text length changes between runs
- revert HomeWorkspaceViewModel to WorkspaceViewModel because of return type issue
- recreated a property inside the OutPortViewModel that was deleted by accident
@QilongTang QilongTang added this to the 2.15.0 milestone Apr 11, 2022
dnenov added 2 commits April 11, 2022 17:58
- implemented the info state
- implemented mouse interaction with notification elements to zoom around the respective nodes
- allows the user to cycle through the affected nodes zooming on each individual one at a time
- finalized design intent for location and behavior of the notification elements
@reddyashish
Copy link
Contributor

reddyashish commented Apr 13, 2022

Looks good to me. You have some conflicts on this PR.

dnenov added 5 commits April 13, 2022 14:45
- revert HomeWorkspaceViewModel return type
- implemented user interactivity by introducing a hover state to the element
- closed tags in Resources and resources.en-US
@reddyashish
Copy link
Contributor

Please check for the failing tests on self-serve and we can merge this after we fix it.

- updated the number of footernotification items to 3 from 2 after the addition of the Info state
Copy link
Contributor

@reddyashish reddyashish left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@reddyashish reddyashish merged commit 3e71329 into DynamoDS:master Apr 21, 2022
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.

7 participants