Skip to content

feat(character_count): added character count #185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 0 commits into from

Conversation

TopFox
Copy link
Contributor

@TopFox TopFox commented Jul 12, 2025

Type of change(s)

  • Bug fix
  • Feature / enhancement
  • Infrastructure / tooling (CI, build, deps, tests)
  • Documentation

What changed and why

  • Added character count
  • Changed word count's text to specify that the count is for Words (useful when both character and word counts are active)

Before/After Screenshots/Screen Record

Character_count.mp4

Fixes the following issue(s)

Checklist

  • I read the contribution guidelines.
  • I manually tested my changes on device/emulator (if applicable).
  • I updated the "Unreleased" section in CHANGELOG.md (if applicable).
  • All checks are passing.

@TopFox TopFox requested a review from naveensingh as a code owner July 12, 2025 21:15
@TopFox
Copy link
Contributor Author

TopFox commented Jul 12, 2025

Remark: the current implementation doesn't count white spaces as characters and initial issue isn't clear on whether this should be the case or not. Can be easily fixed if needed

To do this, replace line 285 (val characters = text.count { !it.isWhitespace() }) with
var characters = text.length

Copy link
Member

@naveensingh naveensingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The counter now overlaps with long notes, and that doesn't look good. How about making the whole overlay text view opaque and full-width? The view will be hidden unless word or character counting is enabled.

Changed word count's text to specify that the count is for Words (useful when both character and word counts are active)

The character/word overlay is a little wide, but it won't be a problem once the overlapping issue is fixed. Let's change the format to 42 words, 524 characters for a smoother flow.

the current implementation doesn't count white spaces as characters and initial issue isn't clear on whether this should be the case or not.

Let's count them all, thanks.

@naveensingh
Copy link
Member

naveensingh commented Jul 16, 2025

The counter now overlaps with long notes, and that doesn't look good. How about making the whole overlay text view opaque and full-width? The view will be hidden unless word or character counting is enabled.

Notice the overlap in the 2nd screenshot:

ignoreImageMinify ignoreImageMinify

@TopFox
Copy link
Contributor Author

TopFox commented Jul 20, 2025

Wait I didn't want to close this PR and can't reopen it

@naveensingh
Copy link
Member

naveensingh commented Jul 20, 2025

It's greyed out on my side too. Did you accidentally delete you branch?

Maybe it's the force push. There are zero commits now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Character count
2 participants