8000 JSX Refactor: Common empty list item component by savathoon · Pull Request #276 · discord/access · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

JSX Refactor: Common empty list item component #276

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 2 commits into from
Jun 9, 2025

Conversation

savathoon
Copy link
Contributor

Moving isolated improvements from the app group feature branch into main

@Copilot Copilot AI review requested due to automatic review settings June 3, 2025 22:03
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the way empty table rows are rendered by introducing a common component () to replace repeated inline markup displaying "None" across request and group pages, while also applying minor layout adjustments in the App component.

  • Replace inline "None" table rows in requests and groups with
  • Introduce a reusable EmptyListEntry component with customizable cell properties and text
  • Update App.tsx with additional Box styling for improved layout

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/pages/requests/Read.tsx Replaces hardcoded "None" rows with in three tables
src/pages/groups/Read.tsx Replaces inline "None" row with for group details
src/components/EmptyListEntry.tsx Adds a new reusable component to render empty list table entries
src/App.tsx Enhances Box styling with a minimum width and overflow settings

</Typography>
</TableCell>
</TableRow>
<EmptyListEntry />
Copy link
Preview
Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

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

Consider providing consistent cellProps (e.g. { colSpan: 3 }) for across all table usages to maintain uniform table layout.

Copilot uses AI. Check for mistakes.

@discord discord deleted a comment from Copilot AI Jun 3, 2025
@@ -169,7 +169,7 @@ function Dashboard({setThemeMode}: {setThemeMode: (theme: PaletteMode) => void})
};

return (
<Box sx={{display: 'flex'}}>
<Box sx={{display: 'flex', minWidth: '20rem', overflowX: 'hidden'}}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

How does this affect the app layout?

@savathoon savathoon merged commit 92cbfc5 into main Jun 9, 2025
6 checks passed
@savathoon savathoon deleted the empty_list_item_component branch June 9, 2025 16:38
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
0