-
Notifications
You must be signed in to change notification settings - Fork 16.6k
feat: Dynamic currency #36416
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
Merged
Merged
feat: Dynamic currency #36416
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
bb73cf7
feat(currency): implement dynamic currency handling
richardfogaca 5cfa7f4
Merge branch 'master' into feat-dynamic-currency
richardfogaca af340ba
Merge branch 'master' into feat-dynamic-currency
richardfogaca 7f61867
fix(dynamic-currency): use backend detected_currency as fallback for …
richardfogaca abb0955
refactor: rename currency_test dataset to international_sales
richardfogaca dca153e
fix(datasets): include currency_code_column in API response for edit …
richardfogaca fae949c
fix(datasets): send null instead of undefined when clearing currency_…
richardfogaca 666ee4a
fix(currency): inject currency_code_column into query for cell-level …
richardfogaca 00b8834
fix(dynamic-currency): limit currency column injection to charts with…
richardfogaca e5336b6
refactor(currency): extract currency detection to shared utility for …
richardfogaca a78594a
test(currency): add unit tests for detect_currency utility
richardfogaca 58b3569
fix(currency): show AUTO option only when dataset has currency_code_c…
richardfogaca 3d8badb
refactor(currency): code clean up and update tests
richardfogaca 19ee4e9
ci(currency): fix mypy issues
richardfogaca 57029e0
chore: rebase with master branch
richardfogaca 3fb5b22
style: rename 'Auto-detect from dataset' to 'Auto-detect'
richardfogaca bc9b3c9
test(currency): restore the original tests in CurrencyFormatter.test.ts
richardfogaca 9e01d32
Merge branch 'master' into feat-dynamic-currency
richardfogaca 086afa7
refactor(currency): code clean up
richardfogaca 54dac48
refactor(currency): several improvements to code quality and clean up
richardfogaca ecb3651
refactor(currency): Removed all stale is_currency_code references
richardfogaca afde8a1
refactor(currency): ensure consistent detected_currency API response
richardfogaca a9d6995
refactor(currency): detectedCurrency property type should be string |…
richardfogaca 81b308c
ci(currency): fix linter issues
richardfogaca fd6fa38
Merge branch 'master' into feat-dynamic-currency
richardfogaca 3f0b5a5
ci(currency): fix linter issues
richardfogaca 0554970
test(currency): fix failing test
richardfogaca 60059ff
refactor(currency): apply bito bot suggestions
richardfogaca 58a21dc
refactor(currency): improvements to dynamic currency logic
richardfogaca 9bd4b7f
refactor(currency): improvements to dynamic currency logic
richardfogaca ed98a32
fix(currency): resolve CI issues - mypy types, ruff imports, and test…
richardfogaca 2cabd2b
ci: trigger actions
richardfogaca c5a8ff1
fix(currency): add currency_code_column to dashboard schema and updat…
richardfogaca e63c34f
ci: trigger pipeline
richardfogaca f0165e5
fix(dataset): skip AUTO currency validation when clearing currency_co…
richardfogaca b5706ec
Merge branch 'master' into feat-dynamic-currency
richardfogaca 5b992bb
test: add coverage for dynamic currency detection feature
richardfogaca ab03cf9
fix(tests): resolve merge conflicts in DatasourceEditor tests
richardfogaca 33ce2b2
fix(currency): replace any types, extract constants, improve code org…
richardfogaca 3c0e6fb
fix(tests): replace any types with proper typing in Timeseries curren…
richardfogaca a06886d
fix(migrations): resolve multiple head revisions by rebasing currency…
richardfogaca 832bd59
fix(prettier): apply prettier formatting
richardfogaca 8abf362
fix(currency): address PR feedback - explicit catch returns, flat tes…
richardfogaca c189974
fix(currency): explicit symbolPosition handling for prefix/suffix wit…
richardfogaca d0ddc8f
fix(DatasourceEditor): use Flex component instead of styled component…
richardfogaca b941688
chore: rebase with master branch
richardfogaca 594238e
fix(datasets): add currency_code_column to ImportV1DatasetSchema for …
richardfogaca 776ab40
fix(currency): show auto currency on table charts
richardfogaca fbd2663
chore: rebase master branch
richardfogaca dabc514
fix(currency): restrict currency column injection to pivot_table_v2 only
richardfogaca 2a9bafe
fix(currency): remove unused currency detection from legacy viz.py path
richardfogaca File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
superset-frontend/packages/superset-ui-core/src/currency-format/CurrencyFormats.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| /** | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| export const AUTO_CURRENCY_SYMBOL = 'AUTO'; | ||
|
|
||
| export const ISO_4217_REGEX = /^[A-Z]{3}$/; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
superset-frontend/packages/superset-ui-core/src/currency-format/types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| /** | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| export type RowDataValue = | ||
| | string | ||
| | number | ||
| | boolean | ||
| | Date | ||
| | bigint | ||
| | null | ||
| | undefined; | ||
|
|
||
| export type RowData = Record<string, RowDataValue>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.