Skip to content

Releases: TrestleAdmin/trestle

v0.9.3

04 May 12:10
Compare
Choose a tag to compare
  • Add #save_or_dismiss resource toolbar builder method
  • Add support for passing parameters to hooks
  • Implement selectable_column checkbox JS and custom checkbox styling
  • Deprecated config.reload option (admins will now always reload in development mode)
  • Update to jQuery 3.5.0
  • Update to FontAwesome 5.13.0, rails-ujs 6.0.2, popper.js 1.16.1, select2 4.0.13, bs-custom-file-input 1.3.4
  • Loosen dependency on kaminari (allow updating to 1.2.x)
  • Fix deprecation warnings when using Zeitwerk
  • Fix focus styles for themed buttons
  • Fix centering of title/logo at mobile breakpoints
  • Fix error messages for has_many / has_and_belongs_to_many fields (ending in _ids)
  • Fix JS AJAX events from incorrectly firing on child elements of a Trestle form
  • Fix overriding of table options when embedding within another admin
  • Fix col helper to not add bare col class when explicit column count is given

v0.9.2

27 Jan 00:51
Compare
Choose a tag to compare
  • Add German translations [Mischa Schindowski]
  • Added --singular option to trestle:resource generator for generating a singular resource:
rails generate trestle:resource account --singular
  • Allow setting custom options on automatically generated forms, e.g.
form dialog: true
  • Add #new, #save, #delete and #dismiss button shortcuts for resource toolbars
  • Allow title and toolbar helpers to be called from within controller actions
  • Allow static_field to automatically infer value rather than require it to be explicitly set
  • Allow custom HTML options to be set on navigation items
  • Allow options to be overridden when embedding tables
  • Updated to Bootstrap 4.4.1
  • Update i18n key for admin breadcrumbs to be more consistent (admin.<admin-name>.breadcrumbs.index)
  • Use count(:all) instead of count in ActiveRecord adapter to fix ambiguous column errors in joined queries
  • Fix loading of Flatpickr locale files
  • Fix initialization of JS translations when en locale is not available
  • Fix tab initialization on context refresh

v0.9.1

22 Nov 04:08
Compare
Choose a tag to compare
  • Fix JavaScript initialization when Turbolinks is disabled or not available
  • Disable automatic focusing within modals

v0.9.0

08 Nov 05:15
Compare
Choose a tag to compare

🎉🎉🎉
After many months in development, this release finally incorporates the new build process from #195!

**If you have written a lot of custom code that depends on Bootstrap 3, this may be a breaking update. Please review your admin application code before pushing to production.**

**If you are using trestle-auth or trestle-search, please also ensure you also update to trestle-auth >= 0.3.0 and trestle-search >= 0.4.0**

The main features of this update are:

  • A Webpack-based build process which produces a static CSS bundle. This means a Sass compilation gem (sass-rails or sassc-rails) is no longer a required dependency unless you are doing custom theme compilation.
  • Cleaned up the Sass and JS code, and migrated the JS to ES6 syntax.
  • Updated to Bootstrap 4 (4.3.1).
  • Updated to FontAwesome 5 (5.11.2). The v4 compatibility classes are included.
  • Removed Ionicons.
  • Theme customization is now done within app/assets/stylesheets/trestle/_theme.scss (rather than _variables.scss). The trestle:install generator has been updated to create this new file. However your current _variables.scss should continue to work for supported variables.
  • Sprockets is still a required dependency (for now).

Other updates and fixes include:

  • The col helper now accepts an integer for the default (mobile breakpoint) columns. Old usage should continue to work:
# New
col(4) { ... }
col(6, lg: 3) { ... }

# Old
col(xs: 4) { ... }
col(xs: 6, lg: 3) { ... }
  • Added new card helper to replace panel helper
  • Deprecated panel and well helpers
  • Added support for custom check_box/radio_button controls (default) as well as switch check_boxes
