Skip to content

Improve Layout Menu#238

Merged
AdventurousGui merged 11 commits into
stjiris:mainfrom
AdventurousGui:layout-menu
May 28, 2025
Merged

Improve Layout Menu#238
AdventurousGui merged 11 commits into
stjiris:mainfrom
AdventurousGui:layout-menu

Conversation

@AdventurousGui
Copy link
Copy Markdown
Collaborator

@AdventurousGui AdventurousGui commented Apr 15, 2025

The menu for marking layout boxes to OCR presents user experience issues:

  • When moving and resizing the browser window, the boxes are not redrawn in the appropriate coordinates.
  • In Firefox, the box preview is absent when dragging over the picture, and the position of existing boxes cannot be adjusted.
  • The list of boxes cannot be reordered, and their grouping by type can make it difficult to keep track of the same box or undo accidental changes.

With this PR:

  • Boxes are drawn in the appropriate relative position to the page image when resizing the browser window.
  • Firefox shows the box preview, but adjusting the corners of existing boxes is still unresponsive most of the time.
  • Using a new library dnd-kit, boxes can be reordered, to adjust their ID numbers according to the list order. The IDs are independent from box types, and boxes retain the same ID when changing their type from "text"/"remove" to "image".

Unresolved problems:

  • Boxes that are cloned to all pages cannot be easily removed and "ungrouping" them has no effect: they must be deleted one by one.

The grouping feature is only enabled for text boxes; this change prevents circumventing by creating the group and then changing its type to "Remover" or "Imagem"
A box whose type is switched retains the ID unique ID number. The user is informed of the box type by a prefix letter (T, I or R) which does not interfere with the ordering by ID number.

AdventurousGui/updates-OCR#3
AdventurousGui/updates-OCR#4
@AdventurousGui AdventurousGui self-assigned this May 3, 2025
@AdventurousGui AdventurousGui marked this pull request as ready for review May 3, 2025 14:27
@AdventurousGui AdventurousGui merged commit 179a672 into stjiris:main May 28, 2025
@AdventurousGui AdventurousGui deleted the layout-menu branch August 4, 2025 22:12
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.

1 participant