Skip to content

Commit 315ec44

Browse files
committed
more antd conversion; but also some reverting back due to push/pull
1 parent 3e820ce commit 315ec44

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed

src/packages/frontend/antd-bootstrap.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,11 @@ export function Col(props: {
304304
className?: string;
305305
onClick?;
306306
children?: any;
307+
push?;
308+
pull?;
307309
}) {
308310
const props2: any = {};
309-
for (const p of ["xs", "sm", "md", "lg"]) {
311+
for (const p of ["xs", "sm", "md", "lg", "push", "pull"]) {
310312
if (props[p] != null) {
311313
if (props2[p] == null) {
312314
props2[p] = {};

src/packages/frontend/project/explorer/file-listing/file-row.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
import { Button, Popover } from "antd";
77
import memoizeOne from "memoize-one";
8-
import { Col, Row } from "@cocalc/frontend/antd-bootstrap";
8+
// tricky to convert to antd due to use of smPull and smPush
9+
import { Col, Row } from "react-bootstrap";
910
import { CSS, React, useState } from "@cocalc/frontend/app-framework";
1011
import { Icon, IconName, TimeAgo, Tip } from "@cocalc/frontend/components";
1112
import { useStudentProjectFunctionality } from "@cocalc/frontend/course";
@@ -201,7 +202,7 @@ export const FileRow: React.FC<Props> = React.memo((props) => {
201202
props.actions.open_file({
202203
path,
203204
foreground,
204-
explicit: true,
205+
explicit:true,
205206
});
206207
if (foreground) {
207208
props.actions.set_file_search("");
@@ -355,7 +356,7 @@ export const FileRow: React.FC<Props> = React.memo((props) => {
355356
<Col sm={1} xs={3} onClick={handle_click}>
356357
{render_icon()}
357358
</Col>
358-
<Col sm={4} xs={6}>
359+
<Col sm={4} smPush={5} xs={6}>
359360
{render_timestamp()}
360361
{props.isdir ? (
361362
<>
@@ -368,7 +369,7 @@ export const FileRow: React.FC<Props> = React.memo((props) => {
368369
</span>
369370
)}
370371
</Col>
371-
<Col sm={5} xs={12} onClick={handle_click}>
372+
<Col sm={5} smPull={4} xs={12} onClick={handle_click}>
372373
{render_name()}
373374
</Col>
374375
</Row>

src/packages/frontend/project/explorer/file-listing/listing-header.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
import React from "react";
77
import { TypedMap } from "@cocalc/frontend/app-framework";
88
import { Icon, Gap } from "@cocalc/frontend/components";
9-
import { Col, Row } from "@cocalc/frontend/antd-bootstrap";
9+
// tricky to convert to antd due to use of smPull and smPush
10+
import { Col, Row } from "react-bootstrap";
1011

1112
// TODO: Flatten active_file_sort for easy PureComponent use
1213
interface Props {
@@ -59,13 +60,13 @@ export const ListingHeader: React.FC<Props> = (props: Props) => {
5960
<Col sm={1} xs={3}>
6061
{render_sort_link("type", "Type")}
6162
</Col>
62-
<Col sm={4} xs={6}>
63+
<Col sm={4} smPush={5} xs={6}>
6364
{render_sort_link("time", "Date Modified")}
6465
<span className="pull-right">
6566
{render_sort_link("size", "Size/Download/View")}
6667
</span>
6768
</Col>
68-
<Col sm={5} xs={12}>
69+
<Col sm={5} smPull={4} xs={12}>
6970
{render_sort_link("name", "Name")}
7071
</Col>
7172
</Row>

src/packages/frontend/project/settings/body.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
import React from "react";
7-
import { Col, Row } from "react-bootstrap";
7+
import { Col, Row } from "@cocalc/frontend/antd-bootstrap";
88
import { redux, useTypedRedux } from "@cocalc/frontend/app-framework";
99
import { Icon } from "@cocalc/frontend/components";
1010
import { getStudentProjectFunctionality } from "@cocalc/frontend/course";

src/packages/frontend/project/settings/sagews-control.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
*/
55

66
import React from "react";
7-
import { Button } from "react-bootstrap";
8-
7+
import { Button } from "@cocalc/frontend/antd-bootstrap";
98
import { alert_message } from "@cocalc/frontend/alerts";
109
import { useIsMountedRef } from "@cocalc/frontend/app-framework";
1110
import {

0 commit comments

Comments
 (0)