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

Merge graphing calculator into master #899

Merged
merged 66 commits into from
Jan 7, 2020
Merged

Conversation

EriWong
Copy link
Contributor

@EriWong EriWong commented Jan 6, 2020

Fixes #338 .

Description of the changes:

Adds graphing calculator feature.

How changes were validated:

Manually

New test cases are added as part of this merge.

Daniel Belcher and others added 30 commits April 10, 2019 18:15
Initial PR for the feature/GraphingCalculator feature branch, part of microsoft#338.

The feature incorporates a proprietary Microsoft-owned graphing engine to drive graphing experiences in the Windows Calculator app. Due to the private nature of the graphing engine, the source available in the public repo will make use of a mock graphing engine. See README.md for more details.

This PR simply serves as a base for future feature development. As such, the PR will be immediately merged. Feedback on the content of this PR, and on the feature in general, is encouraged. If there is feedback related to the content of this specific PR, please leave comments on the PR page. We will address the comments in future PRs to the feature branch.
Description of the changes:
Add Pan/Zoom support for the graph surface.
Currently only supports Mouse/Pen/Touch interactions. Keyboard support will be added separately.

How changes were validated:
Manual
* Updated Graphing Interfaces to version 2.0.1
* Merge master into feature/GraphingCalculator branch
* Plumebd with data transfer

* Getting mainpage to talk to getbitmap.  moving share callbacks from mainpage to graphingcalculator

* Trying to get bitmap from renderer.

* work

* Share worked

* cleanups

* Cleanups progressing

* Share working, need loc for title string and user notification incase of a failure.  Then add the equations key.

* More cleanup, now using share icon image and resources for strings.  Still need to do the graph equation key.

* Change share to html based start.

* Key working, with UL but going to try changing to table.

* Fix a html formating error, generating a new UL for each equation.

* Switched over to a table for equation key and have color block formating

* Updates from PR feedback, using Graphing::IBitmap abstraction.

* Update src/Calculator/Views/GraphingCalculator/GraphingCalculator.xaml.h

Fixed

Co-Authored-By: Pepe Rivera <[email protected]>

* PR Updates.

* Add variables to the graph key.

* PR Updates.
* Use RichEdit Math Mode

* Add comment

Co-Authored-By: Stephanie Anderl <[email protected]>
* Plumebd with data transfer

* Getting mainpage to talk to getbitmap.  moving share callbacks from mainpage to graphingcalculator

* Trying to get bitmap from renderer.

* work

* Share worked

* cleanups

* Cleanups progressing

* Share working, need loc for title string and user notification incase of a failure.  Then add the equations key.

* More cleanup, now using share icon image and resources for strings.  Still need to do the graph equation key.

* Change share to html based start.

* Key working, with UL but going to try changing to table.

* Fix a html formating error, generating a new UL for each equation.

* Switched over to a table for equation key and have color block formating

* Updates from PR feedback, using Graphing::IBitmap abstraction.

* Update src/Calculator/Views/GraphingCalculator/GraphingCalculator.xaml.h

Fixed

Co-Authored-By: Pepe Rivera <[email protected]>

* PR Updates.

* Add variables to the graph key.

* eod

* Passive graph value tracing working.

* Basic active tracing cursor working.

* Move active tracing from graphingcalculator to grapher to save some hops.
Also block tracking of the active tracing key's when in the EquationTextBox.

* Active tracing working, need to put button on screen for activation.

* Added active tracing control button (placeholder image)

* Eod

* Popup trace value now tracks the highlighted point.

* Popup skined

* PR Updates.

* Update certificate thumbnail so VS2019 doesn't have a build error.

* PR comments in process.

* PR Updates

* PR Updates, change tracing value to use tooltip static resource so we automatically change depending on system values.  And changed text formatting of the value to be generic (x,y) value.

* PR updates, changed how we detect who has focus so we don't eat keys when not in active tracing.

* Additional filtering for the Key Up/Down in the grapher.
* Plumebd with data transfer

* Getting mainpage to talk to getbitmap.  moving share callbacks from mainpage to graphingcalculator

* Trying to get bitmap from renderer.

* work

* Share worked

* cleanups

* Cleanups progressing

* Share working, need loc for title string and user notification incase of a failure.  Then add the equations key.

* More cleanup, now using share icon image and resources for strings.  Still need to do the graph equation key.

* Change share to html based start.

* Key working, with UL but going to try changing to table.

* Fix a html formating error, generating a new UL for each equation.

* Switched over to a table for equation key and have color block formating

* Updates from PR feedback, using Graphing::IBitmap abstraction.

* Update src/Calculator/Views/GraphingCalculator/GraphingCalculator.xaml.h

Fixed

Co-Authored-By: Pepe Rivera <[email protected]>

* PR Updates.

* Add variables to the graph key.

* eod

* Passive graph value tracing working.

* Basic active tracing cursor working.

* Move active tracing from graphingcalculator to grapher to save some hops.
Also block tracking of the active tracing key's when in the EquationTextBox.

* Active tracing working, need to put button on screen for activation.

* Added active tracing control button (placeholder image)

* Eod

* Popup trace value now tracks the highlighted point.

* Popup skined

* PR Updates.

* Update certificate thumbnail so VS2019 doesn't have a build error.

* PR comments in process.

* PR Updates

* PR Updates, change tracing value to use tooltip static resource so we automatically change depending on system values.  And changed text formatting of the value to be generic (x,y) value.

* PR updates, changed how we detect who has focus so we don't eat keys when not in active tracing.

* Additional filtering for the Key Up/Down in the grapher.

* Fix bug where active tracing would turn back on after clicking button to turn it off.
* Added IGraphAnalyzer

