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

Refacto scroll + Aggregate queries for view groups #9089

Merged
merged 4 commits into from
Dec 16, 2024

Conversation

ijreilly
Copy link
Collaborator

Closes https://github.com/twentyhq/private-issues/issues/217.

Refactoring scroll not to cause table-wide re-render when opening a dropdown (triggering a scroll lock) in the table.

@ijreilly ijreilly marked this pull request as ready for review December 16, 2024 15:25
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR refactors scroll management to prevent table-wide re-renders when opening dropdowns, while also adding aggregate query functionality for view groups.

  • Replaces global scroll states with component-scoped states using ScrollWrapperComponentInstanceContext and new scrollWrapper*ComponentState implementations
  • Adds useRecordGroupFilter hook to handle record filtering in aggregate queries for view groups
  • Removes aggregateOperation from column definitions in favor of a new implementation for aggregate queries
  • Adds unique componentInstanceId props to all ScrollWrapper instances for isolated scroll state management
  • Introduces useToggleScrollWrapper hook for granular control over scroll behavior when dropdowns are opened

47 file(s) reviewed, 21 comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Member

@Weiko Weiko left a comment

Choose a reason for hiding this comment

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

LGTM

@ijreilly ijreilly merged commit 311b5f6 into main Dec 16, 2024
19 checks passed
@ijreilly ijreilly deleted the aggregate-queries-for-view-groups branch December 16, 2024 16:58
charlesBochet pushed a commit that referenced this pull request Dec 18, 2024
- Fixed icon shrinking on tabs. The introduction of EllipsisDisplay
takes 100% of the width, thus shrinking the icons.
- Removed scroll wrapper tablist. This was removed in #9016 but
reintroduced in #9089. This reintroduction made the dark border below
the active tab disappear.
- Used Avatar for icon and logo rendering following the changes made in
#9093
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants