Skip to content

Commit

Permalink
Remove vertical lines (#4914)
Browse files Browse the repository at this point in the history
Co-authored-by: Paweł Chyła <[email protected]>
  • Loading branch information
andrzejewsky and poulch authored Jun 4, 2024
1 parent d068eba commit f95fcc4
Show file tree
Hide file tree
Showing 18 changed files with 22 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .changeset/stale-tigers-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": minor
---

Vertical lines are no longer visible for read-only grid tables
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const AttributeListDatagrid = ({
hasRowHover={true}
onColumnMoved={handlers.onMove}
onColumnResize={handlers.onResize}
verticalBorder={col => col > 0}
verticalBorder={false}
rows={attributes?.length ?? 0}
availableColumns={visibleColumns}
emptyText={intl.formatMessage(messages.empty)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const CategoryListDatagrid = ({
hasRowHover={hasRowHover}
loading={disabled}
columnSelect={sort !== undefined ? "single" : undefined}
verticalBorder={col => col > 0}
verticalBorder={false}
rowMarkers="checkbox-visible"
availableColumns={visibleColumns}
rows={categories?.length ?? 0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export const CollectionListDatagrid = ({
hasRowHover={hasRowHover}
onColumnMoved={handlers.onMove}
onColumnResize={handlers.onResize}
verticalBorder={col => col > 0}
verticalBorder={false}
rows={collections?.length ?? 0}
availableColumns={visibleColumns}
emptyText={intl.formatMessage(messages.empty)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const CustomerListDatagrid = ({
hasRowHover={hasRowHover}
onColumnMoved={handlers.onMove}
onColumnResize={handlers.onResize}
verticalBorder={col => col > 0}
verticalBorder={false}
rows={customers?.length ?? 0}
availableColumns={visibleColumns}
emptyText={intl.formatMessage(messages.empty)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const DiscountListDatagrid = ({
hasRowHover={hasRowHover}
onColumnMoved={handlers.onMove}
onColumnResize={handlers.onResize}
verticalBorder={col => col > 1}
verticalBorder={false}
rows={promotions?.length ?? 0}
availableColumns={visibleColumns}
emptyText={intl.formatMessage(messages.empty)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const SaleListDatagrid = ({
hasRowHover={hasRowHover}
onColumnMoved={handlers.onMove}
onColumnResize={handlers.onResize}
verticalBorder={col => col > 0}
verticalBorder={false}
rows={sales?.length ?? 0}
availableColumns={visibleColumns}
emptyText={intl.formatMessage(messages.empty)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const VoucherCodesDatagrid = ({
hasRowHover={false}
onColumnMoved={handlers.onMove}
onColumnResize={handlers.onResize}
verticalBorder={col => col > 0}
verticalBorder={false}
rows={codes?.length ?? 0}
availableColumns={visibleColumns}
emptyText={intl.formatMessage(messages.empty)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const VoucherListDatagrid = ({
hasRowHover={true}
onColumnMoved={handlers.onMove}
onColumnResize={handlers.onResize}
verticalBorder={col => col > 0}
verticalBorder={false}
rows={vouchers?.length ?? 0}
availableColumns={visibleColumns}
emptyText={intl.formatMessage(messages.empty)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export const GiftCardsListDatagrid = () => {
hasRowHover={true}
onColumnMoved={handlers.onMove}
onColumnResize={handlers.onResize}
verticalBorder={col => col > 0}
verticalBorder={false}
rows={giftCards?.length ?? 0}
availableColumns={visibleColumns}
emptyText={intl.formatMessage(messages.noData)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const OrderDraftDetailsDatagrid = ({
rowMarkers="none"
columnSelect="none"
freezeColumns={2}
verticalBorder={col => col > 1}
verticalBorder={false}
availableColumns={visibleColumns}
emptyText={intl.formatMessage(messages.emptyText)}
getCellContent={getCellContent}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const OrderDraftListDatagrid = ({
hasRowHover={hasRowHover}
loading={disabled}
availableColumns={visibleColumns}
verticalBorder={col => col > 0}
verticalBorder={false}
getCellContent={getCellContent}
getCellError={() => false}
menuItems={() => []}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const OrderListDatagrid: React.FC<OrderListDatagridProps> = ({
columnSelect="single"
hasRowHover={hasRowHover}
freezeColumns={2}
verticalBorder={col => col > 1}
verticalBorder={false}
availableColumns={visibleColumns}
onHeaderClicked={handleHeaderClick}
emptyText={intl.formatMessage(messages.emptyText)}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/components/PageListDatagrid/PageListDatagrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const PageListDatagrid = ({
hasRowHover={hasRowHover}
onColumnMoved={handlers.onMove}
onColumnResize={handlers.onResize}
verticalBorder={col => col > 0}
verticalBorder={false}
rows={pages?.length ?? 0}
availableColumns={visibleColumns}
emptyText={intl.formatMessage(messages.empty)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const PermissionGroupListDatagrid = ({
freezeColumns={2}
onColumnMoved={handlers.onMove}
onColumnResize={handlers.onResize}
verticalBorder={col => col > 1}
verticalBorder={false}
rows={permissionGroups?.length ?? 0}
availableColumns={visibleColumns}
emptyText={intl.formatMessage(messages.empty)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export const ProductListDatagrid: React.FC<ProductListDatagridProps> = ({
hasRowHover={hasRowHover}
onColumnMoved={handlers.onMove}
onColumnResize={handlers.onResize}
verticalBorder={col => col > 0}
verticalBorder={false}
getColumnTooltipContent={handleGetColumnTooltipContent}
availableColumns={visibleColumns}
onHeaderClicked={handleHeaderClicked}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const ShippingZoneListDatagrid = ({
onColumnMoved={handlers.onMove}
onColumnResize={handlers.onResize}
onRowSelectionChange={onSelectShippingZones}
verticalBorder={col => col > 0}
verticalBorder={false}
rows={shippingZones?.length ?? 0}
availableColumns={visibleColumns}
emptyText={intl.formatMessage(messages.empty)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const StaffListDatagrid = ({
hasRowHover={true}
onColumnMoved={handlers.onMove}
onColumnResize={handlers.onResize}
verticalBorder={col => col > 1}
verticalBorder={false}
rows={staffMembers?.length ?? 0}
availableColumns={visibleColumns}
emptyText={intl.formatMessage(messages.empty)}
Expand Down

0 comments on commit f95fcc4

Please sign in to comment.