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

DYN-3844 Open Dynamo Template as new workspace #14871

Merged
merged 15 commits into from
Jan 27, 2024
Merged

DYN-3844 Open Dynamo Template as new workspace #14871

merged 15 commits into from
Jan 27, 2024

Conversation

QilongTang
Copy link
Contributor

@QilongTang QilongTang commented Jan 22, 2024

Purpose

Introduce open by template function in Dynamo.

ToDo:

  • Opening a template then save should not save to template path (This may require another PR to add a new property to current workspace)
  • Trying to save to template path should be blocked with message dialog
  • Short cut key combo Ctrl + T does not work yet
  • Display templates section at startup page similar to samples

image

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
  • This PR contains no files larger than 50 MB

Release Notes

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

Reviewers

@DynamoDS/dynamo

FYIs

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

@QilongTang QilongTang added the WIP label Jan 22, 2024
@QilongTang QilongTang added this to the 3.1 milestone Jan 22, 2024
Copy link

github-actions bot commented Jan 22, 2024

UI Smoke Tests

Test: success. 2 passed, 0 failed.
TestComplete Test Result
Workflow Run: UI Smoke Tests
Check: UI Smoke Tests - net8.0

@QilongTang QilongTang changed the title [WIP] Open Template UI Open Dynamo Template as new workspace Jan 26, 2024
@QilongTang QilongTang removed the WIP label Jan 26, 2024
Copy link
Contributor

@RobertGlobant20 RobertGlobant20 left a comment

Choose a reason for hiding this comment

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

LGTM with some comments

src/DynamoCore/Models/DynamoModel.cs Show resolved Hide resolved
src/DynamoCore/Models/DynamoModel.cs Outdated Show resolved Hide resolved
src/DynamoCore/Models/DynamoModel.cs Outdated Show resolved Hide resolved
test/DynamoCoreWpfTests/PreferencesViewModelTests.cs Outdated Show resolved Hide resolved
/// Present the open dialog and open the template that is selected.
/// </summary>
/// <param name="parameter"></param>
private void ShowOpenTemplateDialog(object parameter)
Copy link
Contributor

Choose a reason for hiding this comment

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

Any way we can combine this with ShowOpenDialogAndOpenResult ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah I thought about this but we need to call Open function below with different tuple and use TemplatesDirectory as start directory, currently there is nothing we can use to differentiate two workflows other than use different command for each menu item. I can try think about this more

<MenuItem Header="{x:Static p:Resources.DynamoViewFileMenuOpenTemplate}"
Name="openTemplateMenuItem"
Command="{Binding ShowOpenTemplateDialogCommand}"
CommandParameter="Template"
Copy link
Contributor Author

@QilongTang QilongTang Jan 26, 2024

Choose a reason for hiding this comment

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

@zeusongit I decided to use command param so we can distinguish if Dynamo is opening a template so we can reuse more file open code. We cant really use the same command because I think command and shortcut keys are 1:1 relationship and Open Template need its own shortcut keys.

@QilongTang
Copy link
Contributor Author

Merging this PR in to create the base of template function.

@QilongTang QilongTang merged commit ffbc181 into master Jan 27, 2024
22 checks passed
@QilongTang QilongTang deleted the OpenTemplate branch January 27, 2024 13:58
@QilongTang QilongTang changed the title Open Dynamo Template as new workspace DYN-3844 Open Dynamo Template as new workspace Jan 29, 2024
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.

3 participants