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

Handle equals and allow typing texts in cells #91

Merged
merged 12 commits into from
Jul 23, 2020
Merged

Conversation

ryonakano
Copy link
Member

@ryonakano ryonakano commented Jul 5, 2020

2020-07-05 10 49 47 の画面録画

Fixes #39
Fixes #22

@ryonakano ryonakano requested a review from elegaanz July 5, 2020 01:50
@elegaanz
Copy link
Contributor

elegaanz commented Jul 5, 2020

Looking at the code, it would still accept formulas that don't start with a =. Maybe it should behave like in other spreadsheet apps: if it starts with an equal sign, what follows is a formula, otherwise it is interpreted as verbatim text or number. What do you think?

@ryonakano
Copy link
Member Author

You're right, that would be more reasonable. I'll work on that too.

@ryonakano ryonakano changed the title Handle equals Handle equals and allow typing texts in cells Jul 11, 2020
@ryonakano
Copy link
Member Author

Now it's possible to type texts like Hello, how are you? or Hi!, but when you type 12 days (contains both numbers and texts), the cell displays an Error. Also, when = is not used before a function like sum(12,23) or 12+9, it should display as a plain text like Excel as you mentioned.

Copy link
Contributor

@elegaanz elegaanz left a comment

Choose a reason for hiding this comment

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

It looks like it interprets more often than what Excel/LibreOffice does (i.e 2+2 will display 4, not literally 2+2, even if there is no =), but it just feels a bit more smart IMO, even if it could be confusing because some formula will require a = while others won't.

src/Services/Formula/FormulaGrammar.vala Outdated Show resolved Hide resolved
elegaanz
elegaanz previously approved these changes Jul 13, 2020
Copy link
Contributor

@elegaanz elegaanz left a comment

Choose a reason for hiding this comment

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

👌

@ryonakano ryonakano requested a review from elegaanz July 22, 2020 11:56
@ryonakano ryonakano merged commit 79cfb99 into master Jul 23, 2020
@ryonakano ryonakano deleted the handle-equals branch July 23, 2020 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trying to enter "=" crashes the app Allow typing text into a cell
2 participants