* Key Graph Features called and getting returned to the client. To do put all strings into the Equation object

* Updated UpdateKeyGraphFeatures to add function analysis data to all properties in Equation object

* Update KGF when variables are updated

* Key graph features ui started

* Added MathRichEditBox and started hooking up key graph features to the UI

* Updated EquationViewModel to include parity and periodicity

* Updated key graph features to update the EquationViewModel

* updated key graph features to display more values

* Key graph features populating uing MathRichEdit mode

* moved KeyGraphFeatures control to GraphingCalculator.xaml

* Use MathML formatting instead of MathRichEdit for strings passed back from the engine

* cleaned up project targeting and equation.h comments

* Updated equation edit box to populate for KeyGraphFeatures

* Fixed vcxproj files to have the correct targeting and certificates. KGF Title strings moved to x:Uid instead of the code behind

* Updated per PR feedback

* Update MathRichEditBox to detect if the string is a mathml string and use the appropriate set method to set the text

* fixed the issue where parity, periodicity and monotonicity could be set with an old value if the next one is empty

* KGF control UI adjustments and error handling

* Error control updates

* Error handling added when analysis fails

* fixed alignment on rich edit boxes

* Add monotonicity direction into the mathml string and only have 1 richeditbox

* Set hover state on KGF EquationEditBox to change button opacity and fixed spacing in Monotonicity RichEditBox

* remove sideload package certificate info VS added

* updated logic for setting error strings to be in the viewmodel

* Updated KeyGraphFeatures to populate dynamically using a ListView and TemplateSelector

* Update periodicity to not show if it isn't supported

* Fixed issue where y-intercept was using the x-intercept value

* Remove ItemsControl ItemsContainerStyle

* Updated per pr feedback. Fixed bug where analysis error would not reset

* Update MathRichEdit box to remove selection when focus is lost

* Updated mathrichedit to get LAF access for Dev, Release and Graphing projects

* Remove OnLostFocus in MathRichEdit, Change KGF ItemsControl back to ListView

* Clean up styles for KGF and ensure the match the comps

* Moved formatoptions logic to the Grapher constructor and reverted LineColor.Text resource that was mistakenly taken out

* Add copyright header to KGF Files

* fixed issue where asymptote values were not populating

* Disable KGF button when there is no equation. Fixed issue where equation populated in a new equationtextbox after the previous one was deleted

* Removed formatoptions testing lines used for debugging
* fix share bugs

* PR feedback

* PR feedback and merge fix

* Fix spacing and use explicit break

* Fix extra space
* Fix listview

* extra merge with KGF

* Few tweaks

* Fix scrolling

* PR feedback and other tweaks

* Update src/Calculator/Views/GraphingCalculator/EquationInputArea.xaml

Co-Authored-By: Stephanie Anderl <[email protected]>
…res (microsoft#791)

* refactor code

* update KGF

* Rename some functions

* Undo comment out of proj file

* Pr feedback
…f2, f3..., visibility icon on hover (microsoft#804)

* Added enable/disable line functionality

* Update EquationTextBox to change the opacity of functions have are not visible. Update the function label for the EquationTextBox to increment the label to show f1, f2, f3, etc

* rebase key-graph-features and fix issue where removing an equation box and adding a new one repopulates the previous equation

* Added visibility icon for the equation button hover

* updated EquationButton to be a toggle button to better handle the LineHidden state and other PR comment fixes.

* Updated EquationButton style to use a toggle button and to have placeholder icons for the show/hide states

* Updated equation button after pulling the refactor work into the branch. Fixed the Equation Button in KGF UI

* Fixed Pepe's bugs

* Uncomment temporary.pfx in calculator.vcxproj
…#803)

* Add support of small windows

* remove extra space

* Modify how we manage the tooltip

* Fix merge issues
* Add tooltips to buttons in graphing calculator

* Fix break due to bad merge

* CR Feedback
rudyhuyn and others added 12 commits December 16, 2019 10:41
* update graph tooltip

* modify font size
* remove EquationBox from KFG

* polish

* improve templates

* fix issue with dark theme and MathRichEditBox
* Wire up graphing calculator keyboard with math rich edit control

* CR feedback

* Handle focus bug in flyout
* Equation Control - High contrast

* tweak

* Update graph colors when users switch from one high contrast mode to another

* decrease opacity of reveal borders
* Make some tweaks to share output

* adjust strings

* one more tweak

* Remove unneeded span
)

* Change active tracing to use correct glyph instead of dot

* make the pointer on the glyph line up correctly
* prevent the graph to change ranges when hide/show an equation or change the trig unit

* make sure to not zoom/pan when we hide the last visible equation
@rudyhuyn rudyhuyn self-assigned this Jan 6, 2020
rudyhuyn
rudyhuyn previously approved these changes Jan 6, 2020
@EriWong
Copy link
Contributor Author

EriWong commented Jan 6, 2020

Hold off on completing this merge until we figure out our release build.

Copy link
Contributor

@sanderl sanderl left a comment

Choose a reason for hiding this comment

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

Wait for the release pipeline to be updated

@ghost ghost added the needs author feedback label Jan 6, 2020
@EriWong EriWong requested a review from sanderl January 7, 2020 20:10
sanderl
sanderl previously approved these changes Jan 7, 2020
Copy link
Contributor

@sanderl sanderl left a comment

Choose a reason for hiding this comment

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

Looks good.

@mcooley mcooley merged commit 4ac76c6 into microsoft:master Jan 7, 2020
@sanderl sanderl added the graphing calculator Work items related to the graphing calculator feature. label Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
graphing calculator Work items related to the graphing calculator feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Graphing Mode
9 participants