Saltcorn 0.6.2 - dynamic menus, S3 storage, filter checkboxes

By Tom Nielsen
Published on 

Saltcorn 0.6.2 was released yesterday with the following improvements:

There are now two additional options for the menu:

  • Search menu. You can now put a search input in the menu bar!
  • Dynamic menus. Sometimes you want your menu items to come from the database. This has now been enabled with the Dynamic menu item. This will add a menu item for every row in the database from a table, optionally matching a condition. You can also specify a section field, meaning that multiple menu sections will be added corresponding to a field value which indicates the section. 

You can see both of these new menu options on the new wiki

File storage can now be backed by S3 compatible objects storage instead of the local file storage. This makes it easier to deploy on platforms that do not provide persistent file store, such as volume-less Docker or Heroku. This work was contributed by Gilang Mentari Hamidy.

Show/hide columns in the admin table edit. It could previously be difficult to use the admin table editor if you had a field with a lot of content, e.g. HTML or long strings. Now you can hide those columns so you can see more rows on a single screen.

Filter checkboxes – a really important user interface pattern that we missed so far. You can now have a filter consisting of checkboxes that filter out rows according to whether they match the attribute denoted by the ticked boxes. If more than one box is ticked, that becomes an OR filter

Integer and floating point fields can now be shown and inputted using progress bars and sliders, respectively.

 We are continuing to migrate the code base to Typescript. This leads to better documentation and catches many bugs, especially in rarely accessed code branches. I am quite impressed by TypeScript, it strikes a good balance between dynamic and static typing. The advantage of static typing is that it’s brings more structure to the code and the data structures; dynamic typing on the other hand gives you more flexibility and avoid the situation where you have to spend a lot of time convincing the type checker that the code is correct. TypeScript is gradually typed, meaning that you add type annotations where appropriate. In addition, the upgrade from JavaScript is straightforward once the infrastructure is in place, as valid JavaScript is also valid TypeScript. This work is being done by Christian Hugo.
 


Recent posts