Commit Graph

145 Commits

Author SHA1 Message Date
Joachim LF
25cd0d44f3 [calculation/additional_outputs] Use input rather than output if possible, and open on tan 2022-06-17 13:09:45 +02:00
Laury
2156ca7e42 [calculation] Added additional output about second degree polynomials 2021-09-12 21:28:07 +02:00
Hugo Saint-Vignes
f00c135b69 [apps/calculation] Add additional outputs for matrix
Change-Id: Ia4b285eb0f28eaed838d32a1fdfb785d13664f65
2020-11-04 15:07:20 +01:00
Émilie Feral
df74c2c551 [apps/calculation] The heights (common and expanded) of calculation cells are
computed when the calculation is added to the store and don't change afterwards.
Otherwise, if their heights change when scrolling (due to a modification of the
display output type - ExactOnly, ApproximateOnly...), it generates crashes.
2020-07-16 14:37:38 +02:00
Émilie Feral
c92b3d49e9 [apps/calculation] HistoryController: reload the subview selection when
deleting row

This fixes the following bug: input 1, OK, 1.2 OK, delete the row whose
input is '1' with the selection on the output view. The output of 1.2
does not toggle and it should.
2020-07-16 09:48:22 +02:00
Léa Saviot
982b467268 [apps/calculation] Fix scrolling
If the last cell is too big to fit entirely, we would scroll to the top
of the calculation, instead of the bottom
2020-07-07 09:46:26 +02:00
Léa Saviot
1128134c37 [apps/calculation] Raise exception if row height miscomputed
Scenario:
Put the complex mode to exponential, then go back to Calculation and:
Toolbox, Down, Down, Down, Down, OK, OK, Two, Plus, Imaginary,
Toolbox, Down, Down, Down, Down, OK, Down, OK, Two, Plus,
Imaginary, OK, Toolbox, Down, Down, Down, Down, Down, OK,
Down, OK, Up, OK, Right, Zero, OK, OK, Toolbox, Down,
Down, OK, Toolbox, Back, Up, Zero, Up, OK, Zero, Up, Up, Up
2020-07-07 09:46:26 +02:00
Léa Saviot
35f20c4312 [apps/calculation] Comment possible failed height computation 2020-07-06 16:35:35 +02:00
Émilie Feral
96c7d84633 [apps/calculation] Factorize code to avoid selecting ellipsis on cell
where ellipsis is not displayed
2020-06-26 17:48:31 +02:00
Émilie Feral
1281a4a508 [apps/calculation] HistoryController: avoid duplicate code when handling
backspace event. Keep the same selected subview.
2020-06-26 17:48:31 +02:00
Émilie Feral
94d3ac9828 [apps/calculation] HistoryController: fix order of actions in Backspace
handle event

This fixes the following bug: input 1/2/3/4/5/6/7/8, OK, OK, input 1,
OK, up, backspace. The selection disappeared.
2020-06-26 17:48:31 +02:00
Émilie Feral
aef804d149 [apps/calculation] HistoryController: avoid 2 calls to
setSelectedSubviewType in tableViewDidChangeSelectionAndDidScroll
2020-06-26 17:48:31 +02:00
Gabriel Ozouf
363bf4a620 [apps/calculation] Fixed ellipsis scrolling
When scrolling to a calculation without additional outputs from a
calculation with additional outputs, the ellipsis, though invisible,
would remain selected.

Change-Id: I7408ae004b9374e432ac58361616fa2ecf1550d8
2020-06-25 18:03:29 +02:00
Émilie Feral
bac2949a5e [escher][apps] SelectableTableViewDelegate: add
tableViewDidChangeSelectionAndDidScroll method and implement it for
Calculation::HistoryController

This fixes the following bug: In the calculation application, input 1,
OK, 1/2/3/4/5/6/7/8, OK, up, up, left, down, up. The selection failed.
2020-06-25 13:48:47 +02:00
Émilie Feral
e24de79a9e [apps/calculation] HistoryController: avoid dereferencing nullptr 2020-06-04 14:50:10 +02:00
Émilie Feral
e4848a7535 [apps/calculation] HistoryController: favour understandable code 2020-06-04 14:50:01 +02:00
Ruben Dashyan
266482ef99 [apps/calculation] Additional outputs for Unit 2020-06-04 14:50:01 +02:00
Ruben Dashyan
a31524173f [apps/calculation/history_controller] Factor handleEvent 2020-06-04 14:50:01 +02:00
Ruben Dashyan
a3265996fe [apps/calculation/history_controller] Factor handleEvent 2020-06-04 14:50:01 +02:00
Ruben Dashyan
f3bcedd43d [apps/calculation/history_controller] Simplify and harmonize handleEvent 2020-06-04 14:50:01 +02:00
Ruben Dashyan
167827f0e4 [apps/calculation] EditExpressionController accesses subview directly 2020-06-04 14:50:01 +02:00
Ruben Dashyan
63ab8710b9 [apps/calculation] Factor EditExpressionController::insertTextBody 2020-06-04 14:50:01 +02:00
Léa Saviot
b034f8e054 [apps/calculation] Fix history navigation
When calculations span on two lines, better selection
2020-05-28 04:44:27 -07:00
Léa Saviot
a56a73b0ba [apps/calculation] Fix calculation height computation
It was done in two places before, which created inconsistencies
2020-05-28 04:44:27 -07:00
Léa Saviot
0379327b06 [apps/calculation] Geographic navigation in the history 2020-05-28 04:44:27 -07:00
Léa Saviot
579485c8c0 [apps/calculation] CanBeSingleLine differs if args are view/layout sizes
If the sizes are for layouts, we need to add the margins added by the
views.
2020-05-28 04:44:27 -07:00
Léa Saviot
11c39b6206 [apps/calculation] Calculation::height has two types of margin arguments
One for the margin between layouts and on top / at the bottom of the
cell, the other for the margin surrounding each layout.
2020-05-28 04:44:27 -07:00
Léa Saviot
78cac6ddae [apps/calculation] Calculation::height has CanBeSingleLine argument 2020-05-28 04:44:27 -07:00
Léa Saviot
525290427a [apps/calculation] Calculation::height takes verticalMargin argument 2020-05-28 04:44:27 -07:00
0b101
b48d3d6e4a Added a new compact result display mode 2020-05-28 04:44:27 -07:00
Émilie Feral
24d9f37205 [apps/calculation] Clean how cell subtype is selected/
This fixes crashes: indeed, in the way it was done before, we called
scrollToSubviewOfTypeOfCellAtLocation after setting the new selected subtype
and before reloading the data. However, selecting a new subtype might expand
the selected cell which can temper with the cell repartition. If so, we need to
reload the data to be able to call 'selectedCell' for instance.
2020-02-20 10:56:11 +01:00
Émilie Feral
2a03583fe0 [apps/calculation] Reset history cell memoization when reloading the
table. Otherwise, the Poincare pool store useless layouts for cells that
aren't displayed.

