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

Add support for scientific notation in number input components #1247

Closed
seancolsen opened this issue Mar 28, 2022 · 10 comments
Closed

Add support for scientific notation in number input components #1247

seancolsen opened this issue Mar 28, 2022 · 10 comments
Labels
help wanted Community contributors can implement this ready Ready for implementation type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory
Milestone

Comments

@seancolsen
Copy link
Contributor

seancolsen commented Mar 28, 2022

Current behavior

  • Entering numbers like 8E9 into a NumberInput (or StringifiedNumberInput) is not possible.

Desired behavior

  • NumberInput and StringifiedNumberInput accept a prop allowScientificNotation which defaults to false. When true the user can enter numbers in scientific notation and the component will display numbers in scientific notation when appropriate.

Additional context

Implementation

  • Begin by adding allowScientificNotation to Options within src/component-library/number-input/number-formatter/options.ts. This change will allow the components to accept that prop.
  • Many of the functions in cleaners.ts will need to be modified to work with scientific notation. Make sure to add tests in cleaners.test.ts.
  • formatter.ts will also need modification to display numbers in scientific notation.
@seancolsen seancolsen added ready Ready for implementation type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory labels Mar 28, 2022
@seancolsen seancolsen added this to the [Beta] Better Editing Experience milestone Mar 28, 2022
@seancolsen seancolsen mentioned this issue Mar 28, 2022
22 tasks
@seancolsen seancolsen added the help wanted Community contributors can implement this label Mar 29, 2022
@kgodey kgodey modified the milestones: [Beta] Better Editing Experience, Unprioritized Jun 2, 2022
@github-actions
Copy link

github-actions bot commented Feb 4, 2023

This issue has not been updated in 90 days and is being marked as stale.

@github-actions github-actions bot added the stale label Feb 4, 2023
@mohamedelhefni
Copy link

Hi, is this issue still considerable to work on it?

@github-actions github-actions bot removed the stale label Mar 4, 2023
@kgodey
Copy link
Contributor

kgodey commented Mar 5, 2023

Yes, this is still open.

@gulianow
Copy link

gulianow commented Oct 9, 2023

Hi, I would like to contribute on this project. Is this issue still open? Can you assign me on this issue?

@seancolsen
Copy link
Contributor Author

Sure @gulianow go ahead

@seancolsen
Copy link
Contributor Author

Unassigning due to inactivity

@gulianow
Copy link

gulianow commented Nov 1, 2023

Hi I'm sorry, but I'm still working on that issue, can you give me more time, please. I just need to change couple more things and it will be done. Thanks for understanding.

@seancolsen
Copy link
Contributor Author

Sure feel free to submit a PR @gulianow. You can still work on it even if you're not assigned to it.

@mathemancer
Copy link
Contributor

@seancolsen are we doing other conversion of numeric input on the front end now as well? I recall avoiding that for consistency, and I'm inclined to prefer that in this case as well, since PostgreSQL handles scientific notation (including the example given, as well as others) smoothly and easily.

  • This woule be more consistent w.r.t. our current handling of locale (relevant when the notation includes a decimal point or comma)
  • This would make input from pasting data, CSV upload, or excel behave identically to typed input.

@seancolsen
Copy link
Contributor Author

seancolsen commented Jan 2, 2024

@gulianow I owe you an apology.

I took a look at your PR for this issue. I can tell you spent a lot of time on it, so thank you! Unfortunately I have some bad news: we have decided to abandon this feature, closing your related PR along with it. I'm very sorry about this.

Upon reviewing your PR, I the complexity of this feature became more apparent to me than I realized when I told you to go ahead and start work just a few months ago. I think I probably foresaw that complexity when I originally open this issue, but in the following year our team underwent some important changes in pace. We are now working much harder to cut scope than we were when I originally opened this issue. We are prioritizing building only the features that will allow us to release a beta version of Mathesar. Building support for scientific notation, while interesting, unfortunately does not meet that bar of being necessary enough for us to spend time on right now. If your PR were close to being merge-ready, then I'd be inclined to spend a small amount of time reviewing it and discussing the necessary follow-up changes with you in order to get it merged. However from reading the diff, I can see that your PR would not actually be quick to review. There are a bunch of complex things to discuss and re-work. This is not your fault. Significant follow-up changes to PRs like this are absolutely part of the normal development process, but in this case it's just not something that our team has time for, given the combination of low priority and high complexity here. This ticket should have been closed a year ago, or perhaps never even opened in the first place.

The maintainers team met today to discuss a number of open issues including this one, and several people weighed in on this together, forming a consensus to close the ticket. We want to collectively apologize for bungling this one though — especially me. Sorry! Towards this end, I'll be reviewing all our "help wanted" tickets very soon in an effort to avoid mishaps like this in the future.

I encourage you to stay involved though! Feel free to reach out within this thread or on Matrix if you have any other questions or need help finding something to work on. I can tell you are capable of making valuable contributions to Mathesar!

@seancolsen seancolsen closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Community contributors can implement this ready Ready for implementation type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory
Projects
No open projects
5 participants