-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Hello C# - Migrating the codebase from C++/CX to C# (Phase 1) #1598
Conversation
* change CalcViewModel into a WindowsRuntimeComponent project (#5) * change CalcViewModel into a WindowsRuntimeComponent project * remove the old UI codebase (#6) * initially migrated C# codebase by tian (#7) * initial migrated C# codebase by tian * format the codebase * resolve comments * undo: modifications on UI test project * Remove the blocks that have more than 1 empty line. * Register DP using keyword 'nameof' * C# Migration: Initially migrated C# codebase by Han (#8) * C# Migration: Initially migrated C# codebase by Han * Resolved comments and misssing asset * Added three files to Calculator project * Added TODO comment and updated Object * NavCategory: temporary resolution of the hang issue (#9) * Updated CalcViewModel and missing files (#10) * Updated CalcViewModel and WinMeta * Added Calculator.rc * Resolved comment for InitializeLocalizationSettings * add: views/unitconverter.xaml (#11) * add: views/unitconverter.xaml * format the code * remove the extra empty line * add an empty line * check null before invoking event handlers (#12) * fix problems of the migration of OBSERVABLE_PROPERTY_RW (#13) * fixes crash in MathRichEditBox.ctor() (#14) * fixes crash in MathRichEditBox.ctor() * typo * Update azure-pipelines.ci.yaml for Azure Pipelines * Added a link copy of CalcViewModel to temporarily pass Unit Tests (#16) * Updated CalcViewModelCopyForUT configuration (#17) * changes output path of the UI project to align with other projects (#15) * fixes EETypeLoadException issue: export class DelegateCommand (#18) * fixes EETypeLoadException issue: export class DelegateCommand * weak-reference in C++/CX * WeakRef in C# codebase * UTF-8-BOM * spaces in macro * resolve some comments from the offline review * format * rename file * fixes the memory list issue (#20) * fixes a wrongly migrated property * UTF-8-BOM * fixes up the crash of type casting (#21) * Update localized strings 2021-01-04 (microsoft#1458) (#23) (cherry picked from commit cdcb956) Co-authored-by: Matt Cooley <macool@microsoft.com> * Fixup tests (#1429) (#24) - Removed unneeded "ToString" calls - Fixed typos - Renamed "fEButtonState" to "FEButtonState" (cherry picked from commit 66ad328) Co-authored-by: N <71219152+PokeCodec@users.noreply.github.com> * Update graph internal engine verseion (microsoft#1466) (#25) (cherry picked from commit 0048dcb) Co-authored-by: Quentin Al-Timimi <27322516+quentin987@users.noreply.github.com> * Turn off DFS file shares in internal build system (microsoft#1470) (#26) (cherry picked from commit 885fa23) Co-authored-by: Matt Cooley <macool@microsoft.com> * Improve clarity of math expressions in history for Standard Calculator (feature microsoft#138) (microsoft#1453) (#27) * Implemented feature & added unit tests * Fixed more unit/ui tests * Refactored tests * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp (cherry picked from commit 565e3e2) Co-authored-by: Wei (Waley) Zhang <waley.zhang@microsoft.com> * Adds unit-test cases for NarratorAnnouncement after fixing issue microsoft#1386 (microsoft#1469) (#28) * fix bug: No confirmation is announced by the narrator after activating 'Remove equation' button microsoft#1386 * Unit Test: Add NarratorAnnouncementUnitTests Co-authored-by: tain <tankle_@hotmail.com> (cherry picked from commit 9d8e2ad) Co-authored-by: Tian L <60599517+MSFT-Tilia@users.noreply.github.com> * Move localization pipeline sync schedule to the YAML file (microsoft#1478) (#30) (cherry picked from commit 007eccd) Co-authored-by: Matt Cooley <macool@microsoft.com> * remove the strong reference carried from delegate (#32) * Remove the finalizer of ControlSizeTrigger (#31) * Normalize the namespace of CalcViewModel (#33) * ViewMode: arrange namespaces * UI build pass * run release * UT build pass * pass build * resolve comment: make the diff results cleaner * resolve comment: make the diff results cleaner (2) * resolve comment: make the diff results cleaner (3) * resolve comment: move impl into a namespace * update: spaces * update: CalculatorButtonUser.h * UTF-8 to UTF-8-BOM * remove ViewState.h/.cpp from CalcViewModel path * revert changes for NavCategory.cpp * remove extra space * remove UCM * remove BOM * Fixed a graphing calculator "permissions" bug caused by PR microsoft#1426 (microsoft#1471) (#34) - The PR microsoft#1426 can cause a crash when no users are returned via `User::FindAllAsync(UserType::LocalUser)` when subsequently trying to access the first user. The existing code also does not guarantee that the returned user is the currently active user. - This fix retrieves the user that opened the app and passes this user into a function to check if this user has the proper permissions to access the graphing mode. This makes sense since the active user is indistinguishable (at least from the app's perspective) to the user who opened the app. This user's permissions are then propagated downwards to properly set up the navigation menu of the app. - Implementation detail worth pointing out: `s_categoryManifest` is what is used to populate the navigation menu of the app, but this variable is static by design, so a separate function was written to override the appropriate `isEnabled` value in `s_categoryManifest`. This function is called by `onLaunched`. - Manual testing Co-authored-by: Wei (Waley) Zhang <waley.zhang@microsoft.com> * fixes up a bug (#35) * fix csproj (#37) Co-authored-by: hanzhang54 <zhangh@microsoft.com> Co-authored-by: Matt Cooley <macool@microsoft.com> Co-authored-by: N <71219152+PokeCodec@users.noreply.github.com> Co-authored-by: Quentin Al-Timimi <27322516+quentin987@users.noreply.github.com> Co-authored-by: Wei (Waley) Zhang <waley.zhang@microsoft.com> Co-authored-by: Tian L <60599517+MSFT-Tilia@users.noreply.github.com>
…soft#1550) * **BYPASS_SECRET_SCANNING** * fix * fixes x86/ARM/ARM64 builds for CI-Pipeline
…oft#1551) Things that required such update included: * `wstringstream` * `setprecision` * `SCODE_CODE`, `E_BOUNDS` * Various SAL macros Co-authored-by: Michał Janiszewski <janisozaur@users.noreply.github.com>
Co-authored-by: Matt Cooley <macool@microsoft.com>
* #DEBUG is a known C# preprocessor directive * So far, we haven't observed the problem described in the comment from C# async * fixes misc TODO items
* Add CI-internal pipeline * No ARM64, to match release Co-authored-by: Matt Cooley <macool@microsoft.com>
Co-authored-by: Matt Cooley <macool@microsoft.com>
* remove WinMeta.cs * undo a trivial change * UTF-8 BOM
* fixes: GraphingNumber doesn't work correctly * Avoid crashing
…icrosoft#1595) Co-authored-by: Dave Grochocki <grochocki@users.noreply.github.com>
… Mode (microsoft#1596) * keep the value away from getting rounded * set the display precision to 6 to align with C++ impl
…to merge/tomaster
…to merge/tomaster
generated file. | ||
--> | ||
|
||
<PropertyGroup Condition="'$(Version)' != ''"> |
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'll probably want to use $(AppVersion)
instead of $(Version)
in this file, since AppVersion is what's being passed on the command line here.
Another option would be to change build-single-architecture.yaml to use Version
instead of AppVersion
. If you do that you'll need to change other projects in the repo which currently use AppVersion
.
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.
Thanks Matt,
I decided to use Version
instead of AppVersion
since build-single-architecture.yaml is the only producer who specifies AppVersion
. Another reason for doing such way is that I referred to Clock project and I suppose it'd be better to minimize the differences of engineering practice between EE projects.
Please see commit 43634b9 for the changes.
Also, edited AssemblyInfo.cs to provide the information that was declared in Calculator.rc. The changes are in commit
4ed33a7.
After CI-pipeline finished successfully, I've verified the properties of file CalculatorApp.exe and it has the expected version information.
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.
Sounds good--just make sure that the .dll files in the package still have version information just like CalculatorApp.exe.
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.
Double checked the master branch, only Calculator project(the UI project) has assembly-info. The other projects, such as CalcViewModel, GraphControl, GraphingImpl, TraceLogging, they are tagging with default assembly-info which is empty. CalcViewModel was a static-library, so it's fine if it doesn't have assembly-info, but the remaining projects don't look good.
I've assigned some assembly-info for all the shared library(.dll) projects in commit 8926e99. Let me know if it's not good to do so and I'll revert the commit.
BTW, if we want to add assembly-info for GraphingImpl.dll, we need to submit some changes in the internal repo. But that task should not block this PR from getting checked in, I suppose.
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.
Hi @mcooley , this PR has been paused for a while. We'd like to make it checked in first. If there's any problems, we can send out other PRs to fix them.
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.
Thank you Matt and Tian for reviewing and updating. This looks very good to me!
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
|
src/Calculator/Views/StateTriggers/CalculatorProgrammerDisplayPanel.xaml
Show resolved
Hide resolved
The |
Hello C# - Migrating the codebase from C++/CX to C# (Phase 1)
This PR is Related to issue #893
Description of the changes:
How changes were validated:
Manual Tests Results for Branch feature/UICSharpCalculator