[GH-ISSUE #1820] [FR] Implement a divider with a dotted line style #712

Closed
opened 2026-03-23 20:40:02 +00:00 by mirror · 6 comments
Owner

Originally created by @LucasXu0 on GitHub (Feb 7, 2023).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/1820

Originally assigned to: @dimashisenov on GitHub.

Description

Implement a divider with a dotted line style.

  1. Support inserting a dotted line style divider by slash menu.
  2. Support inserting a dotted line style divider by shortcut, ___, three underlines.
Screenshot 2023-02-07 at 20 50 06

Impact

The users who want to use the dotted line style divider.

Additional Context

You can refer to the existing divider codes.

  1. divider_node_widget.dart
  2. divider_shortcut_event.dart
Originally created by @LucasXu0 on GitHub (Feb 7, 2023). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/1820 Originally assigned to: @dimashisenov on GitHub. ### Description Implement a divider with a dotted line style. 1. Support inserting a dotted line style divider by slash menu. 2. Support inserting a dotted line style divider by shortcut, ___, three underlines. <img width="671" alt="Screenshot 2023-02-07 at 20 50 06" src="https://user-images.githubusercontent.com/11863087/217249572-34034181-c025-4f10-a86b-dfcc6c6d4b7e.png"> ### Impact The users who want to use the dotted line style divider. ### Additional Context You can refer to the existing divider codes. 1. `divider_node_widget.dart` 2. `divider_shortcut_event.dart`
mirror 2026-03-23 20:40:02 +00:00
Author
Owner

@dimashisenov commented on GitHub (Feb 24, 2023):

I want to address this issue

<!-- gh-comment-id:1443652432 --> @dimashisenov commented on GitHub (Feb 24, 2023): I want to address this issue
Author
Owner

@annieappflowy commented on GitHub (Feb 25, 2023):

Assigned. Your mentor is @LucasXu0 for this issue. You can reach out to him on Discord in case you need help. Happy coding!

<!-- gh-comment-id:1444996262 --> @annieappflowy commented on GitHub (Feb 25, 2023): Assigned. Your mentor is @LucasXu0 for this issue. You can reach out to him on Discord in case you need help. Happy coding!
Author
Owner

@dimashisenov commented on GitHub (Mar 10, 2023):

I wanted to test existing divider code from divider_node_widget.dart and divider_shortcut_event.dart but it did not work. Moreover, paste and delete also did not work. Seems like a it is an issue on the flutter side. The problem dissapeared after re-running a project, sorry for disinformation

════════ Exception caught by services library ══════════════════════════════════
A KeyRepeatEvent is dispatched, but the state shows that the physical key is not pressed. If this occurs in real application, please report this bug to Flutter. If this occurs in unit tests, please ensure that simulated events follow Flutter's event model as documented in HardwareKeyboard. This was the event: KeyRepeatEvent#0d262(physicalKey: PhysicalKeyboardKey#700e1(usbHidUsage: "0x000700e1", debugName: "Shift Left"), logicalKey: LogicalKeyboardKey#00102(keyId: "0x200000102", keyLabel: "Shift Left", debugName: "Shift Left"), character: null, timeStamp: 88:05:24.586162)
'package:flutter/src/services/hardware_keyboard.dart':
hardware_keyboard.dart:1
Failed assertion: line 432 pos 16: '_pressedKeys.containsKey(event.physicalKey)'

<!-- gh-comment-id:1463777993 --> @dimashisenov commented on GitHub (Mar 10, 2023): I wanted to test existing divider code from divider_node_widget.dart and divider_shortcut_event.dart but it did not work. Moreover, paste and delete also did not work. Seems like a it is an issue on the flutter side. The problem dissapeared after re-running a project, sorry for disinformation ════════ Exception caught by services library ══════════════════════════════════ A KeyRepeatEvent is dispatched, but the state shows that the physical key is not pressed. If this occurs in real application, please report this bug to Flutter. If this occurs in unit tests, please ensure that simulated events follow Flutter's event model as documented in `HardwareKeyboard`. This was the event: KeyRepeatEvent#0d262(physicalKey: PhysicalKeyboardKey#700e1(usbHidUsage: "0x000700e1", debugName: "Shift Left"), logicalKey: LogicalKeyboardKey#00102(keyId: "0x200000102", keyLabel: "Shift Left", debugName: "Shift Left"), character: null, timeStamp: 88:05:24.586162) 'package:flutter/src/services/hardware_keyboard.dart': hardware_keyboard.dart:1 Failed assertion: line 432 pos 16: '_pressedKeys.containsKey(event.physicalKey)'
Author
Owner

@dimashisenov commented on GitHub (Mar 10, 2023):

I am going to slightly modify an existing insertDividerEvent. By adding a check whether textNode.toPlainText()=="_ _ _ ". Is it a proper approach? Or should I write a new event and eventHandler?

<!-- gh-comment-id:1463799299 --> @dimashisenov commented on GitHub (Mar 10, 2023): I am going to slightly modify an existing insertDividerEvent. By adding a check whether textNode.toPlainText()=="_ _ _ ". Is it a proper approach? Or should I write a new event and eventHandler?
Author
Owner

@LucasXu0 commented on GitHub (Mar 16, 2023):

Hey, @dimashisenov. You should write a new event to handle it.

<!-- gh-comment-id:1471444773 --> @LucasXu0 commented on GitHub (Mar 16, 2023): Hey, @dimashisenov. You should write a new event to handle it.
Author
Owner

@dimashisenov commented on GitHub (Mar 17, 2023):

should I change a type of the variable kDividerType to enum? Since we are having second type of divider.

image

<!-- gh-comment-id:1473720593 --> @dimashisenov commented on GitHub (Mar 17, 2023): should I change a type of the variable kDividerType to enum? Since we are having second type of divider. ![image](https://user-images.githubusercontent.com/52742831/225894876-78298fc7-2c5f-47c9-a3aa-f97795dcf81d.png)
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#712
No description provided.