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

Cards View #48

Open
3 tasks
codeliner opened this issue Feb 9, 2024 · 0 comments
Open
3 tasks

Cards View #48

codeliner opened this issue Feb 9, 2024 · 0 comments
Labels
cody Cody related topics enhancement New feature or request frontned affects frontend part of Cody Engine

Comments

@codeliner
Copy link
Contributor

codeliner commented Feb 9, 2024

A list of information is currently shown in a table component using @mui/x-data-grid. Here is an example

The user should be able to display a list of information in a card grid instead.

As shown on the screenshot, tables are configured in the UI Schema section of information cards on prooph board:

image

We should introduce a new ui schema variant:

{
  "ui:cards": {
    "card": {
      "header": {
        "text": "firstName + ' ' + lastName", // Support Jexl Expressions
        "typography": "h2",  // Default, one of the Material UI Typography options
        "color": "..."  // Optional
        ... // More config options TBD
      },
      "content": [  // Array of lines, each line can have different config
        {  // First content line
           "text": "address.street", // Support Jexl Expressions
           "typography": "body1",  // Default, one of the Material UI Typography options
           "color": "..."  // Optional
           ... // More config options TBD
        },
        {  // Second content line
           "text": "address.city"
        }
      ]
      "actions": [...]  // TBD, action button config, connected to command that should be triggered, ...
    },
    "cardsPerRow": 4,
    ... // more options
  }
}

Tasks

  • Create a CardGrid component with props for passing list of information and cardgrid ui schema (see above)
  • Cody Engine cody hook should check if table view or cardgrid view should be generated
  • Cody Play list view should check if table view or cardgrid view should be used
@codeliner codeliner added enhancement New feature or request frontned affects frontend part of Cody Engine cody Cody related topics labels Feb 9, 2024
@codeliner codeliner added this to the Cody UI Components milestone Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cody Cody related topics enhancement New feature or request frontned affects frontend part of Cody Engine
Projects
None yet
Development

No branches or pull requests

1 participant