-
Notifications
You must be signed in to change notification settings - Fork 636
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
Dynamo new homepage implementation #14879
Conversation
- initial structure to create a homePage user control replacing the current home page - currently loads graphs to the web app ui
- incorporated the new home page web app
- now the front end will prompt the loading moment using useEffects rather than relying on the component being loaded after the webView2 was done loading
- implemented guided tours to the landing page
- implemented samples backend implementation - reuses existing viewmodel logic
- added ShowSampleFilesInFolder existing in the current Home Page experience
- added bundle.js and index.html to source control for testing purposes and while implementation takes place
- remove WIP bundle.js to try to resolve building for upstream
UI Smoke TestsTest: success. 2 passed, 0 failed. |
- net6 build error fix
Yes, absolutely! I am happy to rework the code as needed to make use of the wrapper you are working on. As for the async methods, I was following the existing code base we have, I thought it's a requirement. Let's have a chat and go over what needs to be improved! |
- added localization description to user guides - trimming the '_' from the start of the guides names (happens on the back end)
- internal mock-up on testing graph image data
- the sidebar in Dynamo is resizable, so there is no 'default' value - we are setting the initial width based on the current value - will not update live, but will update on the next run (when initializing the StartPage from DynamoView)
- added Template call - removed sidebar width sync between backend and front end - added the ability to grip-resize sidebar in frontend NOT PERSISTED
- publish for review
- added test coverage on all interaction logic between the back and the front end
- now builds from the latest npm package - webView2 swapped to DynamoWebView2 class
- the new build was interfering with SplashScreen build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with comments
- dynamically adding locale to front end - extracted repeated webView2 to DynamoUtilities helper methods (inside the PathHelper) - fixed dynamically loading of the Artifakt font resource - added new public functions to the respective API text files - removed unneeded stopwatch in StartPage.xaml.cs
- added tests for the new public helper methods - added null checks handling
- now correctly checks if the recent file is of valid json input - it assumes that any other format but json is an old dynamo 1.0 format (not checking if xml or anything else)
- swap dynamo 1.0 message in favor of 1.x
try | ||
{ | ||
var jsonString = File.ReadAllText(filePath); | ||
return JsonConvert.DeserializeObject<Dictionary<string, object>>(jsonString); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use DynamoUtilities.PathHelper.isValidJson(filePath, out fileContents, out ex)
{ | ||
File.Delete(fontFilePath); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does not look like a full implementation of the Dispose pattern. We're not suppressing the finalizer and we're not cleaning up the webview2 control.
Any reason for it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dnenov ?
Purpose
This PR contains the rework of the Dynamo Home Page. The design has been updated in various ways and most importantly, the front-end now utilizes JavaScript/React rather than WPF.
The react DynamoHomePage webapp can be found here (to be replaced when the resource is moved over to Autodesk repository).
Installation
Builds from the latest npm package when Dynamo is built.
Currently, the frontend webapp is contained and deployed with the following 2 files:- bundle.js- index.htmlThe compiled code insidebundle.js
is injected during runtime replacing themainJs
script inindex.html
.TODO: The [project]((https://github.com/dnenov/DynamoHomePage/) should eventually be moved and served as an npm packge during Dynamo build.Note
There is a 2Mb limitation to the amount of data that can be sent in one go through webView2. The compiled bundle.js should not exceed this limit! (currently it is around 500Kb).
Update
npm run build
((https://github.com/dnenov/DynamoHomePage/)bundle.js
file in\Packages\HomePage\build
folder inside DynamoCoreWPF.UseNewDynamoHomePage
flag located inside theDynamoView.xaml.cs
is turned to 'true'.UI Updates
Recent module
Samples module
Learning module
Existing UI (for comparison and reference)
Declarations
Check these if you believe they are true
*.resx
filesRelease Notes
This is the initial full release of the new Dynamo Home Page. It contains all required information to build the new version of the landing page. It adds a new
Test
class where all user interactions are tested starting from front to back end.Reviewers
@Amoursol
@QilongTang
FYIs
@reddyashish