-
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
Wire marker selection to floaters #821
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
d21ccf3
moved all marker selection logic out of MapAnalysis
bobular 5e4dcf6
remove empty array default for selectedMarkers, remove SetStateAction…
bobular 930c8ea
selected markers wired into donut mode
bobular fabc767
selected markers wired into bar and bubble
bobular f5d4b1a
and finally wire in the floaters - easy!
bobular 0e4e94a
Merge remote-tracking branch 'origin/little-filter-refactor' into wir…
bobular 56ed0b9
Merge remote-tracking branch 'origin/main' into wire-marker-selection…
bobular 7e70ca3
missed one prop renaming
bobular 3812c59
Merge remote-tracking branch 'origin/main' into wire-marker-selection…
bobular 6d08637
prevented double-request for histograms by removing 'wait till distri…
bobular 2a8b872
added basic snackbar notification if user selects a marker with no ac…
bobular eb3c244
indication of what's plotted for Histogram viz in Donut mode only at …
bobular d348008
change marker selection behaviour to require shift-click to add to se…
bobular 753c227
relocated snackbars to top center
bobular eb56151
moved selected marker snackbar to a new hook and added shift-key snac…
bobular 8c72316
refine snackbar logic
bobular a97f7a9
fixed the flashing popups after selecting a marker - yay
bobular cbdc210
improved floater subtitle verbiage; tidied up DonutMarkerMapType
bobular fc17a6d
make viz subtitle singular/plural specific
bobular 8df8b6c
add snackbars to bar and bubble
bobular 87b7ae9
fix a histogram runtime bug (double click on marker when another mark…
bobular f0b9859
rolled out plot subtitle to all visualisations; realised TitleOptions…
bobular c98f554
Merge remote-tracking branch 'origin/main' into wire-marker-selection…
bobular 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
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -98,7 +98,7 @@ import { | |
barplotDefaultDependentAxisMinPos, | ||
} from '../../../utils/axis-range-calculations'; | ||
import { createVisualizationPlugin } from '../VisualizationPlugin'; | ||
import { LayoutOptions } from '../../layouts/types'; | ||
import { LayoutOptions, TitleOptions } from '../../layouts/types'; | ||
import { OverlayOptions, RequestOptions } from '../options/types'; | ||
import { useDeepValue } from '../../../hooks/immutability'; | ||
|
||
|
@@ -138,6 +138,7 @@ export const barplotVisualization = createVisualizationPlugin({ | |
interface Options | ||
extends LayoutOptions, | ||
OverlayOptions, | ||
TitleOptions, | ||
RequestOptions<BarplotConfig, {}, BarplotRequestParams> {} | ||
|
||
function FullscreenComponent(props: VisualizationProps<Options>) { | ||
|
@@ -902,6 +903,7 @@ function BarplotViz(props: VisualizationProps<Options>) { | |
.every((reqdVar) => !!(vizConfig as any)[reqdVar[0]]); | ||
|
||
const LayoutComponent = options?.layoutComponent ?? PlotLayout; | ||
const plotSubtitle = options?.getPlotSubtitle?.(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see standaloneVisPlugins.ts |
||
|
||
return ( | ||
<div style={{ display: 'flex', flexDirection: 'column' }}> | ||
|
@@ -935,7 +937,11 @@ function BarplotViz(props: VisualizationProps<Options>) { | |
|
||
<PluginError error={data.error} outputSize={outputSize} /> | ||
{!hideInputsAndControls && ( | ||
<OutputEntityTitle entity={outputEntity} outputSize={outputSize} /> | ||
<OutputEntityTitle | ||
entity={outputEntity} | ||
outputSize={outputSize} | ||
subtitle={plotSubtitle} | ||
/> | ||
)} | ||
<LayoutComponent | ||
isFaceted={isFaceted(data.value)} | ||
|
This file contains 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.
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.
useCallback doesn't seem essential but seems sensible given it is debounced and this may avoid the debouncing being reset unnecessarily.
Especially as we are adding
selectedMarkers
to the function. Previously we were using "functional update"prevSelectedMarkers