Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI redo dec 24 #439

Merged
merged 56 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
5073c01
ESLint Footer, Header, and Root in App
Dec 14, 2024
ffc28cb
ESLint Body
Dec 15, 2024
0b4fd4c
Remove useless useEffect
Dec 16, 2024
729d1cb
Unify sidebar into 1 element with shadow; fix title appearance
Dec 16, 2024
7fc6918
Add footerHeight param to Upset component & prevent settings sidebar …
Dec 16, 2024
3b0d747
Create generic sidebar component
Dec 16, 2024
e731640
Apply generic sidebar to AltTextSidebar
Dec 16, 2024
0131e84
Pass tab index for close button through
Dec 16, 2024
f90aa97
Bugfix for empty div remaining after closing sidebar
Dec 16, 2024
c9f1ffc
Use generic sidebar for Element Sidebar
Dec 16, 2024
c056a53
Add multiselect in settings for visible sets
Dec 17, 2024
b869aee
Add settings control for visible atts
Dec 17, 2024
c646102
Bugfixes: Attributes multiselect label & order of attributes in plot
Dec 17, 2024
6dfd952
Remove attribute dropdown from header
Dec 17, 2024
3f58de4
Abstract toggle switches in the settings sidebar
Dec 17, 2024
0ec4ce8
UI (toggles) for general settings in sidebar
Dec 17, 2024
ec2d6ae
Add config fields for intersection size lables, set size labels, and …
Dec 17, 2024
35762ee
Ensure initializeProvenanceTracking setter converts config before set…
Dec 17, 2024
ecba999
Add config fields & selectors for general plot settings
Dec 17, 2024
50e16eb
Hide hidden sets & intersection size labels according to config settings
Dec 17, 2024
7cc775c
Matrix & set header JSDoc
Dec 19, 2024
8477d9d
Size labels for visible sets; responsive to global setting
Dec 19, 2024
cf1fe83
Bugfixes for set size bar: size black/white gap and label padding
Dec 19, 2024
07bbc86
Move "Load Data" into the meatball menu
Dec 21, 2024
6f62a63
ESLint App.tsx
Dec 21, 2024
935eb65
Strict type for data & move dispatchState to utils
Dec 21, 2024
a195a80
ESLint AccessibilityStatement.tsx
Dec 21, 2024
588e540
Abstract link to data table, add data table to accessibility statemen…
Dec 22, 2024
4ba509a
ESLint datatable.tsx
Dec 22, 2024
5c47334
Standardize heading styles for the upset package
Dec 22, 2024
6d1a592
Bugfix: correct header height
Dec 22, 2024
caa1ed1
Change footer height atom to number
Dec 22, 2024
5eebbef
Give UpsetHeading a full style prop
Dec 22, 2024
772d2c4
Make settings sidebar collapsible
Dec 22, 2024
2b9d380
Change hamburger menu icon in header to gear; re-rder elements
Dec 22, 2024
219e675
Change alttext font size to match rest of UI
Dec 22, 2024
252f1bd
Hide 2nd agg if 1st agg is none
Jan 7, 2025
42c7672
Increase font size & weight for settings sidebar section labels
Jan 7, 2025
63b9d11
Bump font size and weight a lil more for settings sidebar section labels
Jan 7, 2025
c165a69
Update title: emdash, flask logo, and min width at which to show
Jan 7, 2025
1dce955
Re-add 1px spacing between set size bars
Jan 7, 2025
46e54ea
Correct vertical centering of column titles
Jan 7, 2025
625448e
Right-align settings sidebar toggles
Jan 7, 2025
ad17b39
Reposition & resize the expand sidebar button
Jan 7, 2025
959a825
Absolute position of sidebar buttons so they don't displace other ele…
Jan 7, 2025
ffa2d45
Bugfix: Sidebar aria-label
Jan 8, 2025
a723346
Bugfix: z-index for sidebar and drawer
Jan 8, 2025
cf19169
Fix attribute dropdown tests for PR 439
Jan 8, 2025
064918b
Fix datatable test for PR 439
Jan 8, 2025
c93cf45
Bugfix: disinclude Degree and Deviation from plottable attributes
Jan 8, 2025
a5e2095
Fix element view test for PR 439
Jan 8, 2025
1d171a5
eslint provenance.spec.ts
Jan 8, 2025
f2c3ce2
Fix Settings header and user icon padding
Jan 10, 2025
0f7d2f2
Use Sidebar component for provenance vis
Jan 10, 2025
fa24ff9
Address Jake's review for PR 439
Jan 10, 2025
0f090aa
Rename dataTableLink.tsx to DataTableLink.tsx
NateLanza Jan 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Hide hidden sets & intersection size labels according to config settings
  • Loading branch information
