Dynamo icon indicating copy to clipboard operation
Dynamo copied to clipboard

Minimally invasive notification counter

Open pinzart90 opened this issue 3 years ago • 5 comments

Purpose

Generates log of all notifications generated in Dynamo specifically:

  1. WPF binding PropertyChanged events
  2. Model NotificationObject's PropertyChanged events
  3. ObservableCollection CollectionChanged events

A notification counter that generates/updates a notifications.log file in Dynamo's executing assembly folder (every 5 seconds - if any notifications exist). The log file can be deleted at any time (even while Dynamo is running) Notification logs will always try to be merged/added back to existing logs in the notifications.log folder. Deleting the notifications.log basically allow you to do a fresh count of notifications (should wait 5 seconds after deleting to make sure no cached notifications are added)

Debug builds will have a new dll in the bin folder - 0Harmony.dll Release builds will not have the new dll.

Instructions to use: Debug builds :

  • Create/update the debug.config file (in Dynamo's executing assembly folder) to include the NotificationCounter debug mode.
  • After Dynamo starts, the debug mode can be switched off.

Release builds :

  • Copy the 0Harmony.dll from nuget in Dynamo's executing assembly folder
  • Create/update the debug.config file (in Dynamo's executing assembly folder) to include the NotificationCounter debug mode.

Example debug.config

<?xml version="1.0" encoding="utf-8"?>
<DebugModes>
    <DebugMode name="NotificationCounter" enabled="true"/>
</DebugModes>

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

(FILL ME IN) Brief description of the fix / enhancement. Mandatory section

Reviewers

(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)

(FILL ME IN, optional) Any additional notes to reviewers or testers.

FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

pinzart90 avatar Jun 09 '22 15:06 pinzart90

Our team is also touching the notifications display. Is this meant to change how the current Notifications view extension works?

QilongTang avatar Jun 30 '22 16:06 QilongTang

@QilongTang I'm pretty sure "Notifications" here refers to property changes /binding updates in WPF.

mjkkirschner avatar Aug 16 '22 16:08 mjkkirschner

@pinzart90 do you think we could call this something like binding events or something like that instead of notifications to disambiguate this from the user notifications work?

mjkkirschner avatar Sep 12 '22 18:09 mjkkirschner

@pinzart90 it also appears that the test job for this PR has failed a few times in a row while running the tests, log is not telling me much but have not deep dived, it seems to be running on dyn_perf_002 - maybe take a look on that machine.

mjkkirschner avatar Sep 13 '22 20:09 mjkkirschner