Skip to content

Conversation

@zeusongit
Copy link
Contributor

@zeusongit zeusongit commented Feb 6, 2023

Purpose

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.

FYIs

@mjkkirschner

filipeotero and others added 6 commits February 6, 2023 12:42
* standardizing information icons in the preference settings
* Defending code

* refining code
…Fix top menu pixel difference (DynamoDS#13702)

* Adjust border to fix 1 pixel anomaly

* remove unused login grid

* add logic to toggle preview for group

* add analytics

* Preview > Preview Geometry

* ensure that signout option no seen when user sign out
* DYN-4964-WorkingRange-Popup

I've added a new button in the Workspace that when is clicked will show a popup containing the working ranges and the one currently selected.
This new button will show a different image when the mouse is hover and when is clicked, also I've added a tooltip.
For implementing this functionality I've added a new Popup (GeometryScalingPopup.xaml) and it's corresponding ViewModel. Finally I've added a converter that will receive as a parameter the current Working Range and will return a Brush with a specific color so the checkmark will be visible or not.

* DYN-4964-WorkingRange-Popup CodeReview1

Added functionality for the new DefaultGeometryScaling property that will be serialized in the DynamoSettings.xml.
Also I've disconnected the functionality of selecting the Geometry Scale for the current Workspace in the Preferences panel, now will be selected from the Dynamo workspace and will be serialized in the dyn file (as currently is happening).

* DYN-4964-WorkingRange-Popup CodeReview1

Updated the string shown in Preferences panel (Geometry Scaling section) and the tooltip showed when the mouse is over the new Workspace button.

* Build Fix

When merging master to my branch there were some changed that I didn't noticed in the PR so I'm reverting back those changes.

* DYN-4964-WorkingRange-Popup CodeReview 2

Fixed several comments also several methods were removed (like RadioGeometryScaling_Checked method) or moved
The property GeoScalingViewModel was moved from DynamoViewModel to WorkspaceViewModel..
The property CurrentGeometryScaling was deleted due that was duplicating a functionality.

* DYN-4964-WorkingRange-Popup CodeReview 2

When changing the Workspace Geometry Scaling it was not running the graph so I did some changes so it will be running the graph every time is updated.

* DYN-4964-WorkingRange-Popup CodeReview 2

Add functionality for when a custom node is created the Workspace Scale Factor is set.
Updating and removing some comments and also I started to add the unit test.

* DYN-4964-WorkingRange-Popup CodeReview2

Updating Unit Test

* DYN-4964-WorkingRange-Popup Fixing Tests

I did the next fixes:
The test TestImportCopySettings() was failing due that was reading the DynamoSettings-NewSettings.xml and comparing against the properties in PreferencesSetting so the DefaultScaleFactor was missing in the DynamoSettings-NewSettings.xml file.

The test PreferencesGeoScaling_RunGraph_Automatic due that was opening the Preferences panel and changing the Geometry Scaling value for the workspace but now that this value was moved to the Workspace in a Popup then the code needed some changes so we can change the Geometry Scaling value using the Popup.
* DYN-4964-PopupGeoScaling-Bugs

Fixing the next bugs reported by Aabi:
- The Popup was not closing when clicking in the Dynamo workspace (adding a similar fix like the Workspace ContextMenu).
- Adding a shadow over the new Geometry Scaling popup icon.

* DYN-4964-WorkingRange-Popup Bug fixes

There was a missing case that when the user click a Dynamo menu the Popup was not closing then I added some extra code to close it.

* DYN-4964-WorkingRange-Popup Bug Code Review1

Removing extra trailing spaces.
* restrict user login for pkg search

* check login state
Copy link
Member

@mjkkirschner mjkkirschner left a comment

Choose a reason for hiding this comment

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

@zeusongit @avidit @Amoursol @RobertGlobant20 -
there is at least 1 API break in this PR which cannot be merged to 2.17.1.

In addition IMO that the preferences change / geometry scaling factor button new feature work can be omitted from this hotfix. It's a new feature, which does not appear to block any workflows - users can simply use the existing preferences - the code also looks a bit funny to me, though I have not tested it.

Abi also said there are some portions that need some additional work so my suggeston @zeusongit is to remove all cherry picks related to it - this will also fix the API break.

* Markdown procedural image location

- fixed hard-coded image location
- now identifies image location

* Fixed Failing Tests

- caught a bug causing issues when no image is present
Copy link
Member

@mjkkirschner mjkkirschner left a comment

Choose a reason for hiding this comment

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

It looks okay, the test is a flaky one I think, but I don't understand the code with toggling group and creating two delegate commands.

@zeusongit
Copy link
Contributor Author

@mjkkirschner Fixed the delegate command, why do you think the test is flaky though?

@mjkkirschner
Copy link
Member

it passes in some of your commits and fails in others - these UI tests seem to have been flaky for the past few months.

@zeusongit
Copy link
Contributor Author

it passes in some of your commits and fails in others - these UI tests seem to have been flaky for the past few months.

Oh..got it

@zeusongit zeusongit merged commit dc8d57d into DynamoDS:RC2.17.1_master Feb 7, 2023
QilongTang pushed a commit that referenced this pull request Feb 13, 2023
* DYN-4964-Popup-GeometryScaling Fixes

Based in the changes suggested in the next pull request: #13727 I did the next changes:
- Remove the property DefaultScaleFactor from IPreferences.
- Add braces in some places.
- Modify the SetDefaultScaleFactor method for passing one parameter.
- Modify the ScaleRange property to use named tuples.
- Add comments to public properties.

* DYN-4964-Popup-GeometryScaling Bug

Fixing bug reported by Aabi about that the button is showing blank when is pressed, then I added the image to be shown when the button is pressed.
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