portabletext / portabletext/react-portabletext

Lists do not work with Styles properly

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

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
377
Forks
31
Avg merge
23h 42m
Merged PRs (30d)
9

Description

Style components are applied within list items, instead of outside of the list, so for example having a list with the h1 style results in broken behavior since the <h1> tags put inside the <li> are displayed as block and are displayed on a new line. ( ik headers shouldn't have list, but the same issue would occur with any custom style where it would make more sense to contain a list)

image

Contributor guide

No contributing guide indexed for this repository

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 reproducing the reported case: render a list item using the h1 style and compare the resulting HTML structure with the intended placement of the style element around the list. Trace the list and style rendering entry points, then verify that custom styles containing lists no longer produce the broken nested structure.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.