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

Page/RichText Footnote Validation #17

Open
CamLamb opened this issue Jun 25, 2021 · 3 comments
Open

Page/RichText Footnote Validation #17

CamLamb opened this issue Jun 25, 2021 · 3 comments

Comments

@CamLamb
Copy link

CamLamb commented Jun 25, 2021

Draftail allows copying and pasting of text from one instance to another.
If I copy text containing a footnote reference from one page to another, there won't be a footnote related to that page to display.

Current Behaviour:
The page saves fine and renders with no errors. However, there is an unlinked footnote reference in the page as there isn't a related footnote to link to.

Expected Behaviour:
On save, a validation error is raised that informs the user that there is an invalid footnote in the RichText.

Current thoughts on how to fix:
I think this is going to need a Mixin that people can add to their Page models. The mixin will define the validation logic for the footnotes.

@zerolab
Copy link
Member

zerolab commented Jul 1, 2021

One way around it is to keep track of the references on the page and probably drop on paste.
Could the footnotes be re-used? i.e. create/edit in one place, update everywhere. This would allow re-use, including copy/paste

@CamLamb
Copy link
Author

CamLamb commented Jul 20, 2021

Reusing footnotes across multiple pages is something that has crossed my mind a few times, but I feel like this could get out of control quite quickly depending on the number of footnotes a website has. Things that would need to be REALLY good would be:

  • Searching for existing footnotes
  • Being very transparent in what pages a footnote is used on
    • Permissions for adding/updating/deleting footnotes
    • Checking that the user has access to edit the contents of all the linked pages when altering a footnote, etc.

@benjaoming
Copy link
Contributor

It's too complex to reuse Footnotes IMHO. We run into a complex issue where if the footnote is edited on one page, the consequences on another page reusing the same footnote are undefined and need to be resolved by the user through additional UI.

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

3 participants