[PR #3348] [MERGED] fixed text overflow issue of font family dropdown #5688

Closed
opened 2026-03-23 22:19:51 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/3348
Author: @AslamThachapalli
Created: 9/5/2023
Status: Merged
Merged: 12/21/2023
Merged by: @LucasXu0

Base: mainHead: fix_font_name_hidden_issue


📝 Commits (5)

  • f136df7 fixed text overflow issue of font family dropdown
  • 9921ad9 added tooltip delay
  • bab76ec code review fixes: unwanted key removed; tooltip added for all fonts;
  • efff574 code review fixes: unwanted key removed; tooltip added for all fonts;
  • e1a7d75 Update frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_appearance/font_family_setting.dart

📊 Changes

1 file changed (+36 additions, -30 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_appearance/font_family_setting.dart (+36 -30)

📄 Description

closes #3319

Added Tooltip for overflown font family text

Image Description

Added the following function to check whether a text is overflowing.

 bool _isTextOverflowing(String text, TextStyle textStyle, double maxWidth) {
    final textPainter = TextPainter(
      text: TextSpan(text: text, style: textStyle),
      maxLines: 1,
      textDirection: ui.TextDirection.ltr,
    )..layout(maxWidth: maxWidth);

    return textPainter.didExceedMaxLines;
  }

PR Checklist

  • My code adheres to the AppFlowy Style Guide
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/3348 **Author:** [@AslamThachapalli](https://github.com/AslamThachapalli) **Created:** 9/5/2023 **Status:** ✅ Merged **Merged:** 12/21/2023 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `fix_font_name_hidden_issue` --- ### 📝 Commits (5) - [`f136df7`](https://github.com/AppFlowy-IO/AppFlowy/commit/f136df748e7a528291f6778899ab2b4e36714ee6) fixed text overflow issue of font family dropdown - [`9921ad9`](https://github.com/AppFlowy-IO/AppFlowy/commit/9921ad9c1de668eddfa21e06e7fb89ece3917d9e) added tooltip delay - [`bab76ec`](https://github.com/AppFlowy-IO/AppFlowy/commit/bab76ecd392edc735be586cb9d5a2707f95e301b) code review fixes: unwanted key removed; tooltip added for all fonts; - [`efff574`](https://github.com/AppFlowy-IO/AppFlowy/commit/efff574324a037fd649e81449dcc9dc0c1311150) code review fixes: unwanted key removed; tooltip added for all fonts; - [`e1a7d75`](https://github.com/AppFlowy-IO/AppFlowy/commit/e1a7d7545f1a56fbc229849b3fcffb2f2ec3dd34) Update frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_appearance/font_family_setting.dart ### 📊 Changes **1 file changed** (+36 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_appearance/font_family_setting.dart` (+36 -30) </details> ### 📄 Description <!--- Thank you for submitting a pull request to AppFlowy. The team will dedicate their best efforts to reviewing and approving your pull request. If you have any questions about the project or feedback for us, please join our [Discord](https://discord.gg/wdjWUXXhtw). --> closes #3319 <!--- If your pull request adds a new feature, please drag and drop a video into this section to showcase what you've done! If not, you may delete this section. --> ## Added Tooltip for overflown font family text <img src="https://github.com/AppFlowy-IO/AppFlowy/assets/113328135/69da1ac7-8aba-4ac9-84b9-299d977aba49" alt="Image Description" width="500" height="500" /> ### Added the following function to check whether a text is overflowing. ```dart bool _isTextOverflowing(String text, TextStyle textStyle, double maxWidth) { final textPainter = TextPainter( text: TextSpan(text: text, style: textStyle), maxLines: 1, textDirection: ui.TextDirection.ltr, )..layout(maxWidth: maxWidth); return textPainter.didExceedMaxLines; } ``` <!--- ### Feature Preview --> <!--- List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example: fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106 --> --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [x] My code adheres to the [AppFlowy Style Guide](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/style-guides) - [x] I've listed at least one issue that this PR fixes in the description above. - [ ] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [ ] All existing tests are passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 22:19:51 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#5688
No description provided.