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

Activity Changelog UI #909

Merged
merged 27 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0ec27f2
Rough first pass at fetching changelog and displaying results per act…
jeffpamer Aug 31, 2023
aae3376
Basic working UI for change log, no restore or preview
jeffpamer Sep 21, 2023
b307b78
Account for anchor differences
jeffpamer Sep 25, 2023
879a509
small formatting fixes and type corrections
jeffpamer Sep 25, 2023
a80deec
Catch scenarios with no changes, e.g. creating a preset
jeffpamer Sep 25, 2023
630c246
remove unused data, format durations
jeffpamer Sep 25, 2023
418a056
move changelog button into activity name header
jeffpamer Sep 25, 2023
5c0b8d2
wire up effect for restoring from changelog
jeffpamer Sep 26, 2023
0ae96cf
Close the changelog if the selected activity changes
jeffpamer Sep 26, 2023
be63641
use new changelog icon
jeffpamer Sep 26, 2023
6f14b54
Basic working revision preview
jeffpamer Sep 28, 2023
a7ac660
Add header and 'restore' action to revision preview
jeffpamer Sep 28, 2023
1960a80
more efficient effective arguments construction
jeffpamer Sep 28, 2023
646da57
add Last Modified By to activity directive form
jeffpamer Sep 28, 2023
2e640eb
Add permission handling
jeffpamer Sep 28, 2023
64ead69
fix linter errors
jeffpamer Sep 28, 2023
344c8e3
drive anchor offset detection from props instead of activity object
jeffpamer Sep 29, 2023
fdc9fbc
Fix tests. Add basic handling of array/struct types
jeffpamer Sep 30, 2023
d846ff0
Fix date formatting, username display, and padding
jeffpamer Oct 2, 2023
097373f
Display Start Time in DOY format
jeffpamer Oct 2, 2023
b7c5b36
re-run validations with preview arguments if supplied
jeffpamer Oct 2, 2023
091d7f8
use revision when getting effective arguments, use current name of ac…
jeffpamer Oct 11, 2023
0088237
constrain width to always have enough room for restore/preview buttons
jeffpamer Oct 11, 2023
91350ae
add more generic method for deep diffing objects
jeffpamer Oct 12, 2023
e8dbad3
add tooltip for overflowed values
jeffpamer Oct 12, 2023
f22d07a
hook changelog auto-closing to a change in selected ID
jeffpamer Oct 13, 2023
8ba227b
Update restore permissions check to account for plan ownership
jeffpamer Oct 13, 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
8 changes: 3 additions & 5 deletions e2e-tests/tests/plan-activities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test.beforeEach(async () => {
await plan.panelActivityTypes.getByRole('button', { name: 'CreateActivity-PickBanana' }).click();
await plan.panelActivityTypes.getByRole('button', { name: 'CreateActivity-ThrowBanana' }).click();
await plan.panelActivityDirectivesTable.getByRole('gridcell', { name: 'PickBanana' }).first().click();
await plan.panelActivityForm.getByRole('group').filter({ hasText: 'Anchor' }).first().click();
await plan.panelActivityForm.getByRole('button', { name: 'Is Relative To Another Activity Directive' }).click();

await plan.selectActivityAnchorByIndex(1);
});
Expand All @@ -63,19 +63,17 @@ test.describe.serial('Plan Activities', () => {
await page.locator('.modal-content select').nth(1).selectOption('anchor-plan');
await page.getByRole('button', { name: 'Confirm' }).click();
await plan.panelActivityDirectivesTable.getByRole('gridcell', { name: 'PickBanana' }).nth(1).click();
await plan.panelActivityForm.getByRole('group').filter({ hasText: 'Anchor' }).first().click();
await plan.panelActivityForm.getByRole('button', { name: 'Is Relative To Another Activity Directive' }).click();
await page.waitForFunction(
() => document.querySelector('.anchor-form .selected-display-value')?.innerHTML === 'To Plan',
);

await plan.panelActivityForm.getByRole('group').filter({ hasText: 'Anchor' }).first().click();
await plan.panelActivityForm.getByRole('button', { name: 'Is Relative To Another Activity Directive' }).click();
expect(plan.panelActivityForm.getByRole('textbox', { name: 'To Plan' })).toBeVisible();
});

test('Deleting multiple activity directives but only 1 has a remaining anchored dependent should prompt for just the one with a remaining dependent', async () => {
await plan.panelActivityDirectivesTable.getByRole('gridcell', { name: 'ThrowBanana' }).nth(1).click();
await page.getByRole('group').filter({ hasText: 'Anchor' }).first().click();

await plan.selectActivityAnchorByIndex(2);

await plan.panelActivityDirectivesTable.getByRole('gridcell', { name: 'GrowBanana' }).nth(1).click();
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"dependencies": {
"@fontsource/jetbrains-mono": "^5.0.3",
"@nasa-jpl/aerie-ampcs": "^1.0.1",
"@nasa-jpl/stellar": "^1.1.9",
"@nasa-jpl/stellar": "^1.1.10",
"@sveltejs/adapter-node": "1.2.4",
"@sveltejs/kit": "1.20.5",
"ag-grid-community": "29.3.3",
Expand Down
5 changes: 1 addition & 4 deletions src/components/activity/ActivityAnchorForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@
// only set this when the viewed activity is changed
$: if (activityDirective.id !== previousActivityDirectiveId) {
previousActivityDirectiveId = activityDirective.id;
isRelativeOffset =
activityDirective.anchor_id !== null ||
(activityDirective.anchor_id === null && !activityDirective.anchored_to_start) ||
!!startOffsetError;
isRelativeOffset = anchorId !== null || (anchorId === null && !isAnchoredToStart) || !!startOffsetError;
}

function formatActivityDirectiveAnchorText(activityDirective: ActivityDirective) {
Expand Down
Loading
Loading