-
Notifications
You must be signed in to change notification settings - Fork 0
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
CADENZA-33417 [Embedding FA] Parameters to control table contents #10
Conversation
2c7eb37
to
592650d
Compare
I've addressed all comments added up to now. Thanks @jkissel ! |
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 now (y)
src/cadenza.js
Outdated
@@ -608,6 +616,26 @@ function validGeometryType(/** @type string */ value) { | |||
].includes(value); | |||
} | |||
|
|||
/** @typedef {'columns' | 'values' | 'totals'} TablePart - A part of a table to export. */ | |||
|
|||
const TablePart = /** @type {Record<string, TablePart>} */ { |
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 mapping is unused in Cadenza JS, an array of the values would be sufficient.
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.
Should the client code be able to use those constants? (if our code does not use them directly)
I can remove them just making sure it is really intended to obliterate them.
I see for geometries we do not have defined individual constants just an array of the possible values (as you suggest here) but for MediaTypes we have constants (which we also use in our code directly). Which of the 2 approaches is best?
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 geometry types are used inside of the lib. If clients should be able to use this mapping, it needs to be exported and should be marked as @readonly and really made readonly using Object.freeze().
592650d
to
5ea8c57
Compare
* add optional 'parts' parameter to #fetchData and #downloadData
5ea8c57
to
32cd8ba
Compare
|
||
const tableData = await response.json(); | ||
... | ||
``` |
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.
Nice example 👍
src/cadenza.js
Outdated
@@ -608,6 +616,26 @@ function validGeometryType(/** @type string */ value) { | |||
].includes(value); | |||
} | |||
|
|||
/** @typedef {'columns' | 'values' | 'totals'} TablePart - A part of a table to export. */ | |||
|
|||
const TablePart = /** @type {Record<string, TablePart>} */ { |
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 geometry types are used inside of the lib. If clients should be able to use this mapping, it needs to be exported and should be marked as @readonly and really made readonly using Object.freeze().
Thanks @jkissel ! |
Add optional 'parts' parameter to #fetchData and #downloadData
https://jira.disy.net/browse/CADENZA-33417