-
Notifications
You must be signed in to change notification settings - Fork 541
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
Dynamic groups #2934
Dynamic groups #2934
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## feature/dynamic-groups #2934 +/- ##
===========================================================
- Coverage 99.44% 62.67% -36.77%
===========================================================
Files 22 263 +241
Lines 11843 45289 +33446
Branches 0 353 +353
===========================================================
+ Hits 11777 28385 +16608
- Misses 66 16904 +16838
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
db54811
to
4a7f7d5
Compare
app/packages/core/src/components/Actions/DynamicGroupAction.tsx
Outdated
Show resolved
Hide resolved
ce35fe6
to
91dc34d
Compare
Co-authored-by: Benjamin Kane <[email protected]>
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!
|
||
{!shouldSplitVertically && is3DVisible && <GroupSample3d />} | ||
</div> | ||
{subBar ?? subBar} |
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 don't use nullish coalescing very often, so I may be missing something, but this seems like it has no effect
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.
Meant to do &&
this.element.classList.add(flashlight); | ||
this.state = this.getEmptyState(config); | ||
|
||
document.addEventListener("visibilitychange", () => this.render()); | ||
|
||
if (config.enableKeyNavigation) { |
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 may update this in my current grid work, looks good for the feature. But it looks horizontal mode specific, and I think document keyboard event listeners can cause regressions
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'll add a guard for horizontal nav
if (e.key === config.enableKeyNavigation.previousKey) { | ||
e.preventDefault(); | ||
config.enableKeyNavigation.navigationCallback(true); | ||
this.container.scrollLeft -= 316; |
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.
Is this arbitrary? A comment may help
paths, | ||
root = false, | ||
mixed = false, | ||
customView = undefined, |
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.
Could be added to the variables type with a union
({ get }) => { | ||
const aggregations = get( | ||
aggregationQuery({ | ||
customView: get(viewAtoms.dynamicGroupViewQuery(groupByValue)), |
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.
type error from above
const groupStats = useRecoilValue(groupStatistics(false)); | ||
|
||
const shouldShowSliceSelector = useMemo( | ||
() => isGroup && groupSlices.length > 0, |
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.
Could be wrong, but should it be > 1
?
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 for leaving the comments. Will address comments in another PR. |
What changes are proposed in this pull request?
Notes to the reviewer:
app/packages/core/src/components/Modal/Group/DynamicGroup
directoryHow is this patch tested? If it is not, please explain why.
Dataset for testing was generated using the following snippet. Every th samples are folded into a group (here, 25).
Release Notes
Is this a user-facing change that should be mentioned in the release notes?
notes for FiftyOne users.
(Details in 1-2 sentences. You can just refer to another PR with a description
if this PR is part of a larger change.)
What areas of FiftyOne does this PR affect?
fiftyone
Python library changes