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

Rename DC or AE glyph should propagate to all parent glyphs #24

Open
justvanrossum opened this issue Apr 27, 2021 · 2 comments
Open

Rename DC or AE glyph should propagate to all parent glyphs #24

justvanrossum opened this issue Apr 27, 2021 · 2 comments

Comments

@justvanrossum
Copy link
Collaborator

justvanrossum commented Apr 27, 2021

As discussed during the meeting today, this isn't easy.

In my view, this is what should happen, when a DC or AE gets renamed:

  1. Check which parent glyphs use the DC/AE being renamed
  2. Lock all involved glyphs. If locking fails: bail out, don't rename (report who owns the locks)
  3. Check that the set calculated in step 1 is still the same. If no: unlock and bail out
  4. Rename the DC/AE, and fix the references in all the parent glyphs
  5. Unlock all

Should this be done at the RoboCJK client level, or is it a task that can be delegated to the server? The latter would be much better for performance.

My assuption: renaming DCs or AEs should be rare, therefore it's an acceptable tradeoff that the procedure to do it is a little slow or cumbersome.

Cc @fabiocaccamo @GaetanBaehr @JeremieHornus @jbmorizot

Also relates to #23: renaming should be impossible to do accidentally, and should require an obnoxious comfirmation dialog.

@justvanrossum
Copy link
Collaborator Author

I was trying to think whether grandparent CGs of AEs should also be locked when an AE get renamed, but I don't think that's the case.

@fabiocaccamo
Copy link
Member

Thank you @justvanrossum, very good summary.
Yes, the fastest solution would be to do it server-side.
This change would require the .glif xml data to be changed on the server-side (actually we never touch it).

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

No branches or pull requests

2 participants