-
Notifications
You must be signed in to change notification settings - Fork 7
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
Update number type to support custom currency format #36
Conversation
Based on our discussion on Matrix, we should have the UX in such a way that |
@ghislaineguerin This spec does not address this design problem from mathesar-foundation/mathesar#1063
From @pavish in the Matrix discussion about this topic:
|
Potential solutions, not all of these are mutually exclusive.
Other solutions proposed were:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comments on the main thread.
A middle ground would be to keep support, but make the PostgreSQL Money type an "other" type in the UI. That would discourage users, and give them the expectation that it's not strongly supported, but we wouldn't have to remove any functionality that we currently have. |
We aren't offering any special display or editing functionality for "other" types. Since we'll already be building in display/editing functionality for working with money, it seems counterintuitive to not offer it for PostgreSQL Money type columns by relegating them to "other". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @ghislaineguerin, some minor changes requested.
|
||
#### Postgres Money Type Prototype | ||
|
||
[Figma Prototype - Postgres Money Type](https://www.figma.com/proto/Uaf1ntcldzK2U41Jhw6vS2/Mathesar-MVP?page-id=7552%3A83433&node-id=7646%3A84762&viewport=241%2C48%2C0.33&scaling=contain) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The warning should say:
"The currency setting of this database type cannot be changed."
If the custom Money type is available, it should say:
To use a different currency, please change this type to Number and back to Money.
If the custom Money type is not available, it should say:
Please contact an administrator if you'd like to change the currency setting.
The frontend will know whether the custom Money type is available, so it can use the appropriate message depending on the availability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been updated.
|
||
#### Custom Mathesar Money Type Prototype | ||
|
||
[Figma Prototype - Custom Mathesar Money Type](https://www.figma.com/proto/Uaf1ntcldzK2U41Jhw6vS2/Mathesar-MVP?page-id=7552%3A83433&node-id=7590%3A84021&viewport=241%2C48%2C0.46&scaling=contain) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. The only change I'd like is to change the "Symbol Location" options to Beginning and End, I think it's clearer.
@pavish Can you take a look and make sure this works for frontend formatting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The options look good, it would suffice for frontend formatting.
The number of inputs is many for the display options, it will definitely exceed the window size. We'll need a scrollbar in this pane or change the width for the dropdown. The max-height needs to be fixed.
@ghislaineguerin It would be better to have a prototype with scrollbars.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ghislaineguerin I don't see a scrollbar in the prototype.
design/specs/money-data-type.md
Outdated
|
||
- Select Symbol: Users can set the symbol that will be displayed along with the number. | ||
- Symbol position: Users can select the position for the currency symbol. The options are start or end. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These don't seem to match what's in the prototype.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've fixed this to match the prototype.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ghislaineguerin Looks good, the only comment is that I don't see a scrollbar in the prototype (per @pavish's comment).
@kgodey I have added the scrollbars. I will merge this since that was the only change requested. |
Fixes mathesar-foundation/mathesar#1063