check_box :published, switch: true
  • Always show tabs if form was defined using one or more tab blocks
  • Use model name to determine default resource admin human name (#251)
  • Fixed model name pluralization when singular and plural versions are defined (#238)

v0.8.13

30 Aug 05:14
Compare
Choose a tag to compare
  • Additional French language translations [Tao Galasse]
  • Add support for admin-level hook definitions
  • Improve default handling of JSON attribute form fields
  • Improve handling of error responses
  • Remove default JS response handlers for admin resources. They can be added manually as required using:
controller do
  def show
    super do |format|
      format.js
    end
  end
end
  • Remove clear button from disabled date/time pickers
  • Disable select fields and date pickers when admin is read-only
  • Allow routes block to be called multiple times
  • Fix error when using selectable_column
  • Fix deprecation warnings in Rails 6

This will likely be the last release before #195 is merged in (which will then be released as 0.9.0).

v0.8.12

28 Mar 04:12
Compare
Choose a tag to compare
  • Add Korean translations [Cheon Park]
  • Allow toolbars to be cleared when defining toolbar blocks
toolbar(:primary).clear!
# or
toolbar(:primary, clear: true) do |t|
  t.button ...
end
  • Add support for dropdowns within toolbar buttons
toolbar(:primary) do |t|
  # Buttons and links render a split button dropdown (primary button plus toggle)
  t.button "Button" do |d|
    d.header "Dropdown Header"
    d.link "Dropdown Link", "#"
    d.divider
  end

  t.link "Button link", "#" do |d|
    d.link "Dropdown Link", "#"
  end

  # Dropdowns render an integrated button dropdown (primary button triggers the dropdown)
  t.dropdown "Dropdown" do |d|
    d.link "Dropdown Link", "#"
  end
end
  • Add support for dynamically defined scopes
scopes do
  Tag.all do |tag|
    scope tag.name, -> { Post.tagged(tag) }
  end
end
  • Allow navigation menu blocks to access controller methods
  • Add config.favicon to set favicon within admin
  • Disable browser autocompletion on password fields
  • Updated styles for dropups, dropdown groups and select group headers
  • Allow id and data attributes to be passed to panel helper
  • Fix i18n of confirmation popovers
  • Fix error when :en locale is unavailable
  • Fix inline JS when Content Security Policy is enabled
  • Fix select form helper when choices passed as a string

v0.8.11

19 Sep 00:26
Compare
Choose a tag to compare
  • Allow adapter methods to invoke controller methods (e.g. current_user, request, etc)
  • Add header: false option to disable table header
  • Add :if/:unless options to be passed to table columns
  • Add option to float form field help blocks above input: help: { text: "message", float: true }
  • Add support for nested modals
  • Pass unfiltered params as second argument to #delete_instance and #save_instance adapter methods
  • Fix merging of navigation group options

v0.8.10

23 Aug 05:58
Compare
Choose a tag to compare
  • Add Latvian translations [Martins Kruze]
  • Add Spanish and Mexican Spanish translations [Ismael G Marin C]
  • Implement new toolbars API
toolbar(:secondary) do |t|
  t.group do
    t.button "Approve", style: :success, icon: "fa fa-thumbs-up"
    t.button "Reject", style: :danger, icon: "fa fa-ban"
  end

  t.link "More Info", "...", style: :info
end
  • Deprecate old-style toolbars e.g. content_for(:primary_toolbar) do
  • Add additional options to timestamp and datestamp helpers
  • Add support for passing proc as column :header option
  • Add :if/:unless options for hooks
  • Add config.timestamp_precision option defaulting to :minutes
  • Add config.root option to set title and root breadcrumb link targets
  • Add view.title hook for overriding sidebar header
  • Add resource.index.header and resource.index.footer hooks
  • Add general confirmation popup with data-toggle="confirm"
  • Allow form control input group addon wrapping to be disabled with :append!/:prepend! options
  • Allow options passed to trestle_form_for to override defaults
  • Improve rendering of input groups, button groups and scopes
  • Improve handling of button disabling and loading indicators
  • Fix tab behaviour when saving modal forms
  • Fix persistence of sidebar expanded/collapsed state
  • Fix compatibility with Sprockets 4

v0.8.9

24 May 01:57
Compare
Choose a tag to compare
  • Fix error when rendering dialog forms
  • Add additional feature specs to cover dialog JavaScript
  • Fix support for string flash messages
  • Pass unhandled options to avatar helper to div tag

v0.8.8

23 May 11:11
Compare
Choose a tag to compare
  • Add Czech translations [Jan Svoboda]
  • Add Simplified Chinese translations [Li Jie]
  • Add support for singular resources (Trestle.resource(:name, singular: true) do ...)
  • Add support for per-admin translations of titles, button labels and flash messages
  • Add clear button to date/time picker fields
  • Add config.reload option to customize admin reloading strategy (:always or :on_update)
  • Add Trestle::Resource#instance_path(instance, options) method
  • Add inheritance support to admin_for(instance) helper
  • Update default Gravatar image
  • Improve default breadcrumbs for module-scoped admins
  • Allow root admin breadcrumb to be disabled via breadcrumb false
  • Fix issue with conflicting tabs within dialogs
  • Fix form_group helper behavior within templates
  • Fix JSON serialization of Configuration objects
  • Fix form submission when HTML5 validations are used
  • Fix error field rendering within input groups
  • Fix compatibility with will_paginate gem (must set custom Kaminari.config.page_method_name)