linebender / linebender/druid

encourage use of `BoxConstraints::constrain` in all layout methods

Open
#854 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

a general note; I think it's good to call `bc.constrain(size)` anytime you return from layout, as a way of ensuring all returned sizes are appropriate for the constraints.

_Originally posted by @cmyr in https://github.com/xi-editor/druid/pull/845_

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 searching the layout methods that return sizes and the BoxConstraints::constrain API. Determine which returns do not apply the constraints, then verify that each affected layout path returns an appropriate constrained size; the issue names no files or tests, so the full scope must be mapped first.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.