Closed (fixed)
Project:
Hypothesis
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Plan
Assigned:
Unassigned
Reporter:
Created:
31 Oct 2018 at 11:00 UTC
Updated:
11 Jun 2019 at 15:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
f2boot commentedHere is a patch file porting hypothesis from 7.x-1.x to 8.x-1.x
Not tested thoroughly yet, but seems fine as a starting point
Moving now to working on a 8.x-2-x branch that would better use D8 functionalities (Block or Conditions system)
Comment #3
f2boot commentedHere is a patch file porting drupal/hypothesis module from 7.x-1.x to 8.x-2.x (so it is an alternative to previous patch)
Hypothes.is client javascript is loaded in a (invisible) block.
The core of the initial module is preserved but all configurations are managed through the block system.
Comment #4
f2boot commentedFound two errors in #3 patch. Please use this one
@Maintainers, I have also made patches to restore "load hypothesis" permission and to allow user override showHighlights and openSidebar settings. I will add issues and upload patches for them if/when 8.x-2.x branch (or alike) is created.
Thanks
Comment #5
luke adams commentedHey f2boot, we appear to have done nearly the same exact thing! lol idk how I didn't catch this issue 4 days ago when I decided I needed a D8 port of this... anyway I've created an issue in the d.o contrib_tracker project and uploaded a zip of my D8 version of this.
https://www.drupal.org/project/contrib_tracker/issues/3012400
I've got my copy of this running in a dev site and behaving super nicely. I wonder if the block approach is best stuck into like a hypothesis_block module or something vs a total redo on how this module is setup and configured? It does seem to make sense, to just leverage how Drupal manages block visibility... could just add via the block management page or render said block via the theme.
Comment #6
f2boot commentedHi Luke,
Got a quick look to your code and looks like we got it very close indeed (I think yours is a bit cleaner ;) )
I have tried this "block" approach (#4) and I am using it on a dev site. At this point, I would say it is a better approach since it has much less code and we can use all context plugins to manage visibility.
I also have now a few other features on my dev site:
- add user prefs to use hypothesis or not (+ showHighlights and openSidebar)
- made a module derived from drupal/pdf to have hypothesis on pdf files
- working on a module to apply hypothes.is to html file in an iframe
I would love hypothesis code maintainer would open a 8.x branch so it is easier to share this.
Comment #7
bramdriesenUpdated version. Not to sure the patches of this issue are going to be used since the maintainers seem to be working on sub-issues to do the porting.
Comment #9
rahul.shindeClosing this as we have https://www.drupal.org/project/hypothesis/releases/8.x-1.x-dev released.