Merge pull request #1332 from ONLYOFFICE/feature/row-table-styles

Removed incorrect styles for my documents, rooms, accounts
This commit is contained in:
Alexey Safronov 2023-04-07 14:20:47 +04:00 committed by GitHub
commit d2703cf4e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 135 deletions

View File

@ -43,7 +43,7 @@ const StyledRowContainer = styled(RowContainer)`
.user-row { .user-row {
border-top: ${(props) => border-top: ${(props) =>
`1px ${props.theme.filesSection.tableView.row.borderColor} solid`}; `1px ${props.theme.filesSection.tableView.row.borderColor} solid`};
margin-top: -4px; margin-top: -3px;
${marginStyles} ${marginStyles}
} }
@ -53,7 +53,7 @@ const StyledRowContainer = styled(RowContainer)`
.user-row { .user-row {
border-top: ${(props) => border-top: ${(props) =>
`1px ${props.theme.filesSection.tableView.row.borderColor} solid`}; `1px ${props.theme.filesSection.tableView.row.borderColor} solid`};
margin-top: -4px; margin-top: -3px;
${marginStyles} ${marginStyles}
} }
@ -70,7 +70,7 @@ const StyledRowContainer = styled(RowContainer)`
border-bottom: ${(props) => border-bottom: ${(props) =>
`1px ${props.theme.filesSection.tableView.row.borderColor} solid`}; `1px ${props.theme.filesSection.tableView.row.borderColor} solid`};
padding-bottom: 1px; padding-bottom: 1px;
padding-top: 1px;
${marginStyles} ${marginStyles}
} }
.user-row::after { .user-row::after {
@ -81,61 +81,11 @@ const StyledRowContainer = styled(RowContainer)`
.user-row { .user-row {
border-top: ${(props) => border-top: ${(props) =>
`1px ${props.theme.filesSection.tableView.row.borderColor} solid`}; `1px ${props.theme.filesSection.tableView.row.borderColor} solid`};
margin-top: -4px; margin-top: -3px;
${marginStyles} ${marginStyles}
} }
} }
.row-selected {
.user-row {
.styled-element {
padding-top: 1px;
}
}
}
@media (max-width: 1024px) {
.row-selected {
.user-row {
margin-top: -3px !important;
padding-bottom: 0.8px !important;
padding-top: 0.8px !important;
.styled-element {
padding-bottom: 0.8px;
.owner_icon {
padding-bottom: 0.8px;
}
}
.expandButton {
padding-bottom: 0.8px;
}
.mainIcons {
.paid-badge {
margin-top: -1px;
}
}
}
}
}
${(props) =>
props.sectionWidth <= 500 &&
css`
.row-selected {
.user-row {
.mainIcons {
.paid-badge {
margin-top: 0.8px !important;
}
}
}
}
`}
`; `;
const PeopleRowContainer = ({ const PeopleRowContainer = ({
@ -174,8 +124,7 @@ const PeopleRowContainer = ({
hasMoreFiles={hasMoreAccounts} hasMoreFiles={hasMoreAccounts}
itemCount={filterTotal} itemCount={filterTotal}
filesLength={peopleList.length} filesLength={peopleList.length}
itemHeight={57.6} itemHeight={58}
sectionWidth={sectionWidth}
> >
{peopleList.map((item) => ( {peopleList.map((item) => (
<SimpleUserRow <SimpleUserRow

View File

@ -70,58 +70,12 @@ const StyledSimpleUserRow = styled(Row)`
cursor: pointer; cursor: pointer;
${checkedStyle} ${checkedStyle}
@media (min-width: 1024px) { margin-top: -3px;
margin-top: -4px !important; padding-bottom: 1px;
padding-top: 1px; border-top: ${(props) =>
padding-bottom: 1px; `1px ${props.theme.filesSection.tableView.row.borderColor} solid`};
border-bottom: ${(props) =>
border-top: ${(props) => `1px ${props.theme.filesSection.tableView.row.borderColor} solid`};
`1px ${props.theme.filesSection.tableView.row.borderColor} solid`};
border-bottom: ${(props) =>
`1px ${props.theme.filesSection.tableView.row.borderColor} solid`};
.styled-checkbox-container {
.styled-element {
padding-top: 1px;
}
}
}
@media (max-width: 1024px) {
margin-top: -3px !important;
padding-top: 0.8px;
padding-bottom: 0.8px;
border-top: ${(props) =>
`1px ${props.theme.filesSection.tableView.row.borderColor} solid`};
border-bottom: ${(props) =>
`1px ${props.theme.filesSection.tableView.row.borderColor} solid`};
.owner_icon {
padding-bottom: 0.8px;
}
.mainIcons {
.paid-badge {
margin-top: -1px;
}
}
.expandButton {
padding-bottom: 0.8px;
}
}
${(props) =>
props.sectionWidth <= 500 &&
css`
.mainIcons {
.paid-badge {
margin-top: 0.8px !important;
}
}
`}
} }
`} `}

View File

@ -43,24 +43,6 @@ const StyledTableContainer = styled(TableContainer)`
.table-container_row-context-menu-wrapper { .table-container_row-context-menu-wrapper {
${contextCss} ${contextCss}
} }
.table-container_cell {
.paid-badge {
p {
padding-top: 1px;
}
}
}
}
:hover {
.table-container_cell {
.paid-badge {
p {
padding-top: 1px;
}
}
}
} }
.table-row-selected + .table-row-selected { .table-row-selected + .table-row-selected {

View File

@ -29,12 +29,6 @@ const StyledPeopleRow = styled(TableRow)`
border-top: ${(props) => border-top: ${(props) =>
`1px solid ${props.theme.filesSection.tableView.row.borderColor}`}; `1px solid ${props.theme.filesSection.tableView.row.borderColor}`};
margin-top: -1px; margin-top: -1px;
.paid-badge {
p {
padding-top: 1px;
}
}
} }
.table-container_user-name-cell { .table-container_user-name-cell {
@ -344,7 +338,6 @@ const PeopleTableRow = (props) => {
hasAccess={true} hasAccess={true}
className="table-container_row-checkbox-wrapper" className="table-container_row-checkbox-wrapper"
checked={isChecked} checked={isChecked}
style={{ borderBottom: "none" }}
> >
<div className="table-container_element">{element}</div> <div className="table-container_element">{element}</div>
<Checkbox <Checkbox

View File

@ -7,7 +7,7 @@ import styled, { css } from "styled-components";
import marginStyles from "./CommonStyles"; import marginStyles from "./CommonStyles";
import { isTablet } from "@docspace/components/utils/device"; import { isTablet } from "@docspace/components/utils/device";
import { Base } from "@docspace/components/themes"; import { Base } from "@docspace/components/themes";
import { tablet } from "@docspace/components/utils/device";
const StyledRowContainer = styled(RowContainer)` const StyledRowContainer = styled(RowContainer)`
.row-list-item:first-child { .row-list-item:first-child {
.row-selected { .row-selected {

View File

@ -36,7 +36,6 @@ const FileNameCell = ({
className="table-container_element-wrapper" className="table-container_element-wrapper"
hasAccess={true} hasAccess={true}
checked={checked} checked={checked}
style={{ borderBottom: "none" }}
> >
<div className="table-container_element-container"> <div className="table-container_element-container">
<div className="table-container_element">{element}</div> <div className="table-container_element">{element}</div>