▣🔗 Asset Link dev log

I’ve been kind of quiet on the development front recently. Mostly I’ve been working on outdoor/electronics/electrical projects, but some of my time has gone into a project that I’d like to share which I’m calling “Asset Link”.

The idea stems from a custom tool I had built for 1.x called “Rabbit Link” which we use to manage rabbit animal assets.

Rabbit Link

Basically, Rabbit Link is a simplified interface which codified our conventions for managing rabbits, their cage locations, and various breeding/maintenance tasks. It also worked offline since caching the data for all our animals in the browser was trivial.

Here are a few screenshots showing Rabbit Link in action;

Navigating cages and moving a rabbit

Breeding status

Aspirations

Rabbit Link has been a key part of making it possible to manage between 50 and 75 rabbits and their associated care/breeding/etc.

What we’ve learned is that we really need something like Rabbit Link that works more generally for all our asset types.

Thus was born the concept of “Asset Link”.

Obviously, the set of actions and key data fields for all asset types can’t just be hard-coded like I did for Rabbit Link so instead many aspects must be extensible, but a lot of the underlying mechanism for an online/offline capable asset tool is pretty general.

I don’t yet know for sure how the future looks for Asset Link as compared with Field Kit - except that I wanted my own playground to prototype in and (probably) make my own mistakes… :sweat_smile:

In my next post (hopefully in the morning) I’ll share a little about my current development progress on Asset Link.

5 Likes

What’s working so far

  • Loading of farmOS API schemas into Orbit.js
  • Online/offline search/modification/syncing of assets (pre-caching logic could probably use some tuning)
  • A simple plugin model where a list of plugin urls (a plugin repository) is obtained from the farmOS server and loaded/cached as plugin classes
  • Simple “action provider” and “asset searcher” plugins (see below)

2022_03_15_asset_link_preview

Outstanding for a very early alpha release

  • Finish implementing “sync tray” showing pending asset/log creation/modification/etc
  • Finish implementing floating button/menu in farmOS that facilitates navigating to Asset Link from the normal farmOS asset view
  • Cleanup and document plugin API
  • Cleanup and misc polish for code-base

Outstanding after that

  • Expand capabilities that plugins can provide
    • Allow plugins to conditionally provide widgets on the view of an asset
    • Allow plugins to add whole new pages
  • Figure out how file uploads work through Orbit.js
  • Improve asset/log pre-caching
  • Implement farmOS admin interface to add/disable plugins for default plugin repository
  • Add (optional) interface to Asset Link where “user plugin repositories” can be added locally
  • Add more default plugins
    • Geolocate searching (just need to port this to Orbit.js since I had it working before with direct API calls)
    • Asset photos & photo upload
    • Simple action plugin wizard (allow simplest action provider plugins to be authored without code)
      • i.e. to create basic logs and modify list/text/numeric asset attributes
    • Simple plugin editor (provide a “quick start” editor that helps author/test/publish simple plugins)
3 Likes

This is AWESOME @Symbioquine!!! I’m looking forward to seeing it in more detail on the dev call this week!

1 Like

Since last post

  • Made search work offline and faster online
  • Made queries against all asset types work faster by allowing Orbit.js to run them in parallel
  • Implemented floating menu on farmOS asset pages that precaches Asset Link and assets.
    2022_03_21_asset_link_preview
  • Implemented basic “sync tray” showing pending changes to assets
    2022_03_21_asset_link_preview_2

Outstanding for a very early alpha release

  • Finish implementing “sync tray” showing pending asset/log creation/modification/etc
  • Finish implementing floating button/menu in farmOS that facilitates navigating to Asset Link from the normal farmOS asset view
  • Cleanup and document plugin API
  • Cleanup and misc polish for code-base
4 Likes

I’ve pushed an early development version of the code to GitHub - symbioquine/farmOS_asset_link at development

Folks should feel free to follow along and/or contribute. :grin:

I will continue to share significant development milestones in this thread.

3 Likes

This sounds like a really handy tool for in-field use!

Question: Would it be possible to add a contrib module like this to my instance at farmier?

1 Like

I like that idea @walt - but I would want to wait until @Symbioquine tags a beta release, so that there are automated updates between versions.

2 Likes

I’ve now released version 0.1.1 with the following change-log;

[0.1.1] - 2022-05-27

Added

  • Automatically reload core plugins when they change in a development context
  • Add the //# sourceURL pragma to the end of plugins so they appear nicely in the debugger
  • Implement a “move asset” action provider plugin

Fixed

  • Return an HTTP 500 error when built artifacts are missing
  • Removed some unnecessary logging
  • Fixed support for custom dialogs
  • Improve handling of plugin component parse errors

Screenshots

2022_05_27_plugin_live_reload_changes

2022_05_27_plugin_live_reload_errors

image

2 Likes

I’ve now released version 0.2.1 with the following change-log;

[0.2.1] - 2022-05-31

Changed

  • Improved caching of vue component plugins to speed up loading
  • Introduced slot system so plugins can render arbitrary components on pages
  • Converted asset page to be a plugin
  • Refactored asset actions to be rendered by a page slot plugin
  • Refactored actions to just be another type of slot
  • Introduced a widget system where plugins can render widgets that other plugins can decorate
  • Implemented widget decorators to add sex and archived status widgets to the asset name

