-
Notifications
You must be signed in to change notification settings - Fork 24
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
PORTALS-2651 - Synapse Tables-related components #1542
Conversation
nickgros
commented
Jan 31, 2025
- ColumnSelection: convert from react-bootstrap Dropdown to MUI MenuItems
- DownloadOptions: convert from react-bootstrap Dropdown to MUI MenuItems
- FacetNavPanel: convert from react-bootstrap Dropdown to MUI Select
- EnumFacetFilterDropdown: convert from react-bootstrap Dropdown to MUI Select
- Update ElementWithTooltip to remove react-bootstrap
- ThemesPlot, SelectionCriteriaPill, FacetPlotLegendList: Replace ElementWithTooltip with simple MUI Tooltip
- ColumnSelection: convert from react-bootstrap Dropdown to MUI MenuItems - DownloadOptions: convert from react-bootstrap Dropdown to MUI MenuItems - FacetNavPanel: convert from react-bootstrap Dropdown to MUI Select - EnumFacetFilterDropdown: convert from react-bootstrap Dropdown to MUI Select - Update ElementWithTooltip to remove react-bootstrap - ThemesPlot, SelectionCriteriaPill, FacetPlotLegendList: Replace ElementWithTooltip with simple MUI Tooltip
@@ -338,10 +326,9 @@ export function ThemesPlot({ | |||
}} | |||
> | |||
<div className="ThemesPlot__dotPlot__barColumn"> | |||
<ElementWithTooltip |
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.
No need to use the complicated ElementWithTooltip
, just use MUI Tooltip
return ( | ||
<Dropdown |
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.
Replace dropdown with MUI MenuItem
s
} | ||
|
||
const tooltipColumnSelectionId = 'addAndRemoveColumns' | ||
|
||
export function ColumnSelection(props: ColumnSelectionProps) { |
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.
<Dropdown.Menu | ||
className="SRC-primary-color-hover-dropdown" | ||
alignRight={true} | ||
const downloadMenuItems: ReactNode[] = useMemo(() => { |
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.
@@ -338,27 +345,18 @@ function FacetNavPanel(props: FacetNavPanelProps) { | |||
|
|||
/* rendering functions */ | |||
const chartSelectionToggle = ( |
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.
<Stack gap={2}> | ||
<StyledFormControl> | ||
<InputLabel | ||
sx={{ display: 'flex', alignItems: 'center', gap: 0.5 }} | ||
> | ||
<span>Filter All Data By</span> | ||
<Tooltip title="Selecting items in this dropdown will affect all facets on the Explore page."> | ||
<InfoOutlined className="SRC-hand-cursor SRC-secondary-text-color" /> | ||
</Tooltip> | ||
</InputLabel> | ||
<EnumFacetFilter | ||
facet={facetToPlot} | ||
containerAs="Dropdown" | ||
dropdownType="SelectBox" | ||
/> | ||
<Tooltip title="Selecting items in this dropdown will affect all facets on the Explore page."> | ||
<InfoOutlined className="SRC-hand-cursor SRC-secondary-text-color" /> | ||
</Tooltip> | ||
</div> | ||
</StyledFormControl> | ||
{chartSelectionToggle} | ||
</> | ||
</Stack> |
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.
<Select | ||
className={'EnumFacetFilter EnumFacetFilterSelect'} | ||
show={isShowDropdown} | ||
onToggle={onToggle} | ||
value={menuText} | ||
renderValue={() => menuText} | ||
onChange={() => { | ||
// noop - the children will handle change events | ||
}} | ||
> | ||
<Dropdown.Toggle className="secondary-caret" variant="gray-select"> | ||
{menuText} | ||
</Dropdown.Toggle> | ||
<Dropdown.Menu>{children}</Dropdown.Menu> | ||
</Dropdown> | ||
{/* Hack to prevent Select warnings - add a hidden MenuItem */} | ||
<MenuItem value={menuText} sx={{ display: 'none' }} /> | ||
<Box | ||
sx={{ | ||
// hack to expand the dropdown menu width for this component only | ||
'& .EnumFacetFilter__dropdown_menu': { | ||
maxWidth: '100%', | ||
}, | ||
}} | ||
> | ||
{children} | ||
</Box> | ||
</Select> |
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.