TextPlayground: the `.truncationMode(.tail)` example applies `.head`

Open Beginner friendly
#138 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
94/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
swift
Domain
mobile

Research direction

Open Sources/Showcase/TextPlayground.swift at lines 93–94 and inspect the truncation example. Update the .truncationMode(.tail) row so its modifier and explanatory text describe tail truncation, or implement the separate head and tail rows suggested in the issue. Open Showcase › Text and confirm the labels and truncation behavior match.

Written by the indexing model from the issue text.

Description

Where: Text › .truncationMode(.tail) —
TextPlayground.swift#L93-L94

Steps to reproduce

  1. Open Showcase › Text and scroll to the truncation examples.

Expected: a row labelled .truncationMode(.tail) that truncates at the end.
Actual: it truncates at the start; the page has no tail-truncation example.

Cause: the text reads .truncationMode(.tail): ... will head truncate and the modifier is .truncationMode(.head).

Suggested fix: either relabel the row .truncationMode(.head) and add a .tail row, or change the modifier to .truncationMode(.tail) and the text to "...will tail truncate".

Dominant language
Swift
Stars
44
Forks
19
Avg merge
6h 27m
Merged PRs (30d)
2

Getting set up

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.

More from skiptools/skipapp-showcase

All issues in skiptools/skipapp-showcase

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.