ReSpec extension architecture question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ReSpec extension architecture question

Shane McCarron
Robin et. al,

I know that we have discussed a next generation ReSpec.  That's exciting, but honestly I have more immediate needs and I don't hate the current architecture. 

However, one of my immediate needs I don't have a clear idea how to satisfy.  I could use some help.

The PFWG is developing a core ARIA spec and now has an environment in which it is possible to define extension specs.  The extension specs will be referencing LOTS of stuff in the core spec, and will also need some (relatively dynamic) data structures from the core spec in order to populate certain parts of the extension spec so that it is a seamless extension.

That's great, and I have a design for it.  However, in order to support the design, I really need a way to easily stringify some JS structures from the core spec and save them.  That's not terribly challenging code-wise.  But I really want to add an item to the ReSpec UI pull down menu.  Something like "Save Role Info" that would generate a specific file and let the user save it to disk. 

I could pour through the code and find a hook for this.  Or add one if it doesn't exist.  But I have 100 other things to do too, so before I do that, help?  Is there an easy way for a ReSpec document to add to the UI without creating a custom profile?  Or is there some other clever way to get this data out of one spec and into another without building a backend data service?

--
Shane McCarron
Managing Director, Applied Testing and Technology, Inc.
Reply | Threaded
Open this post in threaded view
|

Re: ReSpec extension architecture question

Robin Berjon-6
On 13/02/2015 23:44 , Shane McCarron wrote:
> I could pour through the code and find a hook for this.  Or add one if
> it doesn't exist.  But I have 100 other things to do too, so before I do
> that, help?  Is there an easy way for a ReSpec document to add to the UI
> without creating a custom profile?  Or is there some other clever way to
> get this data out of one spec and into another without building a
> backend data service?

There currently is nothing, but it would be pretty easy to add a
configuration option to add new UI modules. You just need to 1) load a
UI module and 2) call ui.addCommand() as is done in
https://github.com/w3c/respec/blob/develop/js/profile-w3c-common.js#L59.

--
Robin Berjon - http://berjon.com/ - @robinberjon

Reply | Threaded
Open this post in threaded view
|

Re: ReSpec extension architecture question

Shane McCarron
I wonder if it wouldn't be relatively easy to hook it into the event architecture.  I will check both approaches.  Thanks!

On Sat, Feb 14, 2015 at 3:22 PM, Robin Berjon <[hidden email]> wrote:
On 13/02/2015 23:44 , Shane McCarron wrote:
I could pour through the code and find a hook for this.  Or add one if
it doesn't exist.  But I have 100 other things to do too, so before I do
that, help?  Is there an easy way for a ReSpec document to add to the UI
without creating a custom profile?  Or is there some other clever way to
get this data out of one spec and into another without building a
backend data service?

There currently is nothing, but it would be pretty easy to add a configuration option to add new UI modules. You just need to 1) load a UI module and 2) call ui.addCommand() as is done in https://github.com/w3c/respec/blob/develop/js/profile-w3c-common.js#L59.

--
Robin Berjon - http://berjon.com/ - @robinberjon



--
Shane McCarron
Managing Director, Applied Testing and Technology, Inc.