[annotator-dev] Make a package of current 2.0 annotator

Tyler Burton btburton42 at gmail.com
Fri Sep 25 23:41:38 UTC 2015


I see in this github issue (
https://github.com/openannotation/annotator/issues/565) that you're
suggesting a developer can create their own ui.main as an file external to
annotator --and internal to a module for example-- and pass that in when
initializing annotator so that they can use their own templates, etc. This
is what we're looking to do. We have our own UI and just want to make sure
that we're tying into the annotation lifecycle events (like
beforeAnnotationCreated, etc).

Having said that, ui.main is pretty massive and each file relies on several
other files (like widget.js). Do you have any suggestions or examples for
good place to start if one is going to be creating their own ui.main in
their project?

Thanks again...

On Thu, Sep 24, 2015 at 5:08 PM Randall Leeds <randall at bleeds.info> wrote:

> It sounds like you're in a nasty middle area that really we don't support.
>
> What I hear is that you:
>
> - Want the built in UI
> - Want to customize its templates
>
> What we got in Annotator 2.0 is
>
> - You can use **or not use** the built in UI
>
> So you should be looking to build UI from scratch and we should talk about
> your needs and what we might do to make this easier.
>
> On Thu, Sep 24, 2015 at 5:01 PM Tyler Burton <btburton42 at gmail.com> wrote:
>
>> running `npm link` from pkg still creates a link at the repository level,
>> i.e. nothing changes. i'd be curious to see if anyone else is having the
>> same experience.
>>
>> our chief concern with modifications to core is creating a custom UI, so
>> that we can pass our own templates into annotator and have them registered
>> as dialog's, editors, etc. right now we are hooking into lifecycle methods
>> but nothing more. i know from previous discussions that it was one of the
>> chief goals of 2.0 to decouple the UI, but i'm wondering if i should create
>> a github issue to track this future functionality if there's enough
>> interest among the community?
>>
>> thanks again,
>> tyler
>>
>> On Thu, Sep 24, 2015 at 4:08 PM Randall Leeds <randall at bleeds.info>
>> wrote:
>>
>>> Oh, that's right. I forgot that we're outputting the build into pkg.
>>>
>>> I'll see what I can do about improving that. In the meantime, you could
>>> run `npm link` from the pkg directory after running `make`.
>>>
>>> However, I would still most love to know what customizations you need in
>>> core.
>>>
>>> On Thu, Sep 24, 2015 at 11:35 AM Tyler Burton <btburton42 at gmail.com>
>>> wrote:
>>>
>>>> Hi Randall,
>>>>
>>>> Following your NPM link suggestion I've linked the annotator repo and
>>>> then consumed it via NPM into my module, however the `pkg` directory is now
>>>> empty. I've used NPM link before with no problems. Can you confirm that
>>>> this might just be a local issue with my own project? AFAIK I should be
>>>> seeing an index.js file in the root of the NPM module, correct?
>>>>
>>>> Screenshot is attached or otherwise available at:
>>>>
>>>> https://www.dropbox.com/s/7zk3xb4unzoseb2/Screenshot%202015-09-24%2011.30.33.png?dl=0
>>>>
>>>> [image: Screenshot 2015-09-24 11.30.33.png]
>>>>
>>>> Also
>>>>
>>>> On Wed, Sep 23, 2015 at 4:46 PM Randall Leeds <randall at bleeds.info>
>>>> wrote:
>>>>
>>>>> https://docs.npmjs.com/cli/link
>>>>>
>>>>> If you can, though, please send a note to the mailing list or open an
>>>>> issue, and if you already have make more noise, when you have reason to
>>>>> make changes to the core.
>>>>>
>>>>> Some things, like ui.main, are meant to be a bit of a template, and
>>>>> you can copy them into your own project, change them, and build an
>>>>> application from there, including that in your annotator application rather
>>>>> than including a modified annotator build with a changed ui.main.
>>>>>
>>>>> For everything else, if you have a reason to change the core, let's
>>>>> talk.
>>>>>
>>>>> On Wed, Sep 23, 2015 at 3:35 PM Tyler Burton <btburton42 at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> I'm currently developing a module that will consume annotator and use
>>>>>> some forked modifications to Annotator UI main. Can anyone volunteer their
>>>>>> best suggestions for working with changed versions of Annotator core in my
>>>>>> current module repository?
>>>>>>
>>>>>> I have been considering building a new version of annotator.js each
>>>>>> time I make a change using the 'make pkg/annotator.min.js'
>>>>>> referenced in the HACKING.rst doc, but it tells me "make: Nothing to be
>>>>>> done for `all'." or that "make: `pkg/annotator.min.js' is up to date."
>>>>>>
>>>>>> If there is a better way to live compile a version and symlink it
>>>>>> into my project I'm open to other suggestions as well.
>>>>>>
>>>>>> Many thanks,
>>>>>>
>>>>>> Tyler Burton
>>>>>> btburton42 at gmail.com
>>>>>> --
>>>>>> --
>>>>>> Tyler Burton
>>>>>> btburton42 at gmail.com
>>>>>>
>>>>> _______________________________________________
>>>>>> annotator-dev mailing list
>>>>>> annotator-dev at lists.okfn.org
>>>>>> https://lists.okfn.org/mailman/listinfo/annotator-dev
>>>>>> Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev
>>>>>>
>>>>> --
>>>> --
>>>> Tyler Burton
>>>> btburton42 at gmail.com
>>>>
>>> --
>> --
>> Tyler Burton
>> btburton42 at gmail.com
>>
> --
--
Tyler Burton
btburton42 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20150925/b6bcf1f4/attachment-0004.html>


More information about the annotator-dev mailing list