-
Notifications
You must be signed in to change notification settings - Fork 1
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
[GS-8040] Add open upper bound capability to step
query
#255
Conversation
🦋 Changeset detectedLatest commit: c8c83a9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
b7c9085
to
98299f3
Compare
Coverage after merging GS-8040/pop-filter-enhancements into main will be
Coverage Report
|
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.
LGTM, thanks @JBezerra!
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.
With the removal of steps
from the node, this step
filter is even closer to the number
filter so we should consolidate the implementation.
We can do this by adding a flag calculateRangeTotal
to the number
node which defaults to false
(to preserve current behavior). Ex:
let result = async(node, search) {
return F.compactObject({
// Preserve existing best range functionality
bestRange: node.findBestRange && (await findBestRange()),
// Add ability to calculate the range total
rangeTotal: node.calculateRangeTotal && (await calculateRangeTotal())
})
}
Update
Ignore my comment above. There is a product requirement for users to be able to switch between the default number component and the slider component and currently that's only supported with different node types so we cannot consolidate step
and number
for now.
range: { [field]: pickSafeNumbers({ gte: min }) }, | ||
} | ||
} | ||
|
||
return { | ||
range: { [field]: pickSafeNumbers({ gte: min, lte: max }) }, |
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.
suggestion: Delete getMinAndMax
function.
range: { [field]: pickSafeNumbers({ gte: min, lte: max }) }, | |
range: { [field]: pickSafeNumbers({ gte: range[0], lte: range[1] }) }, |
}, | ||
}, | ||
} | ||
} | ||
|
||
let result = async (node, search) => { | ||
let { field, range, steps } = node | ||
const result = await search(buildQuery(field, range, steps)) | ||
let { field, range } = node |
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.
suggestion: Preserve the number
API
The number
type uses min
/max
instead of range
.
GS-8040
Context
In order to have a controlled way to add/remove an extra step with an open upper bound at the Step Slider component, we need to implement that capability on the
step
query as well.In order to have better understanding how to link the changes of this PR to your local spark, please read the docs.
TL;DR Version
On Spark
On Contexture
On WebApp
Population Count
filter to your Spending page.Demo
2024-08-28.15-19-08.mp4