I started working on this. Only did "10%" and the complexity is quite high. Will continue to work on it.
Approach
I recommend we use the items in Must have's to create the initial iteration and add nice to have's later.
It's very important to put this into people's hands and get feedback as soon as possible.
### To validate
- [ ] Maybe delegated types would work nicely here? (this would enable multi-resource boards)
### Must have's
- [ ] Give an array with the columns or select a column for the record and let it take the distinct values
- [ ] Render the records as cards on columns
- [ ] Initially render just a few items on a column and add a button to render more
- [ ] Enable the user to move records from one column to another
- [ ] The move action will trigger a `record.update(ATTRIBUTE: COLUMN_NAME)` action
- [ ] Give the user the ability to override that update action through a lambda
- [ ] Add record count to columns
- [ ] Give the user a DSL to add a few specific fields (title, description, tiny_text (can be used for comments count), badge)
### Nice to have's
- [ ] Collapse columns
- [ ] add cover image to cards based on a record column (or from the `record` DSL)
- [ ] Auto eager load items when the user gets to the end of the column
- [ ] Give the user the ability to insert partials. Maybe through resource tools?
- [ ] Give the user a DSL to add some basic fields (text, status, badge)
- [ ] "Move card to the top of the pile" action
- [ ] breadcrumbs in settings
- [ ] Configuratble icons and icon colors for each type
Proposed DSL
self.kanban_view = {
column: :status, # the DB column on which the columns to be rendered
# OR
columns: -> { [:to_do, :in_progress, :done] }, # give an array of column names
move_action: -> { record.update status: value },
record: {
title: :name, # The record's name will be used
description: :description, # The record's description will be used
},
# OR
record: -> {
# In this block you have access to the `record`, `params`, `current_user`, and many more items
{
title: record.name, # the title of the card to be displayed
description: record.description, # some text to be displayed under the title
tiny_text: "...",
badge: record.assignee.name
}
}
}
I started working on this. Only did "10%" and the complexity is quite high. Will continue to work on it.
Approach
I recommend we use the items in Must have's to create the initial iteration and add nice to have's later. It's very important to put this into people's hands and get feedback as soon as possible.
Proposed DSL
Proof of concept
https://github.com/avo-hq/avo/assets/1334409/7c7ced40-8388-41f8-8247-afb75183a0ab
Screenshots
Screenshots
![CleanShot 2024-01-08 at 17 30 53@2x](https://github.com/avo-hq/avo/assets/1334409/fc8bffa1-be4e-4676-a997-6ecc9f7e9d16) ![CleanShot 2024-01-08 at 17 31 34@2x](https://github.com/avo-hq/avo/assets/1334409/68a26450-85fc-4435-bec3-ef4cf3079ae2) ![CleanShot 2024-01-08 at 17 31 50@2x](https://github.com/avo-hq/avo/assets/1334409/b4f3e887-1e9f-435d-ba6f-f4df86a0c484) ![CleanShot 2024-01-08 at 17 32 01@2x](https://github.com/avo-hq/avo/assets/1334409/2185f7e1-d773-4a5b-8a04-5ed739cbf890)