Skip to content

Add group by functionality to new UI #6469

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

Merged
merged 1 commit into from
Jun 24, 2025
Merged

Conversation

vbustamante
Copy link
Contributor

How does this PR change the system?

  • Add the groupBy dropdown to the grid view
  • Show groups while retaining the virtualizer features working
  • Break the grid into more components to try and simplify them a little bit

Screenshots:

image

Out of scope:

We didn't tackle collapsing the sections

How was it tested?

  • Manual testing between me, nick and wendy to ensure no regressions

In short: 🔗

Copy link

github-actions bot commented Jun 23, 2025

Dependency Review

✅ No vulnerabilities or OpenSSF Scorecard issues found.

Scanned Files

None

@nickgerace nickgerace requested a review from jobelenus June 23, 2025 22:32
Comment on lines -108 to -111
@keydown.left="onArrowLeft"
@keydown.right="onArrowRight"
@keydown.up="onArrowUp"
@keydown.down="onArrowDown"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reviewers: we consolidated down the "v2" controls for this refactor

return set;
});

const groupedComponents = computed(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ordering of groups and their icons (or lackthereof) are intentional

) {
if (!focusedComponent.value) return;

if (upgradeableComponents.value.has(focusedComponent.value.id)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functionality here changed slightly to use the list for performance reasons. We should consider moving this to ComponentInList or making a new type in the future.

Comment on lines +100 to +97
const GROUP_HEADER_HEIGHT = 50;
const GROUP_FOOTER_HEIGHT = 10;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: feels like anything having to do with heights, padding, widths, etc. for Explore should be centralized to a .ts file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the very least it would be good to move these to the top of the script area within this component.

Comment on lines +142 to +156
export type ExploreGridRowData =
| {
type: "contentRow";
components: ComponentInList[];
chunkInitialId: number;
insideSection: boolean;
}
| {
type: "header";
title: string;
count: number;
}
| {
type: "footer";
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the core of how the PR works: there are three row kinds now when there was previously one.

@vbustamante vbustamante force-pushed the victor/eng-3082-group-by branch 3 times, most recently from 817d9dd to 7c059cb Compare June 24, 2025 13:15
Signed-off-by: Victor Bustamante <victor@systeminit.com>
Co-authored-by: Nick Gerace <nick@systeminit.com>
Co-authored-by: Wendy Bujalski <wendy@systeminit.com>
@vbustamante vbustamante force-pushed the victor/eng-3082-group-by branch from 7c059cb to 7ac2c40 Compare June 24, 2025 13:32
@@ -100,86 +70,80 @@
slotProps.focus();
mapRef?.deselect();
unfocus();
unhover();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did y'all remove the unhover here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without v1 unfocus does what unhover used to do, so we don't need it right now

Comment on lines +118 to +127
const hoveredId = ref<ComponentId | undefined>(undefined);
const hover = (componentId: ComponentId, hovered: boolean) => {
if (hovered) {
hoveredId.value = componentId;
emit("childUnhover", componentId);
} else {
hoveredId.value = undefined;
emit("childHover", componentId);
}
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see how you changed hovering to work with the nested vue components.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restructuring the grid virtualizer into these nested vue components is very well done!

Comment on lines +54 to +66
const componentGridTileRefs = computed(() => {
if (!exploreGridRowRefs.value) return [];

const tiles: InstanceType<typeof ExploreGridTile>[] = [];

for (const row of exploreGridRowRefs.value) {
if (!row.exploreGridTileRefs) continue;

tiles.push(...row.exploreGridTileRefs);
}

return tiles;
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

@vbustamante vbustamante added this pull request to the merge queue Jun 24, 2025
Merged via the queue into main with commit 5c26efc Jun 24, 2025
11 checks passed
@vbustamante vbustamante deleted the victor/eng-3082-group-by branch June 24, 2025 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy