-
Notifications
You must be signed in to change notification settings - Fork 73
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
I194 footnotes #195
base: master
Are you sure you want to change the base?
I194 footnotes #195
Conversation
to include the scalar link plugin option
to avoid any potential collisions with the Scalar instantiated toolbar `toolbar_Scalar`
Hi @alexdryden , thanks so much for putting this together. On review, I think this would be a great addition to Scalar if we can work out a few details. Here are the major questions I have:
I've got some other notes, but most are cosmetic -- let me know what you think about the questions above. |
Great to hear @eloyer. On the first issue, very good question. I haven't done any testing with the Editorial Workflow yet. There is another issue I have had on my plate to test with the Editorial Workflow, and I have some time free tomorrow, so I'll let you know what I find. If I'm understating you, the testing steps would look something like this:
Is that right? For the second issue, there are two complimentary ways I have been approaching it. The first is to use
This seems to work well and I think it would do as a minimum viable solution. 10 may be a bit much because we have an additional branding header that adds space. The other thing I've been playing with is using an animation to highlight the footnote/in-text marker so it is easier to find the correct note at the bottom of the page and then to find where you left off when you return to the text. I'm pretty sure I also borrowed this from a demo of the upstream footnote plugin, but it reminds me of the google feature that highlights the answer to the question you searched for when visiting the page with the answer. This is what I have right now:
It would be nice if it would highlight a line of the text in the body immediately before the footnote, but I've not come up with a good way to implement that. The example I have to demo this is behind our campus firewall, but I can put something together in our sandbox to share publicly while I'm testing tomorrow. Thanks for your willingness to engage with this pr. |
Yes, that should cover it re: Editorial Workflow. Would be very interested to see what's possible with highlighting, and the scroll-margin-top sounds like a good approach. Thanks! |
Your instincts were spot on abut the Editorial Workflow. I tried doing all the tests in a single page, but it was pretty badly broken once the edits got back to the author for review (footnote section numbering was wrong and even after clicking "accept all" I couldn't move it to the next editorial phase), so I'll have to tease out each test in a separate page. One of the major issues I know I'll have to tackle is how to handle approval for changes that are decoupled by the track changes feature (like deleting a note--you could accept the deletion of the in-text anchor but reject the deletion of the footnote below). I think I'll need a better understanding of how the editorial system is implemented before I can devise a solution. Can you point me to that component and/or any documentation for it? |
OK, yes it sounds like it'll need some careful attention — the diff handling has been notoriously difficult to troubleshoot in the past. The CKEditor plugin that handles EW functions is here and fairly well documented, feel free to send along any questions. |
Awesome, thanks Erik. I'll start digging through the EW plugin over the next two weeks and being to map out a plan. |
Just a follow up to update on progress, and to prevent this pr from going stale. Integrating with the editorial workflow did prove difficult, particularly with the diff. We have a version that is working now and have some additional beta testing planned with a class that will be using the footnote feature next semester. So, hopefully we'll have an updated pr to review later in the spring of 2023. |
Thanks for the update, looking forward to the results of your testing! |
Hello again! The feature has been pretty well received among our group of users and, importantly, I think I've come up with a plan to make it more compatible with the editorial interface if you are still interested in the pr. The new approach is based on the way Wordpress uses shortcodes to implement features, including how Pressbooks implements their footnote/endnote solution. So, the current workflow in this widget involves putting the marker- and note-ordering logic within the scope of the WYSIWYG, which creates a lot of opportunities for bugs to crop up in the editorial workflow, especially if notes are moved, deleted or otherwise renumbered. Instead, for the Wordpress shortcode inspired approach, the widget would simply insert a
with some kind of visual indicators around the footnote text. And then the placement of the markers and assembly of the footnote section would happen through DOM manipulation when the page is being built for readers. With this approach, from the perspective of the diff algorithm, the footnotes don't add any additional complexity because within the WYSIWYG they don't appear or behave differently from any other text. What do you think? Does this sounds like a reasonable approach? |
Hi @alexdryden This approach looks good to me. I'm newer to this thread so don't know for sure, but it seems this new solution allows footnote text to show up in the WYSIWYG for editing? In which case editors and authors can work on footnote texts right there in the editor along with the main content body? This sounds exciting! What would be next steps? |
@craigdietrich great! Yeah, you have it right in terms of how authors and editors could see and edit footnote text in the WYSIWYG. For next steps, I'll go ahead and get started on the new approach and update the pull request. |
@alexdryden @craigdietrich @eloyer Hello Guys, My be this question do not belong here but I did not find any forms or blog. I am new to scalar and started my new job few months ago at Case western University. We are using sclar installed on our server. How can I check which version we are using and what is best way to upgrade to current version. |
This is the solution IOPN has been developing to address #194. It was derived from this plugin. The upstream source uses a Wikipedia style footnotes system where multiple in-text flags can point to a single footer notation (demo). We weren't going to use that feature, so I removed the UI elements that facilitated it and refactored out the logic that was strictly devoted to managing that feature.
However, it could still be refactored further. For example, the
data
object used in plugin.js here originally contained an associative array that countedoccurrences
of in-text flags per footer notation, in addition to theorder
of the notations . Now thedata
object just only contains theorder
of notes as an array, and would probably make more sense as a stand-alone array. Hopefully that background makes it a bit more readable, but I wanted to get the ball rolling on this issue while there was momentum.