bss icon indicating copy to clipboard operation
bss copied to clipboard

Meta concerns

Open barneycarroll opened this issue 6 years ago • 2 comments

I'd like to be able to run an application across several windows. At this point, the don't make me think magic style injections become a limitation.

I realise addressing this kind of outside context problem raises all sorts of other concerns - why not chuck in SSR and GTK native decorators while we're at it? - but for my part I'd be happy with what I think is a pretty modest proposal - a b.toString() method that returns the whole sheet as a string.

I think this would do a good job of preempting meta concerns down the road (multiple instances, stateless mode, etc) without complicating the API too much.

barneycarroll avatar Jun 14 '18 19:06 barneycarroll

Hi @barneycarroll ...

There's currently an undocumented method called getSheet which is used for the tests. It'll clear any rules when being called, since that's relevant during testing, but I'm not sure it's desirable for something like this.

I'd like to make this thing into a documented option (but with the clearing part pulled out into it's own method), and I suppose that would be exactly what you need. (also what might be needed for SSR).

What do you think?

porsager avatar Jun 14 '18 19:06 porsager

I got it working. This code breaks BSS default workflow but allows the whole sheet to be accessed consistently:

import b from 'bss'

let style = ''

export () =>
  style += b.getStyle()

barneycarroll avatar Jun 15 '18 14:06 barneycarroll