NateLanza committed Dec 17, 2024
commit 50e16eb001d43fcf9ab0d2038509b39d58471558
27 changes: 17 additions & 10 deletions packages/upset/src/components/Columns/SizeBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { maxSize } from '../../atoms/maxSizeAtom';
import { useScale } from '../../hooks/useScale';
import translate from '../../utils/transform';
import { newShade } from '../../utils/colors';
import { showIntersectionSizesSelector } from '../../atoms/config/displayAtoms';

/**
* A bar that represents the size of a row in the upset plot.
Expand Down Expand Up @@ -47,6 +48,9 @@ type Rect = {

const colors = ['rgb(189, 189, 189)', 'rgb(136, 136, 136)', 'rgb(37, 37, 37)'];

/**
* Size bar for a row in the upset plot, showing number of elements in the subset.
*/
export const SizeBar: FC<Props> = ({ row, size, selected }) => {
const dimensions = useRecoilValue(dimensionsSelector);
const sizeDomain = useRecoilValue(maxSize);
Expand All @@ -55,6 +59,7 @@ export const SizeBar: FC<Props> = ({ row, size, selected }) => {
const bookmarkedColorPallete = useRecoilValue(bookmarkedColorPalette);
const nextColor = useRecoilValue(nextColorSelector);
const elementSelectionColor = useRecoilValue(elementColorSelector);
const showText = useRecoilValue(showIntersectionSizesSelector);

/*
* Constants
Expand Down Expand Up @@ -294,16 +299,18 @@ export const SizeBar: FC<Props> = ({ row, size, selected }) => {
/>
</>
)}
<text
textAnchor="start"
dominantBaseline="middle"
transform={translate(
(fullBars > 0 ? dimensions.attribute.width : sizeWidth) + 5,
dimensions.body.rowHeight / 2,
)}
>
{size}
</text>
{showText && (
<text
textAnchor="start"
dominantBaseline="middle"
transform={translate(
(fullBars > 0 ? dimensions.attribute.width : sizeWidth) + 5,
dimensions.body.rowHeight / 2,
)}
>
{size}
</text>
)}
</g>
);
};
38 changes: 21 additions & 17 deletions packages/upset/src/components/Header/MatrixHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ import { useScale } from '../../hooks/useScale';
import { SetHeader } from './SetHeader';
import { HiddenSets } from './HiddenSets';
import translate from '../../utils/transform';
import { showHiddenSetsSelector } from '../../atoms/config/displayAtoms';

export const MatrixHeader = () => {
const visibleSets = useRecoilValue(visibleSetSelector);
const dimensions = useRecoilValue(dimensionsSelector);
const maxSize = useRecoilValue(maxSetSizeSelector);
const hiddenSets = useRecoilValue(hiddenSetSelector);
const showHiddenSets = useRecoilValue(showHiddenSetsSelector);

const { set } = dimensions;

Expand All @@ -22,31 +24,33 @@ export const MatrixHeader = () => {
return (
<>
<SetHeader visibleSets={visibleSets} scale={scale} />
<foreignObject
width={
{showHiddenSets && (
<foreignObject
width={
dimensions.size.width +
dimensions.gap +
dimensions.attribute.width
}
height={dimensions.set.size.height + 15}
transform={translate(dimensions.matrixColumn.width +
height={dimensions.set.size.height + 15}
transform={translate(dimensions.matrixColumn.width +
dimensions.bookmarkStar.gap +
dimensions.bookmarkStar.width +
dimensions.bookmarkStar.gap, 0)}
>
<div
id="hiddenSetDiv"
style={{
overflowX: 'auto',
overflowY: 'hidden',
height: '100%',
}}
>
<svg width={hiddenSets.length * (set.width + 1)} xmlns="http://www.w3.org/2000/svg">
<HiddenSets hiddenSets={hiddenSets} scale={scale} />
</svg>
</div>
</foreignObject>
<div
id="hiddenSetDiv"
style={{
overflowX: 'auto',
overflowY: 'hidden',
height: '100%',
}}
>
<svg width={hiddenSets.length * (set.width + 1)} xmlns="http://www.w3.org/2000/svg">
<HiddenSets hiddenSets={hiddenSets} scale={scale} />
</svg>
</div>
</foreignObject>
)}
</>
);
};