-
Notifications
You must be signed in to change notification settings - Fork 15
FIREFLY-1954: React Split Pane version upgrade #1977
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
base: dev
Are you sure you want to change the base?
Changes from all commits
0d0f3e2
f4fea1e
d6d6552
6a54f2c
aaaf13f
616c440
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,7 +61,7 @@ export const PinnedChartContainer = (props) => { | |
| return ( | ||
| <Stack id='chart-pinned-sideBySide' overflow='hidden' flexGrow={1}> | ||
| <Stack flexGrow={1} position='relative'> | ||
| <SplitPanel split='vertical' defaultSize={400} style={{display: 'inline-flex'}} pKey='chart-sideBySide'> | ||
| <SplitPanel direction='horizontal' defaultSize={400} style={{display: 'inline-flex'}} pKey='chart-sideBySide'> | ||
|
Contributor
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. This strikes me as unexpected. did the layout change?
Contributor
Author
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 below, layout remains the same. Just the meaning of vertical/horizontal is swapped. |
||
| <Stack> | ||
| <Typography level='title-md'> | ||
| {activeLabel} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,13 +6,12 @@ import React, {useEffect, useRef} from 'react'; | |
| import PropTypes from 'prop-types'; | ||
| import {Box, Button, Link, Sheet, Stack, Typography} from '@mui/joy'; | ||
| import {cloneDeep, get} from 'lodash'; | ||
| import SplitPane from 'react-split-pane'; | ||
| import Tree from 'rc-tree'; | ||
| import 'rc-tree/assets/index.css'; | ||
|
|
||
| import {FilterInfo, getFiltersAsSql} from '../FilterInfo.js'; | ||
| import {getTableUiById, getSqlFilter, DOC_FUNCTIONS_URL} from '../TableUtil.js'; | ||
| import {SplitContent} from '../../ui/panel/DockLayoutPanel.jsx'; | ||
| import {SplitPanel, SplitContent} from '../../ui/panel/DockLayoutPanel.jsx'; | ||
| import {InputAreaFieldConnected} from '../../ui/InputAreaField.jsx'; | ||
| import {RadioGroupInputField} from '../../ui/RadioGroupInputField.jsx'; | ||
| import {insertAtCursor} from '../../ui/tap/AdvancedADQL.jsx'; | ||
|
|
@@ -105,10 +104,10 @@ export function SqlTableFilter({tbl_ui_id, tbl_id, onChange, style={}, samples, | |
| placeholder = placeholder || 'e.g., "ra" > 180 AND "ra" < 185'; | ||
|
|
||
| return ( | ||
| <SplitPane split='vertical' defaultSize={200} style={{display: 'inline-flex', ...style}}> | ||
| <SplitPanel direction='horizontal' defaultSize={200} style={{display: 'inline-flex', ...style}} pKey='filter-editor'> | ||
|
Contributor
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. again, when did
Contributor
Author
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. Yes so this is a big (but easy) change from v0.x to v3.x, they swapped |
||
| <SplitContent style={{display: 'flex', flexDirection: 'column'}}> | ||
| <Typography level='title-md'>Columns (sorted)</Typography> | ||
| <Box style={{overflow: 'auto', flexGrow: 1}}> | ||
| <Box style={{overflow: 'auto', flexGrow: 1}}> | ||
| <Tree defaultExpandAll showLine onSelect={onNodeClick} icon={iconGen} treeData={treeData}/> | ||
| </Box> | ||
| </SplitContent> | ||
|
|
@@ -152,7 +151,7 @@ export function SqlTableFilter({tbl_ui_id, tbl_id, onChange, style={}, samples, | |
| </Stack> | ||
| </Stack> | ||
| </SplitContent> | ||
| </SplitPane> | ||
| </SplitPanel> | ||
| ); | ||
| } | ||
|
|
||
|
|
||
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.
We generally pin the minor version too since some packages introduce breaking change in minor version too (not sure about react-split-pane, looks stable enough) and hence use
~instead of^. We had a long discussion over this last time I had to update package.json 😅 and I added that to our dev documentation.