This fixes the following issue: input "(transpose([1 2 3 4 5 6][1 2 3 4 5
6])^8", the computation works, clear the history, input the same
calculation again, it fails with a memory error.
2020-02-19 10:34:28 +01:00
Romain Goyet
7f43b73049 [apps] Don't forget to call viewWillAppear
At the moment ViewController::viewWillAppear doesn't do anything, so
there is no real impact. But if we want to use it it needs to be called
from subclasses.
2020-02-17 10:31:24 -05:00
Émilie Feral
c2540a1d8a [apps/calculation] Calculations now hold 4 texts: input, exact output
and 2 approximate outputs - one with the maximal number of significant
digits and one with the number of significant digits asked by the user.
This enables to find the approximate output without going through the
approximation routine again.
2020-02-12 15:13:23 +01:00
Émilie Feral
a82ff2b703 [apps/calculation] HistoryController: in historyViewCellDidChangeSelection,
limit the whole table reloading to cases where the cell height did
actually change to avoid useless blinking
2020-02-12 15:13:22 +01:00
Émilie Feral
767d1654cc [apps/calculation] HistoryViewCell: select the right expression of
output when coming from ellipsis subview
2020-02-12 15:13:22 +01:00
Émilie Feral
39dbb7d68c [apps/calculation] Fix relayouting when highlighted cell changed
This fixes the following scenario: add "1.2" 5 times, go up three times,
and down three times, the last cell was not correctly relayout.
2020-02-12 15:13:22 +01:00
Émilie Feral
bbe39aac14 [apps/calculation] HistoryController: display additional results pop-up
when handling OK/exe on the ellipsis view
2020-02-12 15:13:22 +01:00
Émilie Feral
251db5b60e [apps/shared][apps/calculation] Change class names:
ScrollableInputExactApproximateExpressionsCell -->
ScrollableThreeExpressionsCell
AbstractScrollableExactApproximateExpressionsView -->
AbstractScrollableMultipleExpressionsView
ScrollableExactApproximateExpressionsView -->
ScrollableTwoExpressionsView
ScrollableInputExactApproximateExpressionsView -->
ScrollableTwoExpressionsCell
2020-02-12 15:13:22 +01:00
Léa Saviot
88ab0e686c [apps] Less operations in willExitResponderChain if exiting app
If nextFirstResponder is nullptr, it means we are exiting the app, so
there is no need to relayout, reselect, ...
We did it bbefore because a long time ago, we used to keep all apps side
by side so they had to be thouroughly cleaned when exiting
2020-02-12 15:13:22 +01:00
Émilie Feral
ba159de21d [apps/calculation] Trigonometry additional results are displayed if the
input OR the output is a cosine/sine
2020-02-12 15:13:21 +01:00
Émilie Feral
398b529811 [apps/calculation][poincare] AdditionalInformationType is determined
from both input and output expressions of a Calculation
2020-02-12 15:13:21 +01:00
Émilie Feral
fef0538941 [apps/calculation] Handle OK events on additional outputs pop-up - WIP 2020-02-12 15:13:20 +01:00
Émilie Feral
1f4b823509 [apps/calculation] HistoryController: pointer to Calculation are expring
pointer, they've to be recomputed everytime we reload the table (because
of a scroll or when deselecting the table)
2020-02-12 15:13:20 +01:00
Émilie Feral
414f1eb25c [apps/calculation] HistoryController: ensure to display burger views
when scrolling up and down
2020-02-12 15:13:20 +01:00
Émilie Feral
73a8ec24f2 [calculation] Revert "HistoryViewCell: remove useless m_expandedCalculation"
When scrolling up and down, only 'setCalculation' is called by
'willDisplayCellForIndex' - and not 'cellDidSelectSubview'. So a new cell
should be informed of the expanded state in 'setCalculation'.
2020-02-12 15:13:20 +01:00
Émilie Feral
c12304a00e [calculation] Remove outdated comment 2020-02-12 15:13:20 +01:00
Émilie Feral
df47a355a2 [calculation] HistoryController: display RationalListController when
clicking on a burger of a Rational input
2020-02-12 15:13:19 +01:00
Émilie Feral
f94727b62d [calculation] HistoryController: factorize code 2020-02-12 15:13:19 +01:00
Émilie Feral
714e5f12d9 [calculation] WIP: display IntegerListController when clicking on a
burger view of an integer input
2020-02-12 15:13:19 +01:00