-
Notifications
You must be signed in to change notification settings - Fork 6
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
Advanced Timeline Filtering #1535
base: develop
Are you sure you want to change the base?
Conversation
6d887d8
to
7b25a40
Compare
Met with @AaronPlave and @lklyne about remaining tasks this morning. All of the new functionality for advanced filtering of activities is done on this branch and available for testing on our (JPL internal) aerie-test instance. However there is still a bit of design + UI work to be done on integrating this work with the row editor in the Timeline Editor pane. Specifically:
@lklyne will work on a unified UI design for handling these different types in a consistent way + then handoff to @AaronPlave to implement on this branch. |
2423132
to
cdfe150
Compare
f544330
to
b7fbd44
Compare
on:hide={() => (manualInputOpen = false)} | ||
> | ||
<div class="manual-types-menu"> | ||
{#if filteredActivityTypes.length > 0} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just something to think about: this could potentially use a component for each item that is shared with the SearchableDropdown
to reuse some of the dropdown logic for selecting individual and selecting all items that match what is searched.
@@ -53,7 +54,7 @@ | |||
} | |||
}); | |||
|
|||
function padLeftSlot() { | |||
async function padLeftSlot() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to become an async function?
@@ -65,19 +66,17 @@ | |||
} | |||
// because the content of the slot might not have been fully rendered by the time this function is called | |||
// we must kick it out to a timeout to wait for it to be rendered |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this timeout no longer needed? If so, we can probably take out the comment.
await activityLayerEditor | ||
.locator('.timeline-layer-editor') | ||
.first() | ||
.getByLabel('activity-filter-builder-trigger') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little hesitant about using the label as a way to select the button in the test. Anyway this could be getting the button by text or role?
bind:this={filterMenu} | ||
> | ||
<button | ||
aria-label="activity-filter-builder-trigger" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't aria-label
s be more human readable? If this is for a test, can we use the data-testId
attribute instead?
uniqueDirectives.push(directive); | ||
|
||
// Gather spans for directive since we always show all spans for a directive | ||
// TODO aplave does not know if this is a good move, needs investigation and potentially options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol
return included; | ||
} | ||
|
||
export function getMatchingTypesForActivityLayerFilter(filter: ActivityLayerFilter | undefined, types: ActivityType[]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this function is being used outside, but not matchesDynamicFilter
. Would it be possible to write tests for this instead of matchesDynamicFilter
?
}); | ||
} | ||
|
||
export function directiveOrSpanMatchesDynamicFilters( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also potentially doesn't need to be exported
} | ||
|
||
// TODO try consolidating with the function above | ||
export function typeMatchesDynamicFilters( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially doesn't need export
}, true); | ||
} | ||
|
||
export function matchesDynamicFilter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might not need an export, although there is a test for it.
}); | ||
|
||
test('Deleting an simulation template should remove it from the list of templates', async () => { | ||
await plan.selectSimulationTemplateByName('Template 1'); | ||
|
||
await page.getByRole('button', { name: 'Set Template' }).click(); | ||
await plan.panelSimulation.locator('div[name="Set Template"]').click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's no longer possible to get this by role?
This PR implements dynamic activity filtering for the timeline and updates resource and external event layer management. These changes aim to give users finer control over how activities in a plan are filtered and rendered on the timeline.
Tickets Addressed:
Changes:
Type
andSubsystem
, globally filter instances byName
,Parameter
(filtered appropriately by the current list of resulting types),Tag
, andScheduling Goal ID
. The user can also add and remove filters (the same as global filters) on specific resulting types. Popover component is draggable and resizable.columnMinSizes
androwMinSizes
props to support min width and height for css grid sectionsTesting
Activities
Resources
External Events
Activity Types Browser
Migration
TODO:
getEffectiveArguments
every time a user clicks on an activity