Skip to content

Commit

Permalink
Merge branch 'main' into playwright-config
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWags authored Feb 7, 2024
2 parents a4aeb5d + 926e3ae commit 9f3821f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/app/src/atoms/config/upsetConfigAtoms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const defaultConfig: UpsetConfig = {
secondOverlapDegree: 2,
sortVisibleBy: 'Alphabetical',
sortBy: 'Size',
sortByOrder: 'Ascending',
sortByOrder: 'Descending',
filters: {
maxVisible: 3,
minVisible: 0,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/sort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function sortBySize(rows: Intersections, sortOrder?: string) {
const newOrder = [...order].sort((b, a) => {
const valA = values[a].size;
const valB = values[b].size;
return (sortOrder === 'Ascending') ? valA - valB : valB - valA;
return (sortOrder === 'Descending') ? valA - valB : valB - valA;
});

return { values, order: newOrder };
Expand Down
2 changes: 1 addition & 1 deletion packages/upset/src/atoms/config/upsetConfigAtoms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const defaultConfig: UpsetConfig = {
secondOverlapDegree: 2,
sortVisibleBy: 'Alphabetical',
sortBy: 'Size',
sortByOrder: 'Ascending',
sortByOrder: 'Descending',
filters: {
maxVisible: 3,
minVisible: 0,
Expand Down
8 changes: 4 additions & 4 deletions packages/upset/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
Typography,
} from '@mui/material';
import {
AggregateBy, aggregateByList, SortBy, sortByList,
AggregateBy, aggregateByList, SortBy,
} from '@visdesignlab/upset2-core';
import {
Fragment, useContext, useEffect, useState,
Expand Down Expand Up @@ -106,7 +106,7 @@ export const Sidebar = () => {
<RadioGroup
value={sortBy}
onChange={(ev) => {
actions.sortBy(ev.target.value as SortBy, 'Ascending');
actions.sortBy(ev.target.value as SortBy, 'Descending');
}}
>
<Box
Expand All @@ -115,7 +115,7 @@ export const Sidebar = () => {
aria-label={`${helpText.sorting['Degree']} - ${sortByOrder}`}
onKeyDown={(e) => {
if (e.key === 'Enter') {
actions.sortBy('Degree', 'Ascending');
actions.sortBy('Degree', 'Descending');
}
}}
>
Expand Down Expand Up @@ -151,7 +151,7 @@ export const Sidebar = () => {
aria-label={`${helpText.sorting['Degree']} - ${sortByOrder}`}
onKeyDown={(e) => {
if (e.key === 'Enter') {
actions.sortBy('Size', 'Ascending');
actions.sortBy('Size', 'Descending');
}
}}
>
Expand Down

0 comments on commit 9f3821f

Please sign in to comment.