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

Show Header in RecordTable on empty state and show groups in Group By views #11416

Merged
merged 12 commits into from
Apr 7, 2025

Conversation

Harshit-RV
Copy link
Contributor

Closes #11298

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

The changes update the empty state rendering in the record table to ensure the header (Fields bar) is always visible when the table is empty and to display the grouped view properly when grouping is applied.

  • Updated conditional rendering in /packages/twenty-front/src/modules/object-record/record-table/components/RecordTable.tsx to differentiate between default and grouped empty states.
  • Ensured that the RecordTableHeader remains rendered during an empty state.
  • Incorporated checks for grouped views using RecordTableRecordGroupBodyEffects and RecordTableRecordGroupsBody while managing nested ternary readability.

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@FelixMalfait FelixMalfait self-assigned this Apr 7, 2025
@FelixMalfait
Copy link
Member

Thank you! Could you please check the group by view type?

Screenshot 2025-04-07 at 12 21 32

@Harshit-RV Harshit-RV force-pushed the update-table-empty-state branch from 66c8d0d to de40d12 Compare April 7, 2025 10:54
@Harshit-RV
Copy link
Contributor Author

Fixed it. @FelixMalfait

@Harshit-RV
Copy link
Contributor Author

@FelixMalfait Let me know if any further changes are needed

@FelixMalfait
Copy link
Member

Hey @Harshit-RV thanks! I took over because the header wasn't displayed properly (missing StyledTable wrapper). Also I thought it'd be nice to disable checkboxes in that case. My update isn't perfect because the header isn't sticky, but that would require a refactoring which is not worth it imo.

Copy link
Member

@FelixMalfait FelixMalfait left a comment

Choose a reason for hiding this comment

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

Thank you!

@FelixMalfait FelixMalfait enabled auto-merge (squash) April 7, 2025 14:31
@FelixMalfait FelixMalfait disabled auto-merge April 7, 2025 14:44
@FelixMalfait FelixMalfait merged commit 6bc1896 into twentyhq:main Apr 7, 2025
48 checks passed
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.

Update table Empty States
3 participants