Commit graph

889 commits

Author SHA1 Message Date
oneonezhang
82b8ffa4d7
update (#2189) 2024-06-17 21:27:23 +08:00
oneonezhang
1feb376108
Use managed identity for ESRP code signing task (#2185)
* draft: update esrp

* variable

* update
2024-06-12 14:06:40 +08:00
hanzhang54
d9691038d8
Fix exception when setting content to clipboard (#2188)
* Fix exception when setting content to clipboard

* Update
2024-06-11 20:01:51 +08:00
hanzhang54
f3d8e7588c
Update localized strings 2024-06-04 (#2181) 2024-06-05 13:15:24 +08:00
Cory Volk
48ecaa4f3a
Update minor version to 2406 (#2180) 2024-06-04 09:04:50 -07:00
oneonezhang
7315f364b9
Migrate StoreBroker tasks to SN+I authentication (#2179)
* update

* reset
2024-05-31 23:43:12 +08:00
hanzhang54
b0f1531eeb
Update minor version to 2405 (#2177) 2024-05-28 16:18:48 +08:00
hanzhang54
90af5adcd2
Rehydrate for Recall (#2176)
* Merged PR 10748585: Recall | Connect UserActivity to support restoring from snapshots

## What
Thanks to @<Brendan Elliott ⌨>  for his PoC !10573092
This PR is going to use `UserActivity` APIs to connect the app to Recall so that we can take a snapshot when asked and then retore our states from the snapshot later.

## How
- Add a new type `SnapshotLaunchArguments` to identify a protocol launch requested by Recall.
- Add an extension `LaunchExtensions` as helper to retrieve key information from fundamental types.
- Refactor `App::OnActivated()` and `MainPage::OnNavigatedTo()` to handle different protocols properly.
- Create or parse `UserActivity` in `MainPage` in the way like what the PoC is doing.
- Improve the coding style a bit for `MainPage`.

## Note
The serialization work and restoring from JSON is going to be done in a separate PR.

## Testing
Manually tested.
Some typical test cases:
- Launch the app from *Start menu*
- Launch the app from *Task bar*
- Launch the app from *Command line*
- Launch with the protocol for Recall
- Launch with the protocol that is injected with evil data.

Related work items: #50854714

* Merged PR 10741448: [Recall] Snapshot saving and restoring

####What
According to PM [Spec](https://microsoft.sharepoint-df.com/:w:/t/PAXEssentialExperiences421/EcpP5tGRtFdIsRrP84ueRfUBjb6tfayxWtF9ujvJuNx6Dg?e=AeRzVf), saving and restoring Calculator snapshot when required.

The current snapshot supports to:
- Restore the calculator mode.
- Restore the current calculation (display value and expression).
- Restore the history of calculations (either in Standard mode or Scientific mode) shown at the time the snapshot was taken.
- Restore the current calculation error state, if applicable.

####How
- Added `SnapshotHelper` to help save and restore snapshots.
- Besides the existing snapshot information from view models, added an extra field `SnapshotVersion` in `ApplicationSnapshot` for backward compatibility.

#### Note
Unit tests will be added in a separate PR.

Related work items: #50701758

* Merged PR 10772614: Recall | Update the LaunchURI design

## What
Since `System.Uri` already has the `Segment` property which contains the parsed path blocks, Query in Uri looks too heavy and intrusive in implementation to retrieve the activity id.

## Changes
Changed the launch URI from something like `ms-calculator:///snapshot?activityId=<a guid>` to `ms-calculator:snapshots/<a guid>`

Related work items: #50854714

* Merged PR 10778666: Recall | Show error dialog if launching from snapshot has failed

## What
Per Figma design, we can show an error dialog with messages for the failures happens during snapshot launch.

## Notes
- Fixed a crash about taking a snapshot when Calculator hasn't initialized a standard calculator.
- Simplified the restore path.

## Screenshot
![image.png](https://dev.azure.com/microsoft/d1a24475-535d-4c83-988a-9491e6dbc858/_apis/git/repositories/6255259e-4ead-4d8d-b165-55eeacc5ca48/pullRequests/10778666/attachments/image.png)

Related work items: #50858262

* Merged PR 10790341: [Recall] Update calculator engine with snapshot for further calculations

####What
When restoring from snapshot, we need to set calculator engine properly to make further calculations correct.

####How
Update calculator engine by a serial of corresponding commands from snapshot.

To get the commands for the display area when saving snapshot,
1. If the expression is not from history and the primary display is the result of the expression, `DisplayCommands` of `StandardCalculatorSnapshot` will be empty, and we will use the commands from `ExpressionDisplay` for restoring in the future.
2. If the expression is not from history and the primary display is not the result of the expression, `DisplayCommands` of `StandardCalculatorSnapshot` will be the commands from the history collector in addition to the operand command in the primary display, and it will be used for restoring in the future.
3. If the expression and primary display are from history, `DisplayCommands` will be incomplete with the operand command in the primary display missing as by current design of history, and the commands from `ExpressionDisplay` will be used for restoring in the future.

Related work items: #51002745

* Merged PR 10802927: Recall | Add threat model

## What
The support for Recall introduced a URI activation process allowing the Recall app to launch Calculator with desired snapshot metadata. This led to a potential security problem, and we need to address it by providing justifications.

Threat model is a well-known practice among Inbox Apps. After offline discussion, we decide to add diagrams for this Recall feature to prepare for the security review.

## Diagram preview
![image.png](https://dev.azure.com/microsoft/d1a24475-535d-4c83-988a-9491e6dbc858/_apis/git/repositories/6255259e-4ead-4d8d-b165-55eeacc5ca48/pullRequests/10802927/attachments/image.png)

![image (2).png](https://dev.azure.com/microsoft/d1a24475-535d-4c83-988a-9491e6dbc858/_apis/git/repositories/6255259e-4ead-4d8d-b165-55eeacc5ca48/pullRequests/10802927/attachments/image%20%282%29.png)

Related work items: #51165486

* Merged PR 10794979: Add Recall Telemetry

**Snapshot**
EventName: `RecallSnapshot`
Payload example:` { "CalcMode": "Standard"}`
**_Fires when a snapshot (UserActivityRequested) is triggered_**

**Restore**
EventName: `RecallRestore`
Payload example:`{ "CalcMode": "Standard"}`
**_Fires when launching by snapshot (recall restore)**

**Error**
EventName: `Exception`
Payload example: `{ "CalcMode": "Standard", "FunctionName" : "MainPage::ShowSnapshotLaunchErrorAsync", "Message": "SnapshotRestoreError" }`
**_Fires when launching by snapshot failed_**

Related work items: #51114542

---------

Co-authored-by: Tian Liao  <tilia@microsoft.com>
Co-authored-by: Jian Zhang <zjian@microsoft.com>
2024-05-28 16:08:27 +08:00
Tian L
e0a17f43b0
eng: Add publish control into the release pipeline (#2167)
* add publish control

* use test version

* update display name

* revert the test version
2024-04-29 17:17:07 +08:00
Tian L
10df81d11c
Resize on the first launch (#2165) 2024-04-28 13:48:53 +08:00
oneonezhang
80fafa0946
Migrate Loc pipelines to TDBuildAzureDevOpsTask V2 (#2163)
* use v2

* fix warning

* fix
2024-04-28 10:54:11 +08:00
Tian L
46c2857c34
Multi-instance (#2161)
* launch multi instances

* trace error

* simplify the graphing test

* remove an assertion

* simplify some code

* remove some trivial code.

* fix runtime cast
2024-04-25 08:57:05 +08:00
Tian L
1bc539ffbb
Fix #2146: SWIPE DELETE FUNCTION FREEZES APP (#2157)
* fix stackoverflow

* space
2024-04-11 15:34:25 +09:00
Tian L
6ee1eb9e2c
Fix: heap corruption in the Graphing mode (#2152)
* Run render pass asynchronously on UI thread

* remove unused fields

* async for SetVariable

* resolve comments
2024-04-09 15:17:15 +08:00
Cory Volk
22d758e02c
Update minor version in main to 2404 (#2154) 2024-04-08 09:26:33 -07:00
hanzhang54
2571d38a2e
Update localized strings 2024-03-29 (#2149) 2024-03-29 14:46:16 +08:00
hanzhang54
05ee7a012c
Add hint about MathRichEditBox's context menu for narrator (#2147)
* Add hint about MathRichEditBox's context menu for narrator

* Update resource string

* Update resource string
2024-03-26 14:20:51 +08:00
Tian L
15cd5bc5f4
Setup SBOM signing for VPack (#2133)
* setup SBOM signing for VPack

* yield output

* try get variable properly

* rename variable

* cap the name of output variable

* ready for review
2024-03-18 12:58:55 +09:00
Cory Volk
c3ae2367ca
updating minor version to 2403 (#2125) 2024-03-01 09:11:20 -08:00
Tian L
b5e8b207f7
bump minor version to 2401 (#2117) 2024-02-05 12:15:05 -08:00
Tian L
f69f74b59c
Fix: Narrator doesn't announce "There's no history yet" (#2116)
* provide UIA names properly

* fix ui testing
2024-02-01 18:40:22 +08:00
hanzhang54
c4cb05fe40
Fix foreground resource of operator panel button in high contrast theme (#2110)
* Fix foreground resource of operator panel button in high contrast theme

* Update fix
2024-01-23 10:47:49 +08:00
hanzhang54
e7d3b3b3ac
Fix background of controls with focus in Date calculation in high contrast theme (#2109)
* Fix option ComboBox resources

* Fix background of CalendarDatePicker in focus
2024-01-22 16:49:20 +08:00
hanzhang54
6f947d5f7e
Fix History/Memory tab item style in high contrast theme (#2107) 2024-01-19 16:38:34 +08:00
Cory Volk
1e7996dfe8
Updating main minor version to 2312 (#2103)
Co-authored-by: Tian Liao <tilia@microsoft.com>
2024-01-10 01:38:51 +08:00
Tian L
1eea5e2b9c
upgrade ui test to dotnet8 (#2104) 2024-01-08 18:32:58 +08:00
hanzhang54
3b71d7bd1a
Update localized strings 2023-12-05 (#2095) 2023-12-05 22:24:46 +08:00
hanzhang54
48b8dc141e
Update Settings Page (#2094)
* Fix monochrome image of About expander in Settings page

* Update style

* Remove resource

* Remove unused style
2023-12-05 20:20:21 +08:00
Niels Laute
c2c4795cee
Adding new Settings UX (#2049)
* Revert "Revert PR#1964 (#2032)"

This reverts commit fbc6598770.

* Updating namespaces

* Using Uwp package and loc fix
2023-12-04 20:18:32 +08:00
Tian L
eb0324f1a0
Update minor version to 2311 (#2085) 2023-11-08 12:44:32 +08:00
Tian L
a5cee49253
eng: migrate pipelines to 1ES PT (#2080)
* onboard 1ES PT

* revert the todo item

* resolve comments

* add back the nuget security analysis for OSSBuild
2023-10-27 15:25:40 +08:00
Ʋ
246138621a
Implement Nibble Data-Converter Option (#2056)
* Implement Nibble > Update UnitConverterDataLoader.cpp

Added Nibble Unit Data into the UnitConverterDataLoader.cpp file.

* Implement Nibble > Update UnitConverterDataConstants.h

* Update Test.resw > Adding Test

* Update Resources.resw

* Update Resources.resw > Nibble

* Update Resources.resw > Fixed Typo

* Update Resources.resw > Fixed Typo

* Update UnitConverterDataConstants.h

* Update Resources.resw

* Update Resources.resw

* revert Resources GB

* Update UnitConverterDataLoader.cpp ~ set Nibble to right spot.
2023-10-19 12:56:46 +08:00
Cory Volk
fb0f8b9b75
Updating Main branch minversion to 2310 (#2071) 2023-10-02 12:28:40 -07:00
Matt Cooley
899014ee10
Add a NatVis file for ratpak (#2065) 2023-09-25 09:13:48 -07:00
Cory Volk
ca84fed13c
Update to 2309 minor version (#2050) 2023-08-29 08:42:11 -07:00
Tian L
9107540a87
Engage Secure Supply Chain Analysis for OSS build (#2043) 2023-08-17 11:20:05 +08:00
Tian L
0b9b2077eb
add a script to check nuget config for PRs (#2042) 2023-08-15 15:23:02 +08:00
hanzhang54
453b7c2944
Remove restriction of P0 UI tests for PRs with CI build (#2039) 2023-08-15 13:15:54 +08:00
hanzhang54
bee355a08f
Fix the broken decimal key (#2038) 2023-08-14 17:44:33 +08:00
microsoft-github-policy-service[bot]
4ba536528f
Onboarding to GitOps.ResourceManagement (#2015)
* Add prIssueManagement.yml to onboard repo to GitOps.ResourceManagement as FabricBot replacement

* Deleting fabricbot.json

---------

Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
2023-08-02 17:23:49 +08:00
Cory Volk
d488dc3860
Update azure-pipelines.release.yaml (#2034) 2023-08-01 18:51:13 -07:00
hanzhang54
fbc6598770
Revert PR#1964 (#2032)
* Revert PR#1964

* Replace keyboard input of decimal with mouse input in UI test

* Update UI test
2023-08-01 19:44:49 +08:00
hanzhang54
039bb5dea4
Workaround for Simplified Chinese localization issue of currency API (#2031)
* Workaround for Simplified Chinese localization issue of currency API

* Update fix
2023-08-01 19:44:29 +08:00
Cory Volk
b0f30025fe
Update Main version to 2307 (#2029) 2023-07-17 09:19:39 -07:00
Tian L
3673c44615
port the fix for symbol collision (#2027) 2023-07-12 09:41:30 -07:00
Rose
788dfc7726
Use is operator instead of as + null check (#1911) 2023-05-26 12:34:02 -07:00
Rose
b895f5bcea
Update SDK used to compile calculator (#1950)
Increase Minimum version to 19041 and SDK to build with to 22621
2023-05-26 11:28:16 -07:00
Matt Cooley
4a1aa8eec6
Replace code which starts the WinAppDriver server (#1957) 2023-05-26 07:52:05 -07:00
Flippchen
264174669d
added kilowatthour to energy units (#1944)
* added kilowatthour to energy units

* fixed false change

* Update src/Calculator/Resources/en-US/Resources.resw

Co-authored-by: Adam Sasine <adam.sasine@gmail.com>

* fix: translations, description

* fix: empty line

---------

Co-authored-by: Adam Sasine <adam.sasine@gmail.com>
2023-05-17 17:49:15 +09:00
Matt Cooley
14f35d19f7
Use a markup extension instead of x:Uid to load localized strings (#1902)
This PR uses XAML markup extensions, ResourceString and ResourceVirtualKey, to load localized resources instead of using x:Uid. I used a script to find all strings corresponding to an x:Uid and substitute them into the XAML, and then manually cleaned up the generated code.

This is intended to improve developer productivity. Now, when reading the XAML file, you don't have to cross-reference the resw file to see if a control has a tooltip or an automation name.

Decoupling the UI from the string names also makes it easier to change the UI without impacting localization: for example, you can now use the same string in multiple places, or use an existing string on a new UI element. For now, I've avoided making any changes to the resw file to avoid impacting the localization process.
2023-05-16 09:04:55 -07:00