Skip to content

Commit 4c2b2cc

Browse files
authored
Merge branch 'alpha' into workspace-v2
2 parents 1ec18bb + 6e0881c commit 4c2b2cc

File tree

8 files changed

+70
-6
lines changed

8 files changed

+70
-6
lines changed

.github/workflows/release-automated.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
persist-credentials: false
1414
- uses: actions/setup-node@v2
1515
with:
16-
node-version: 14
16+
node-version: 18
1717
registry-url: https://registry.npmjs.org/
1818
- name: Cache Node.js modules
1919
uses: actions/cache@v2

changelogs/CHANGELOG_alpha.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# [6.0.0-alpha.3](https://github.com/ParsePlatform/parse-dashboard/compare/6.0.0-alpha.2...6.0.0-alpha.3) (2024-04-30)
2+
3+
4+
### Features
5+
6+
* Select rows in data browser by clicking and dragging mouse cursor over checkboxes ([#2548](https://github.com/ParsePlatform/parse-dashboard/issues/2548)) ([792ba9e](https://github.com/ParsePlatform/parse-dashboard/commit/792ba9e619224c6101ed21cd36add9fe83c3e348))
7+
8+
# [6.0.0-alpha.2](https://github.com/ParsePlatform/parse-dashboard/compare/6.0.0-alpha.1...6.0.0-alpha.2) (2024-04-30)
9+
10+
11+
### Bug Fixes
12+
13+
* Class Level Permissions dialog throws error `TypeError: ce.current is null` for newly created class ([#2549](https://github.com/ParsePlatform/parse-dashboard/issues/2549)) ([27ed692](https://github.com/ParsePlatform/parse-dashboard/commit/27ed6920d38bfe6476aaf2cebd4124dc30389959))
14+
115
# [6.0.0-alpha.1](https://github.com/ParsePlatform/parse-dashboard/compare/5.4.0-alpha.8...6.0.0-alpha.1) (2024-03-05)
216

317

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "parse-dashboard",
3-
"version": "6.0.0-alpha.1",
3+
"version": "6.0.0-alpha.3",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/ParsePlatform/parse-dashboard"

src/components/BrowserRow/BrowserRow.react.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ export default class BrowserRow extends Component {
4242
setContextMenu,
4343
onFilterChange,
4444
markRequiredFieldRow,
45+
onMouseDownRowCheckBox,
46+
onMouseUpRowCheckBox,
47+
onMouseOverRowCheckBox,
4548
} = this.props;
4649
const attributes = obj.attributes;
4750
let requiredCols = [];
@@ -62,11 +65,16 @@ export default class BrowserRow extends Component {
6265
}
6366
return (
6467
<div className={styles.tableRow} style={{ minWidth: rowWidth }}>
65-
<span className={styles.checkCell}>
68+
<span
69+
className={styles.checkCell}
70+
onMouseUp={onMouseUpRowCheckBox}
71+
onMouseOver={() => onMouseOverRowCheckBox(obj.id)}
72+
>
6673
<input
6774
type="checkbox"
6875
checked={selection['*'] || selection[obj.id]}
6976
onChange={e => selectRow(obj.id, e.target.checked)}
77+
onMouseDown={(e) => onMouseDownRowCheckBox(e.target.checked)}
7078
/>
7179
</span>
7280
{order.map(({ name, width, visible }, j) => {

src/dashboard/Data/Browser/Browser.react.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ class Browser extends DashboardView {
9898
currentUser: Parse.User.current(),
9999

100100
processedScripts: 0,
101+
102+
rowCheckboxDragging: false,
103+
draggedRowSelection: false,
101104
};
102105

103106
this.addLocation = this.addLocation.bind(this);
@@ -163,6 +166,9 @@ class Browser extends DashboardView {
163166
this.abortEditCloneRow = this.abortEditCloneRow.bind(this);
164167
this.cancelPendingEditRows = this.cancelPendingEditRows.bind(this);
165168
this.redirectToFirstClass = this.redirectToFirstClass.bind(this);
169+
this.onMouseDownRowCheckBox = this.onMouseDownRowCheckBox.bind(this);
170+
this.onMouseUpRowCheckBox = this.onMouseUpRowCheckBox.bind(this);
171+
this.onMouseOverRowCheckBox = this.onMouseOverRowCheckBox.bind(this);
166172

167173
this.dataBrowserRef = React.createRef();
168174

@@ -189,10 +195,12 @@ class Browser extends DashboardView {
189195

190196
componentDidMount() {
191197
this.addLocation(this.props.params.appId);
198+
window.addEventListener('mouseup', this.onMouseUpRowCheckBox);
192199
}
193200

194201
componentWillUnmount() {
195202
this.removeLocation();
203+
window.removeEventListener('mouseup', this.onMouseUpRowCheckBox);
196204
}
197205

198206
componentWillReceiveProps(nextProps, nextContext) {
@@ -368,6 +376,7 @@ class Browser extends DashboardView {
368376
this.props.schema
369377
.dispatch(ActionTypes.CREATE_CLASS, { className })
370378
.then(() => {
379+
this.state.clp[className] = this.props.schema.data.get('CLPs').toJS()[className];
371380
this.state.counts[className] = 0;
372381
this.props.navigate(generatePath(this.context, 'browser/' + className));
373382
})
@@ -380,6 +389,7 @@ class Browser extends DashboardView {
380389
this.props.schema.dispatch(ActionTypes.DROP_CLASS, { className }).then(
381390
() => {
382391
this.setState({ showDropClassDialog: false });
392+
delete this.state.clp[className];
383393
delete this.state.counts[className];
384394
this.props.navigate(generatePath(this.context, 'browser'));
385395
},
@@ -1788,6 +1798,26 @@ class Browser extends DashboardView {
17881798
this.setState({ showPointerKeyDialog: false });
17891799
}
17901800

1801+
onMouseDownRowCheckBox(checked) {
1802+
this.setState({
1803+
rowCheckboxDragging: true,
1804+
draggedRowSelection: !checked,
1805+
});
1806+
}
1807+
1808+
onMouseUpRowCheckBox() {
1809+
this.setState({
1810+
rowCheckboxDragging: false,
1811+
draggedRowSelection: false,
1812+
});
1813+
}
1814+
1815+
onMouseOverRowCheckBox(id) {
1816+
if (this.state.rowCheckboxDragging) {
1817+
this.selectRow(id, this.state.draggedRowSelection);
1818+
}
1819+
}
1820+
17911821
renderContent() {
17921822
let browser = null;
17931823
let className = this.props.params.className;
@@ -1907,6 +1937,9 @@ class Browser extends DashboardView {
19071937
onAddRowWithModal={this.addRowWithModal}
19081938
onAddClass={this.showCreateClass}
19091939
showNote={this.showNote}
1940+
onMouseDownRowCheckBox={this.onMouseDownRowCheckBox}
1941+
onMouseUpRowCheckBox={this.onMouseUpRowCheckBox}
1942+
onMouseOverRowCheckBox={this.onMouseOverRowCheckBox}
19101943
/>
19111944
);
19121945
}

src/dashboard/Data/Browser/BrowserTable.react.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ export default class BrowserTable extends React.Component {
170170
scripts={this.context.scripts}
171171
selectedCells={this.props.selectedCells}
172172
handleCellClick={this.props.handleCellClick}
173+
onMouseDownRowCheckBox={this.props.onMouseDownRowCheckBox}
174+
onMouseUpRowCheckBox={this.props.onMouseUpRowCheckBox}
175+
onMouseOverRowCheckBox={this.props.onMouseOverRowCheckBox}
173176
/>
174177
<Button
175178
value="Clone"
@@ -240,6 +243,9 @@ export default class BrowserTable extends React.Component {
240243
scripts={this.context.scripts}
241244
selectedCells={this.props.selectedCells}
242245
handleCellClick={this.props.handleCellClick}
246+
onMouseDownRowCheckBox={this.props.onMouseDownRowCheckBox}
247+
onMouseUpRowCheckBox={this.props.onMouseUpRowCheckBox}
248+
onMouseOverRowCheckBox={this.props.onMouseOverRowCheckBox}
243249
/>
244250
<Button
245251
value="Add"
@@ -318,6 +324,9 @@ export default class BrowserTable extends React.Component {
318324
scripts={this.context.scripts}
319325
selectedCells={this.props.selectedCells}
320326
handleCellClick={this.props.handleCellClick}
327+
onMouseDownRowCheckBox={this.props.onMouseDownRowCheckBox}
328+
onMouseUpRowCheckBox={this.props.onMouseUpRowCheckBox}
329+
onMouseOverRowCheckBox={this.props.onMouseOverRowCheckBox}
321330
/>
322331
);
323332
}

src/dashboard/Data/Browser/BrowserToolbar.react.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ const BrowserToolbar = ({
341341
disabled={isPendingEditCloneRows}
342342
/>
343343
{onAddRow && <div className={styles.toolbarSeparator} />}
344-
{perms && enableSecurityDialog ? (
344+
{enableSecurityDialog ? (
345345
<SecurityDialog
346346
ref={clpDialogRef}
347347
disabled={!!relation || !!isUnique}

0 commit comments

Comments
 (0)