All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.22.0 - 2023-05-07
- Removed deprecated
Super::Display::SchemaTypes#badge - Removed deprecated
#real(:column)and#computed(:column) - Removed deprecated support for arrays in
Super::Navigiation.new - Removed deprecated
styles:argument fromSuper::Badge.new - Removed deprecated
Badge's handling of string styles
- Added the
file_fieldform builder method - Speed up rendering
Super::Link - Speed up rendering
Super::ViewChain
- Stopped supporting Webpacker
0.21.0 - 2022-06-05
- Added overridable controller methods (which are now called by the current controller actions). This'll let you customize controller actions without overriding the entire action.
- Added customizable error handling for the
#destroyaction - Added a warning and an explicit end to
Super::ViewChain - Added a way to override the
Super::Displayattribute name
- Deprecated
Super::Display:SchemaTypes#badge. Prefer using#realand#computed, and return an instance ofSuper::Badge - Deprecated
#real(:column)and#computed(:column). Prefer using#real(:attribute)and#computed(:attribute) - Deprecated
Super::Navigiation.newneeding a block that yields an array - Deprecated
Super::Badge.new(text, styles:)in favor of the singularstyle:. Example:Super::Badge.new(text, style: :blue) - Deprecated
Super::Badge's handling of string styles
Super::Navigationno longer supports#menu(title)[*links]; method signature is now#menu(title) do- Rework
Super::Query. This should only affect you if you've fully overrode an action or created your own database querying class
#destroynow redirects to the index page (instead of to the record that was just deleted)- Fixed typo
Super::Error::InitalizationtoInitialization - Automatically require CSV
0.20.0 - 2022-01-09
- Added two more
current_actioncategories:collection?andmember? - Added many more form field helpers, for use with
#super_form_for - Added many more form field helpers, for use with
Super::Form - Internationalize Super::Link
- Added
#process_text,#process_href,#process_optionstoLinkBuilderto allow for customizing a defaultLink - Added support for specifying the form action endpoint URL
- Added support for changing paginated URLs
- The I18n key
super.layout.powered_byis nowsuper.layout.powered_by_html - Changed the public interface for
Super::LinkBuilder
- You can now use the NPM package in addition to just
importing it! - Show the member header on the show page
- Hide the batch action checkbox on the show page
- Prevent global changes to the registered
LinkBuilders
0.19.0 - 2021-12-13
#member_actionsand#collection_actionscan return an array of things that respond to#to_partial_path, including but not limited toLinks.- Partials can be ordered
- Added a batch actions feature
- Frontend assets can be set up via
yarn add @superadministration/super - Added a button to export to CSV
- The
Linkobject can now only be rendered via#to_partial_pathinstead of through#to_s. Super::Layoutdoesn't render arrays of partials
0.18.0 - 2021-08-26
- Added
#document_titleand#page_titlemethods for customizing the contents of the<title>tag - Added a way to export CSVs by appending
.csvto the URL - Added a way to load all records on the index page by setting the query param
_all_pages=true
0.17.0 - 2021-06-12
- Some new filter types
Super::Schema::Fields#delete(key)for deleting fields from a defined schema. It works likeHash#delete- Filtering for boolean columns
- Filter operators can have any number of inputs
- Controller's
#member_actionsnow acceptsrecordargument - Link and LinkBuilder's
#to_smethods now accept the same arguments - Unified how the
#createand#updateactions set the record's attributes. Use#set_record_attributesto customize what gets set
- Form schema's
#generic. Prefer#partial - Form schema's
#select(collection:)keyword argument. Prefer specifying the positional argument:#select(collection) - Form schema's
#has_manyand#has_onewhen used without a block argument. Those methods now yield a variable, similar tof.fields_for - Some filter types that had overlapping functionality with existing ones
#build_record_with_paramswhich used to set attributes on the create action#update_recordwhich was used to set attributes on the update action
#permitted_params's handling of#current_action- Flatpickr form fields where the value was a string, but more specifically when used with filtering
0.0.16 - 2021-05-15
- Partials
site_headerandsite_footerfor easy overrides - A helper method
#site_title - Styles for disabled form fields
- Renamed the controller method name
#action_inquirerto#current_action - Merged
Super::ControlsintoSuper::ApplicationController - Renamed
#scopeto#base_scope - Renamed
#navigationto#site_navigation
- The orange badge, since Tailwind v2 doesn't include orange by default
0.0.15 - 2021-05-01
Super::Reset. Include it in your controller to remove all the controller methods and actions that Super defines<input type=hidden>and<input type=password>fields- Pill-like badges for displaying statuses
- Easy label text configurability
- A new form type for calling form methods directly
- The
<select>tag has its "down" icon set in CSS, instead of in HTML - The recommended form schema types. For example, instead of
type.string, usetype.text_field.
- The README (cheatsheet) that was added when installing Super for the first
time. See
bin/rails super:cheatfor an up to date list
- Updated
bin/rails super:cheatto print all ofSuper::Controlsmethods - Mutate the current
action_inquirerwhen re-rendering a form due to a validation failure (#createto#new, or#updateto#edit) - The navigation menu was placed behind
<select>tags, which made it hard to navigate. The navigation menu shows up on top now - A regression from upgrading to Tailwind CSS v2. It had a dotted border around inputs, which is unnecessary since we have custom styles
0.0.14 - 2021-04-22
- Navigation can be configured now. But it's still automatic by default
- Navigation can be nested one level deep
- A cheat sheet, run
bin/rails super:cheat
- Upgraded to Tailwind v2.1.1. This drops support for IE 11. Note that I'm still on v1 colors.
Super::Assets.use_sprockets. It does what it says it does now. It used to do nothing.- Handling of prerelease versions of Sprockets and Webpacker.
- Support for Webpacker v6.0.0.beta6
0.0.13 - 2021-04-16
- Add a time display type that only shows the time
- Add a date-, datetime-, and time-picker to forms
- Add the datetime-picker to filters
- ActionText fields are computed
0.0.12 - 2021-04-04
- Support for "virtual" fields that don't need to be correlated to a method on the model. Although it's not possible to sort by virtual fields (sorting is only done by the database), this will make it possible to show derived values
- Route generation when using
bin/rails g super:resource MyModel. It can generate routes under anamespace,scope, or keep it at the top level. - Generation of
AdminController::AdminControls, which subclassesSuper::Controls. (The name changes automatically depending on the controller namespace)
- A few configuration keys
- The number of records per paginated page. It's now at 100.
- Moved generated definition of
#new_controlsinto the parent class.
0.0.11 - 2021-03-02
- Sorting. It's now possible to sort by one or many columns
- Renamed Controls'
build_*_viewto*_view - Made
Super::Displayeasier to initialize. It no longer requires any arguments
0.0.10 - 2021-01-17
- A real form builder. You can use
super_form_forto build a form that looks like a Super form. - An error when the
@viewinstance variable wasn't set in the controller. This should help with debugging custom controllers
- The "sticky headers" feature. It was very possible for the table to look bad on certain breakpoints.
- Initial support for ActionText
- Generator for setting up ActionText. Before Super can work with ActionText, you'll first need to set up Webpacker and ActionText on your application
- Initial support for Webpacker 6
- Checkbox input field for forms
- Alignment of multi-line values on the
#showaction
0.0.8 - 2020-12-27
- The
#display_schemadefinition now looks likeSuper::Display.new(...) do - The
#form_schemadefinition now looks likeSuper::Form.new do - The
#filter_schemadefinition now looks likeSuper::Filter.new do - The generators now only define required methods
- Controls must now inherit from
Super::Controls
- Additional "schema type" helpers on Display and Form
- Schema guesser for
#display_schema,#form_schema, and#filter_schema. - Guesser for Strong Parameters
- A Ruby 3.0 error
- Displaying
nilvalues - JavaScript exports
0.0.7 - 2020-12-15
- Made the table headers (on the
#indexaction) sticky on larger screens.
- A "view" object in each controller action that renders something. These are
built via Controls to allow developers to customize them as desired. The
return value can be any object with a method
#to_partial_path(or in newer versions of Rails, a view component). - Filtering support!
0.0.6 - 2020-12-08
- Consolidated the controller's two "permitted params" methods into one
- Merged
Super::StepintoSuper::Controls - Define
Super::Link#to_swhich returns an<a href>tag. Any of a Link's fields can be a proc; they are resolved as necessary when called.Controlswas updated to handle these newLinks - Moved
Super::ClientErrorout ofSuper::Error.ClientErrordoes NOT inherit fromSuper::Errorsince they're different categories of errors (Errorare generally developer errors, not user errors) - Bypasses
ActionView::Base.field_error_proc(which by default wraps erroneous form fields with a<div class="field_with_errors">. Sadly this currently monkey patchesActionView::Helpers::Tags::Base - Allow
Super::Controls#display_schemato return any object that defines#to_partial_path. This will allow developers to bypass the form builder if it's too limited. - Upgraded Tailwind CSS to 1.9.6
- Redesigned the index table
- Renamed lots of methods with the word "resource" in it. In most cases, the word "resources" meant "records" or "collection" (or in the singular case, "record" or "member")
- Upgraded Stimulus to 2.0.0 (no breaking changes, only warnings)
- Allow
Super::Controls#form_schemato return any object that defines#to_partial_path. This will allow developers to bypass the form builder if it's too limited. - Allow
Super::Displayfields to be objects that respond toto_partial_path. This will allow developers to partially bypass the display schema - Allow
Super::Displayto work with "fields" that aren't methods part of an instance ofActiveRecord::Base - A footer
- The
apply-templateStimulus controller now correctly raises an error when the eponymous<template>tag is missing - Fixed
Super::ViewHelper.classeswhich used to return the stringified value of the conditional. It now only returns the classes without the conditionals - A deprecation warning under Rails 6.1
0.0.5 - 2020-06-01
- Replaced the
Super::Actionframework with regular controller actions - Improved the index table to be a bit more responsive by default
- Updated
super:webpackergenerator to automatically update the initializer - Upgraded Tailwind CSS from v1.2.0 to 1.4.6
- Improved documentation!
0.0.4 - 2020-03-09
- Major redesign!
- Replaced the links to various actions (the "New", "View", "Edit", "Destroy"
links) with configurable ones. See
Super::Controls#resource_actionsandSuper::Controls#resources_actions - Replaced
Super::InlineCallbackwithSuper::Action. ASuper::Actionis built of two parts, the business logic of the controller action and its respective view. - Upgraded Tailwind CSS from v1.1.4 to v1.2.0. This is unlikely to be a breaking
change.
- Added
first:variants for the padding classes
- Added
- Conditionally show pagination links
- Some CSS classes for various form elements
- Meta tags for responsive views on mobile
- Configurable links to actions
- Default behavior for
Super::Controls#titleandSuper::Controls#scope - Utility classes for building views
Super::Layout,Super::Partial, andSuper::Panel
0.0.3 - 2020-01-24
- Renamed
form_generic_textandform_generic_selectviews toform_field_textandform_field_select, respectively - Renamed
Super::Controls#dashboardto#actual
- Nested attributes form builder. It's now possible to build "sub-forms" for
accepts_nested_attributes_for. - "Add new" button for
has_manynested attributes
0.0.2 - 2019-11-24
- Place controller's "dashboard" class inside its respective controller.
Existing installations must rename their controllers'
dashboardmethod intonew_controls. - Merged several methods under "Controls" to keep things a little less
repetitive.
scope(action:)instead ofindex_scopenew_scopecreate_scopeshow_scopeedit_scopeupdate_scope
permitted_params(params, action:)instead ofcreate_permitted_paramsupdate_permitted_params
display_schema(action:)instead ofindex_schemashow_schema
form_schema(action:)instead ofnew_schemaedit_schema
- Flash message support
- User-facing error handling
0.0.1 - 2019-09-17
- Default implementations for resourceful actions
- Pagination on
indexaction - Generators for installation and resource (
super:installandsuper:resource, respectively) - Tailwind CSS
- Sprockets and Webpacker support. Defaults to Sprockets
- Navigation bar with links to all admin controllers