linebender / linebender/druid

idea: `List` widget with pluggable layout

Open
#1,983 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
9.7k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

Hi, druid is an awesome project, thank you for maintaining it.

I've hit a wall with the `List` widget. The current `List` widget has a limited layout implementation, and it is a shame I cannot take advantage of the already existing `Flex` widget layout algorithm with my `List`.

For a very narrow usecase, I made a specialized `ListWrap` ([gist](https://gist.github.com/nicopap/b6d648ce98a4f8c1fa3f8c2a31592f61)) that reuses code from `List` but plugs a different layout implementation. I've discussed this in linebender/druid-widget-nursery#81

Does it make sense to provide a `PluggableLayoutList` widget? How would that look like? My best guess is to provide the `layout` function in the constructor for `PluggableLayoutList`. Would you be interested in me providing a draft implementation?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing List and Flex widget implementations, then compare them with the linked ListWrap gist. Read the discussion in linebender/druid-widget-nursery#81 to understand the proposed API and unresolved design questions. Done would require an agreed design and implementation scope, which this issue does not yet define.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.