Skip to content

Selector toolbar position - #591

Merged
amantoux merged 3 commits into
masterfrom
selector-toolbar-position
Oct 12, 2026
Merged

amantoux merged 3 commits into
masterfrom
selector-toolbar-position

Conversation

@amantoux

Copy link
Copy Markdown
Member

Color and heading selectors can cover the formatting toolbar when it sits above the keyboard. Position selectors below the presenter when there is room, and flip above it when that side offers more space. Use the full toolbar's vertical bounds while keeping horizontal alignment with the button, and preserve keyboard and safe-area constraints.

Comment on lines +1434 to +1435
? presenter.top - _selectorScreenPadding - childSize.height
: presenter.bottom + _selectorScreenPadding;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for working on this and it works good except I believe there is extra padding now as you can see from the screenshots. I believe you shouldn't account for _selectorScreenPadding here as they would be added in _fitInsideScreen if needed (to push it away from screen edges).

Before:
Image
Image

After:
Image
Image

@amantoux
amantoux force-pushed the selector-toolbar-position branch from 836e461 to 165a2a1 Compare October 11, 2026 17:34
@amantoux
amantoux force-pushed the selector-toolbar-position branch from 165a2a1 to c4c284e Compare October 11, 2026 17:42
@codecov

codecov Bot commented Oct 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.24613% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.10%. Comparing base (96f7835) to head (c4c284e).

Files with missing lines Patch % Lines
packages/parchment/lib/src/document/embeds.dart 50.00% 4 Missing ⚠️
packages/parchment/lib/src/codecs/html_utils.dart 25.00% 3 Missing ⚠️
...ackages/parchment/lib/src/document/attributes.dart 66.66% 3 Missing ⚠️
packages/parchment/lib/src/codecs/markdown.dart 95.55% 2 Missing ⚠️
packages/parchment/lib/src/document/leaf.dart 66.66% 2 Missing ⚠️
packages/parchment/lib/src/document.dart 90.90% 1 Missing ⚠️
packages/parchment/lib/src/document/line.dart 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #591      +/-   ##
==========================================
+ Coverage   88.08%   88.10%   +0.02%     
==========================================
  Files          63       63              
  Lines       10903    10984      +81     
==========================================
+ Hits         9604     9678      +74     
- Misses       1299     1306       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@amantoux
amantoux requested a review from Amir-P October 11, 2026 18:31

@Amir-P Amir-P left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Thanks!

@amantoux
amantoux merged commit 9900cdd into master Oct 12, 2026
4 checks passed
@amantoux
amantoux deleted the selector-toolbar-position branch October 12, 2026 06:41
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.

2 participants