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

Timeline density improvements and refactoring #977

Merged
merged 29 commits into from
Nov 10, 2023
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4235824
Timeline density improvements and refactoring WIP
AaronPlave Oct 31, 2023
0a00a81
Clean
AaronPlave Oct 31, 2023
105fdd1
Fixes
AaronPlave Nov 1, 2023
cc3328b
Color y axis labels if appropriate
AaronPlave Nov 1, 2023
f06f45f
Fixes, WIP overhaul of context menu usage in row header
AaronPlave Nov 2, 2023
912cbee
Add close on escape behavior to context menu
AaronPlave Nov 2, 2023
0914eb0
Fix for hz guide rendering
AaronPlave Nov 3, 2023
67ddcbb
Duplicate row functionality
AaronPlave Nov 3, 2023
7d4caa5
Fixes and ability to right click anywhere in row header
AaronPlave Nov 3, 2023
711b633
Cursor alignment fixes
AaronPlave Nov 6, 2023
2b6bbf2
Style fix
AaronPlave Nov 6, 2023
32f56e7
Improve x time label formatting, add more d3 tick ranges to prevent t…
AaronPlave Nov 6, 2023
79daef9
Fix active row state styling
AaronPlave Nov 6, 2023
be59612
Use units in row resource labels
AaronPlave Nov 7, 2023
cecf609
Style fix
AaronPlave Nov 7, 2023
0ce0a3d
Clean
AaronPlave Nov 7, 2023
9be11de
Fixes
AaronPlave Nov 7, 2023
c2bb38b
Fix for row component sizing to ensure left side is visible
AaronPlave Nov 7, 2023
6c7dd7b
Remove unused files
AaronPlave Nov 8, 2023
019b636
Add layer name property and ability to override it for resource layer…
AaronPlave Nov 8, 2023
87a6ef1
Tweak default y axis name
AaronPlave Nov 8, 2023
b80c0d4
Pretty y-axis tick numbers
AaronPlave Nov 8, 2023
5fa3596
Duplicate row from TimelineEditor
AaronPlave Nov 8, 2023
e3a1658
Lint fix
AaronPlave Nov 8, 2023
9c06571
Format numbers with SI-prefixes
AaronPlave Nov 9, 2023
093f658
Fix resource label tooltip z indexing
AaronPlave Nov 10, 2023
b554e58
Fixes
AaronPlave Nov 10, 2023
12a2101
Insert row from context menu, style tweaks
AaronPlave Nov 10, 2023
0104aa5
Add row duplication test
AaronPlave Nov 10, 2023
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
Clean
  • Loading branch information
AaronPlave committed Nov 9, 2023
commit 0ce0a3d837899fb51573a50185b5041cc27a08e3
31 changes: 0 additions & 31 deletions src/components/timeline/RowYAxes.svelte
Original file line number Diff line number Diff line change
@@ -24,37 +24,6 @@
draw();
}

// function fitTextToWidth(
// textSelection: Selection<SVGTextElement, unknown, null, undefined>,
// text: string,
// width: number,
// ) {
// textSelection.text(text);
// let textLength = textSelection?.node()?.getComputedTextLength() ?? 0;

// // If text is longer than total allowed width,
// // split the string in half and reduce the character length of each half by the ratio
// // of how much longer the string is than the width.
// // Iterate this process until "[start]...[end]" fits within the width.
// // (One pass is not necessarily good enough, due to variance in character widths,
// // but this should take at most 2 or 3 iterations)
// if (textLength > width) {
// let start = text.substring(0, text.length * 0.5);
// let end = text.substring(text.length * 0.5);
// let i = 0;
// let reduction: number;

// while (textLength > width && i < MAX_ITERATIONS) {
// i++;
// reduction = 1 - width / textLength;
// start = start.substring(0, start.length * (1 - reduction));
// end = end.substring(Math.ceil(end.length * reduction));
// textSelection.text(start + '...' + end);
// textLength = textSelection?.node()?.getComputedTextLength() ?? 0;
// }
// }
// }

async function draw() {
if (g) {
await tick();
2 changes: 1 addition & 1 deletion src/types/timeline.ts
Original file line number Diff line number Diff line change
@@ -172,8 +172,8 @@ export type VerticalGuideSelection = {

export type XAxisTick = {
date: Date;
formattedDateUTC: string;
formattedDateLocal: string;
formattedDateUTC: string;
hideLabel: boolean;
};