Open botwhytho opened 1 week ago
@JurajKubelka mirroring some Discord comments here that are relevant:
The functionality to provide the hook point is pretty quick to implement, I can open a quick PR for that. What I think feenk might need to assist with:
- Error handling & falling back to a sane default if one opens a database with an unknown page type
- A collection of GtAdvices and/or page in the Gt book that explains the various methods one may need to define/override if creating a custom LePageType subclass. I have a dummy custom page type working right now but if I restart the image or reload the database, I get deserialization errors and Lepiter marks the file tied to that page corrupt
Have encountered multiple errors along the way that are not clear at the outset and have required me to override various methods as LePageType is an abstract-ish class
From Discord thread. Copying message content below.
LePage>>#asPhlowTool
should delegate toLePageType
hierarchy for the default (or custom) composite tools. CurrentlyLePage>>#asLepiterPagePhlowToolFocusStatus:
has the default composite tool defined as:This should be defined in
LePageType
and any subclass should be able to override I already have 2 packages that use Lepiter pages to store arbitrary json in custom snippets. It would be nice to turn the Lepiter pages these packages use into having custom page types so that when I open those pages they are displayed differently. I have a third use case I want to work on which is a kanban board in Gt. I would want to store a 'board' as a Lepiter page, with lists and cards as snippet hierarchies. The default display of that should be a kanban board view, NOT a normal Lepiter page. Currently it doesn't seem possible to do what I want without the above refactorings in Gt