wordpress-mobile / wordpress-mobile/AztecEditor-iOS

captionStyler not used

Open
#1,163 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Priority] Low [Type] Bug
Dominant language
Swift
Stars
669
Forks
153
Avg merge
11h 27m
Merged PRs (30d)
4

Description

According to the comment here, the captionStyler is a closure that "will be executed whenever the TextView needs to set the base style for a caption". We are told we can "Override this to customize the caption styling."

However, overriding the captionStyler appears to have no effect. In fact, I couldn't find anywhere in the TextView class where captionStyler is even accessed again.

To Reproduce

  1. Set the captionStyler on a TextView.
  2. Add an attachment with a caption.

Expected behavior
The caption is styled according to the captionStyler.

Actual Behavior
The caption uses the default style.

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 in Aztec/Classes/TextKit/TextView.swift at the captionStyler comment around line 240, then trace caption handling when an attachment is added. Reproduce the issue by setting captionStyler and adding an attachment with a caption. Done means the caption uses the configured styler instead of the default style.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.