torchbox / torchbox/django-pattern-library

Add ability to override resize sizes

Open
#227 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue ui
Dominant language
Python
Stars
423
Forks
53
PR merge metrics
No merged PRs in 30d

Description

Is your proposal related to a problem?

Right now the sizes used for different breakpoints (S, M and L) are fixed values. They are defined in https://github.com/torchbox/django-pattern-library/blob/main/pattern_library/templates/pattern_library/index.html#L16. Not all projects uses the same breakpoints. There are some scenarios where having other values would make more sense to review the components

Describe the solution you'd like

Add the ability to override the values defined in https://github.com/torchbox/django-pattern-library/blob/main/pattern_library/templates/pattern_library/index.html#L16. Those can be the default values, but it would be great to have a settings variable that could allow us to override those values

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 with pattern_library/templates/pattern_library/index.html at the referenced breakpoint size values, then inspect how project settings are exposed to templates. Add a configurable override while preserving the current defaults, and verify that custom S, M, and L values are used when provided.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.