Skip to content
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

invalid page, invisible custos? - Neon allows user to input glyphs outside of facsimile, results in invalid folio #700

Closed
annamorphism opened this issue Aug 10, 2021 · 16 comments
Assignees
Labels
Project: Neon Part of the Neon project. Applies to every issue. Severity: MEDIUM Moderate problem affecting usability or a necessary feature.

Comments

@annamorphism
Copy link

In an issue possibly related to #651 and #697, a page turned up as invalid after some very trivial button click (sadly, I don't remember what). "Undo" created an apparently identical but valid page (see below)
image
image
As it turns out, the MEI files for these two states is not identical; the "invalid" version has a custos on G at the end of the tenth staff, where the "valid" one does not:
image
image

The zone for this otherwise invisible custos is outside the bounds of the page:
image

@annamorphism
Copy link
Author

aha! The problem seems to be that one might click outside of the facsimile while still in "insert" mode. On the right side of the page this amounts to clicking in the area with the edit information and does nothing. In the white space below the page, the elements are inserted at the same x coordinate and a y-coordinate corresponding to C0 on whatever the lowest staff is. However, clicking in the white space either to the left or above the facsimile "inserts" the element into a zone with negative (i.e. invalid) coordinates.

@JoyfulGen JoyfulGen changed the title invalid page, invisible custos? invalid page, invisible custos? - Neon allows user to input glyphs outside of facsimile, results in invalid folio Feb 3, 2022
@JoyfulGen
Copy link
Contributor

Whoa, I think this explains a few invalid folios I had that I couldn't figure out... I just experimented with it and I got the same results. You can tell a glyph is being added, because the other glyphs change colour (see below for pretty video). This is a cool discovery! The problem is that once the glyph is input into the white space around the facsimile, it's not visible in any way, so you can't select it and delete it. If you realize the problem fast enough, you can undo the actions and everything is fine. If you don't, the only way to remove the glyph is by going in the MEI, as @annamorphism did.
I think a good fix would be to restrict the possible glyph-inputting area to the facsimile, so that even if you do click on the white space by mistake, nothing happens.

Glyphs.input.into.void.mov

@JoyfulGen JoyfulGen added Project: Neon Part of the Neon project. Applies to every issue. Severity: LOW Minor problem or a feature that would make life easier. labels Feb 3, 2022
@JoyfulGen JoyfulGen added Severity: MEDIUM Moderate problem affecting usability or a necessary feature. and removed Severity: LOW Minor problem or a feature that would make life easier. labels May 30, 2022
@jinh0 jinh0 self-assigned this Jul 4, 2022
@yinanazhou
Copy link
Member

Hi @JoyfulGen, I've pushed the changes for this issue to the Github page. Please let us know if it works as expected.

@JoyfulGen
Copy link
Contributor

@yinanazhou this is great! I love the error message, everything is very clear. I tried inserting all the single glyphs and everything works. However, Neon did allow me to insert a staff out of bounds, which made the folio invalid. Could you extend the fix to include staves?

@yinanazhou
Copy link
Member

@jinh0 noticed that the OOB check has two issues with bounding box:

  • Moving any bbox to anywhere would show the OOB error (traced back to selectionBBox, will discuss tomorrow)
  • resizing bbox to OOB has no OOB check

@yinanazhou
Copy link
Member

@yinanazhou this is great! I love the error message, everything is very clear. I tried inserting all the single glyphs and everything works. However, Neon did allow me to insert a staff out of bounds, which made the folio invalid. Could you extend the fix to include staves?

Hi @JoyfulGen, I have pushed the changes for staff insertion. Please let us know if it's working as expected. Thanks!

@JoyfulGen
Copy link
Contributor

JoyfulGen commented Jul 20, 2022

@jinh0 noticed that the OOB check has two issues with bounding box:

* [ ]  Moving any bbox to anywhere would show the OOB error (traced back to `selectionBBox`, will discuss tomorrow)

* [ ]  resizing bbox to OOB has no OOB check

The same problem exists with some staves #920 (comment)
EDIT: It appears to be only the first staff of every folio that can't be moved. All the other staves are ok. Also, in the case of BBoxes I can neither resize them or move them, whereas I can't move the first staff, but I can resize it.

@JoyfulGen
Copy link
Contributor

@yinanazhou this is great! I love the error message, everything is very clear. I tried inserting all the single glyphs and everything works. However, Neon did allow me to insert a staff out of bounds, which made the folio invalid. Could you extend the fix to include staves?

Hi @JoyfulGen, I have pushed the changes for staff insertion. Please let us know if it's working as expected. Thanks!

Fixed! I can't insert staves out of bounds anymore.

@annamorphism
Copy link
Author

Also, in the case of BBoxes I can neither resize them or move them, whereas I can't move the first staff, but I can resize it.

I can resize them but not move them! I can even resize them so an edge goes off the page, but then not move it so it's all on the page. Wild!

@jinh0
Copy link
Collaborator

jinh0 commented Jul 20, 2022

Hey everyone, I have fixed the bounding box issue (I'll push the changes soon), but regarding staves, it's because clefs are really weird!

Clefs have a bounding box that starts from x=0 and y=29250??????


Anyway, the fix I'm thinking of thus is that we exclude the bounding boxes of clefs in our OOB calculation.

But can somebody confirm whether clefs are supposed to have such weird coordinates?

@jinh0
Copy link
Collaborator

jinh0 commented Jul 21, 2022

UPDATE on the clefs: for some reason, Verovio seems to generate an extra clef in the first staff, which is not reflected in the MEI file, that has coordinates x=0 and some outrageous y-value. What's even weirder is that this y-value varies by folio. One folio has a y-value of 29342 while another has a y-value of 29250. Worth investigating.

@JoyfulGen
Copy link
Contributor

JoyfulGen commented Jul 21, 2022

@jinh0 it looks like liquescents are also behaving weirdly. I can't move either upwards or downwards liquescents without getting an OOB notification.

EDIT: It's fun to note that I can't move a liquescent, but I can change it into a punctum, move that, and then change it back.

@annamorphism
Copy link
Author

@JoyfulGen I can move some of the liquescents, some of the time...as long as I'm very gentle and stay on the staff and don't move left or right. But if I move them too many times or in the wrong way they get very upset and don't want to do anything anymore.

@yinanazhou
Copy link
Member

Hi @JoyfulGen, I've pushed the fix for the bbox and staff resizing.

@JoyfulGen
Copy link
Contributor

Indeed! Neon won't let me resize a bbox or a staff outside the page anymore. This is fixed!

@JoyfulGen
Copy link
Contributor

From what I understand, all of these issues have been fixed. Neon won't let you input, drag, or resize anything out of the page's bounds. Closing issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Project: Neon Part of the Neon project. Applies to every issue. Severity: MEDIUM Moderate problem affecting usability or a necessary feature.
Projects
None yet
Development

No branches or pull requests

4 participants