Skip to content

Conversation

@RobertGlobant20
Copy link
Contributor

Purpose

I added several controls in the General Tab of the Preferences window, I had to add some new styles in the DynamoModern.xaml for the ComboBoxes and the RadioButtons because they are using very specific backgrounds and font colors.
Also I added 3 entries in resources so the ComboBoxes can be populated.

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

FYIs

@Astul-Betizagasti

I added a new workflow (issue_type_predicte.yaml) that is using the ML.NET model for predicting the issue type (source repo), so If a new issue is created in the Dynamo repo this workflow will run and will predict if is a Wishlist issue or not. If is a Wishlist issue it will be labeled as "Wishlist" and then another workflow will move the issue to the DynamoWishlist repo. If the issue is incomplete or is not valid the label "NotMLEvaluated" will be added to the issue.

Also I added two scripts more, one will return the issue body in a json string and the other one will clan the issue body removing sections not used like "Dynamo Version" or "Stack Trace"
When testing the issue predicter workflow the issues labeled as Wishlist were not moved to the DynamoWishlist repo due that the "Move Issue by labels" workflow failed. There was a problem with the PAT used to label the issue, I was using the wrong one (no triggers actions).
I added several controls in the General Tab of the Preferences window, i had to add some new styles in the DynamoModern.xaml for the ComboBoxes and the RadioButtons because they are using very specific backgrounds and font colors.
Also I added 3 entries in resources so the ComboBoxes can be populated.
@RobertGlobant20
Copy link
Contributor Author

Here is a gif of how the Preferences -> General tab looks like
preferences_general_tab

<data name="PreferencesViewVisualSettingsTab" xml:space="preserve">
<value>Visual Settings</value>
</data>
<data name="PreferencesWindowFontSizes" xml:space="preserve">
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these strings are already defined so we should be able to reuse the existing ones, we can rename those resources strings if needed. e.g. ScalingMediumButton ScalingLargeButton to sth else

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@QilongTang I removed the duplicated strings in the next commit:
89b81d7

<value>English,Czech,German,Spanish,French,Italian,Japanese,Korean,Polish,Portuguese,Brazilian,Russian,Chinese Simplified,Chinese Traditional</value>
</data>
<data name="PreferencesWindowNumberFormats" xml:space="preserve">
<value>0,0.0,0.00,0.000,0.0000</value>
Copy link
Contributor

Choose a reason for hiding this comment

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

Same problem here, these become duplicates to DynamoViewSettingMenuNumber00000 DynamoViewSettingMenuNumber0000 etc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@QilongTang I removed the duplicated strings in the next commit:
89b81d7

SelectedNumberFormat = numberFormats.Split(',').First();

//By Default the Default Run Settings radio button will be in Manual
RunSettingsIsChecked = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

These are fine for now, we may need to consider ahead what needs to happen when user click Save, by looking at the design, all the changes take effect after clicking on Save which lead to some overhead..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@QilongTang
I can see that all the setting are saved in a file named DynamoSettings.xml, located in the AppData folder, then I think that when we implement the functionality for the "Save Changes" button, we will need to set all the default options first and then load the options located in the xml file.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, the preference setting should already be deserialized when launching Dynamo at this point. We will need to keep it in sync with the setting here when we implement the actual functionalities. Thanks for the brain storming.

Based on Aaron comments:
- I removed the PreferencesWindowFontSizes and PreferencesWindowNumberFormats entries from the Resources files due that they already exists in the resources.
- Renamed some private properties.
- Change the Width value for the Number Format combox and remove the Height value. in the PreferencesView.xaml
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
Copy link
Contributor

Choose a reason for hiding this comment

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

Comments? Thanks!

Copy link
Contributor Author

@RobertGlobant20 RobertGlobant20 Mar 18, 2021

Choose a reason for hiding this comment

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

@QilongTang
Added extra comments in commit: 9035f3d

</Grid.RowDefinitions>
<Grid Grid.Row="0">
<StackPanel Orientation="Vertical">
<Label Content="Language"
Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer no hard coded resource string in XML because they will be missing localization. Can you look for if we already have similar res string for you to use?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@QilongTang
I searched in the resources files but we don't have a similar entry, then I added a new resource entry, see the changes in the commit:
9035f3d

<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Grid.Row="0"
Content="Default Run Settings"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@QilongTang
I searched in the resources files but we don't have a similar entry, then I added a new resource entry, see the changes in the commit: 9035f3d

MinWidth="80"
Style="{StaticResource RunSettingsRadioButtons}"
IsChecked="{Binding Path=RunSettingsIsChecked}"
Content="Manual"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@QilongTang
I found a similar entry in resource files, then I reused the existing one. see the changes in the commit: 9035f3d

<RadioButton Grid.Column="1"
MinWidth="80"
Style="{StaticResource RunSettingsRadioButtons}"
Content="Automatic"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@QilongTang
I found a similar entry in resource files, then I reused the existing one. see the changes in the commit: 9035f3d

</Grid.RowDefinitions>
<Label Name="FontSize"
Grid.Row="0"
Content="Node Font Size"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@QilongTang
I searched in the resources files but we don't have a similar entry, then I added a new resource entry, see the changes in the commit: 9035f3d

IsChecked="{Binding Path=RunPreviewIsChecked}"
Style="{StaticResource EllipseToggleButton1}"/>
<Label Grid.Column="1"
Content="Show Run Preview"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@QilongTang
I found a similar entry in resource files, then I reused the existing one. see the changes in the commit: 9035f3d

<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Grid.Row="0"
Content="Number Format"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@QilongTang
I found a similar entry in resource files, then I reused the existing one. see the changes in the commit: 9035f3d

@QilongTang
Copy link
Contributor

Some more comments then LGTM

I removed hard-coded strings in the PreferencesView.xmal and were added to StaticResources in the resx file.
Also I added extra comments in the PreferencesView.xaml
@QilongTang QilongTang merged commit 179faf6 into DynamoDS:master Mar 23, 2021
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.

2 participants