archive_unarchive_widget_decorators

3 Likes

This looks so useful, @Symbioquine, i’d really like to give it a try. Two related questions:

  1. Client side: what is the mobile platform requirement? Android, iOS… Is it a PWA?
  2. Server side: dunno if we’ve passed that “beta release” threshold Mike set as a precondition for Farmier deployment (?), but if not, then is there a test server online to which one might connect it for testing purposes?
1 Like

Would you consider installing a VM on your local machine for testing?

1 Like

As an alternative to Farmier-hosted, which i would prefer, then… Yes, @Farmer-Ed: i’m gonna have to get over my aversion to installing a local instance someday, and this is as good an excuse as any, so i would consider it (so long as it’s a simple point&shoot operation on mac <8-)…

2 Likes

ah but… you’d have to get your hands a little dirty. Don’t know about installation on a Mac but I use Virtualbox to host a Linux instance on my Windows laptop. Virtualbox is available for Mac and you can take snapshots as you go, so you can instantly restore to any previous snapshot which makes it perfect for testing.
But you do still need to setup your guest OS and install/configure farmOS.

Anyway we could discuss it further elsewhere if that is something you are interested in, don’t want to derail this thread too much.

2 Likes

Thanks for the interest and following along with my progress here! It definitely helps me stay motivated.

Asset Link is a PWA. I intend to target only recent stable versions of Firefox and Chrome (probably < 1yo) - though I would consider contributions that improve compatibility beyond that.

Asset Link is still very much pre-alpha software. I’m eager to have folks test it out, but I’d be getting ahead of myself if I were to suggest that Asset Link is ready for that at the moment.

I like the idea of a test server, but I can’t promise I’ll have bandwidth to set one up in the near future.

2 Likes

I’ve now released version 0.3.2 (0.3.1 didn’t build) with the following change-log;

[0.3.2] - 2022-06-09

Fixed

  • Fix bug with build writing config entity yml files to a nonexistent directory

[0.3.1] - 2022-06-09

Added

  • Model default plugin configuration using config entities and provide management UI
  • Allow reloading plugin lists and improve when the option to remove plugin lists is shown
  • Add “context multiplexing” so slot plugins can fan out to provide multiple instances of a slot
  • Add some test data to the provided development farmOS instance configuration
  • Implement a “visual carousel” on the asset page and add the asset’s photos to it
  • Implement a way for slot plugins to provide weights
  • Add some rudimentary documentation about the Asset Link extension model
  • Implement a way for widget decorator plugins to provide weights
  • Add some additional test data - “Dolly the sheep”

Changed

  • Set the weight on the asset visual carousel to move it above the actions
  • Add a pageName field to the page slot context and filter by it for the asset actions and visual carousel
  • Allow loading of plugins relative to the plugin list

Fixed

  • Honor enabled/disabled status of default plugins
  • Handle HTTP failures when retrieving plugin sources
  • Fix bug in accessing Orbit.js sources via NonReactiveAssetLinkDecorator
  • Fixed how URLs are constructed for asset photos to work more generally

Screenshots

1 Like

I’ve now released version 0.4.1 with the following change-log;

[0.4.1] - 2022-06-12

Added

  • Add support for loading plugins of arbitrary formats using other plugins

Screenshots/Example

Example:

2022_06_12_demo_asset_link_custom_plugin_formats_with_live_reload

3 Likes

In the last few weeks I’ve been working on a few big changes that I hope to release soon;

  • Porting to Vue 3 + Quasar
  • A drastically simplified model for how plugins provide UI components
  • A shorthand for defining basic UI slots without the onLoad boilerplate plugin code
  • Making the loading more consistent between .js and .vue plugins such that .js plugins can use the same import style as .vue plugins
  • Improved handling of logged out state to retain functionality but offer a banner prompting users to login so new data/changes can flow between Asset Link and the farmOS server
  • More…

I also feel I’m getting enough traction stability/feature wise to predict a timeline for folks who are interested in testing out Asset Link for themselves - probably starting with those who are self-hosted and comfortable installing farmOS/Drupal modules.

Hopefully;

  • Alpha: Mid August
  • Beta: Mid September
  • 1.0.0: TBD (based on feedback)
3 Likes

I’ve now released version 0.5.1 with the following change-log;

[0.5.1] - 2022-08-15

Added

  • Add basic asset location slot to asset pages
  • Add some additional test data - “Field A” and “Field B”
  • Add rudimentary documention for the plugin API

Changed

  • Upgraded to Vue 3
  • Migrated from Vuetify to Quasar
  • Broke packages up and integrated Lerna for managing the build accross the resulting packages
  • Extracted the plugin API into its own package in preparation for publishing that to NPM
  • Allow plugins to provide custom search methods for assets
  • Use plugins to define the buttons in the sidecar/SideBar within the farmOS UI

Fixed

  • Make move asset action plugin only search for locations, not all assets
  • Fix a bug with main controller code to 404 on non-existent resources

Screenshots

Links

1 Like