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

feat(admin-ui): List and DataList components #4542

Open
wants to merge 20 commits into
base: feat/new-admin-ui
Choose a base branch
from

Conversation

leopuleo
Copy link
Contributor

Changes

With this pull request, we introduce two new components: List and DataList.

These two components are utilised to present data across various admin app views. The List component serves as the foundational element and is used internally by DataList, which displays data along with additional props necessary for functionalities such as filtering and ordering, etc.

With this PR, we refactored the views that are using DataList to:

  • Show the data correctly; see Breaking changes.
  • Use the button icons exported by the DataList component: now the icons used are imported directly from @material-design-icons/svg/outline set.

Breaking changes

Previously, developers could use any component as direct children of List.ListItem. This is no longer possible; to ensure the correct positioning, the appropriate List.ListItem child tag must now be used (i.e.: <ListItemTextPrimary />).

Example:

<ListItemText>
-  {item.firstName} {item.lastName}
+  <ListItemTextPrimary>
+    {item.firstName} {item.lastName}
+  </ListItemTextPrimary>
   <ListItemTextSecondary>{item.email}</ListItemTextSecondary>
</ListItemText>

Missing from the design

  • ListItem active and selected state.

Other improvements

  • Accordion: various minor fixes to the component; most of which are cosmetic.
  • FormComponentProps: FormComponentProps now accept TValue generic for the onChange prop.
  • IconPicker: any domain entity name has been prefixed with IconPicker namespace to not collide with other components such as Icon.
  • Heading and Text: incorporate text class names into extendTailwindMerge for enhanced merging.

Screenshots

Important

The changes have been applied to the left side of the screen. We still need to refactor the right side.

CleanShot 2025-02-18 at 16 00 27@2x
CleanShot 2025-02-18 at 16 00 13@2x
CleanShot 2025-02-18 at 15 59 57@2x
CleanShot 2025-02-18 at 15 59 43@2x
CleanShot 2025-02-18 at 16 11 20@2x

@leopuleo leopuleo requested a review from adrians5j February 18, 2025 15:32
@leopuleo leopuleo self-assigned this Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant