Releases: 3lvis/Form
Form — 3.3.2
- Adds support for multi-line info text in select fields (https://github.com/hyperoslo/Form/pull/367)
Form — 3.3.1
FORMLayout
uses thecollectionView
bounds instead of themainScreen
bounds (#353)- Included
FORMEmailFormatter
, now email fields will not accept commas \o/ (#358) - Fixes an issue where formulas wouldn't be computed correctly when used in combination with dynamic fields (#364)
Others:
- Improved Demos
- Added code coverage
- Added Gitter (chat support)
- Improved README
Huge thanks to @Mutix for his contributions on this release, a big round of applause for him.
Form — 3.3.0
Hi again, we hope you're all having a fantastic week. On this release some very nice things were added, thanks a lot to @Mutix for this incredible contributions and taking Form from cool to awesome. Also thanks to @charbelhass who's been reporting issues and more importantly following them. Well that's it, let's get with the changelog.
- We had support for
date
field types, now we also have support fortime
anddate_time
, just add any of this to your field type and everything should just work (#333) - Assets will be now copied automatically to your project when doing
pod install
(#339) - Fixed issues with validations, we've added tests for all the cases, this should be good now (#336)
Get it by running:
pod update Form
Form — 3.2.2
- Fixes
max_value
andmin_value
not working => https://github.com/hyperoslo/Form/pull/327
Get it by running
pod update Form
Form — 3.2.1
- Fixes faulty layout implementation which prevented the collection view from scrolling (hyperoslo@6e9f7ff)
Get it by running
pod update Form
Form — 3.2.0
- Support marking fields as initially hidden (Defined on #318 and fixed on #319 by the fantastic @matteocrippa)
You just have to add the hidden
flag to a field in your JSON file:
{
"id": "first_name",
"hidden": true
}
If you want to show the field you can use a show field target:
[self.dataSource processTargets:@[FORMTarget showFieldTargetWithID:@"first_name"]]
Get it by running
pod update Form
Form — 3.1.0
- Added a configuration block to provide a custom
FORMGroupHeaderView
or to customize the existing one
// FORMDataSource.h
typedef UICollectionReusableView * (^FORMConfigureGroupHeaderForItemAtIndexPathBlock)(FORMGroup *group,
UICollectionView *collectionView,
NSIndexPath *indexPath);
/*!
* Provides a configuration block to optionally set up subclasses of @c FORMBaseFieldCell
* the default behaviour just sets the field property to the cell.
*/
@property (nonatomic, copy) FORMConfigureCellBlock configureCellBlock;
The only requisite is that this view should be a subclass of UICollectionReusableView
Form — 3.0.1
- Fix crash when collapsing fields (https://github.com/hyperoslo/Form/pull/306)
This bug was introduced on 3.0.0 when refactoring FORMLayout
Form — 3.0.0
Tooltip/Info
- Improved how tooltips/info work (the yellow thing that pops-up when you press a field that has a
message
) - [BREAKING CHANGE] We renamed
subtitile
toinfo
everywhere to improve consistency
FORMDataSource
- Removed several unused method and documented the remaining ones
- Removed deprecated method
- (NSDictionary *)valuesDictionary;
- [BREAKING CHANGE] We had a naming inconsistency since we moved from
forms
togroups
Before:
- (NSArray *)forms;
After:
- (NSArray *)groups;
- [BREAKING CHANGE] In order to make the API more consistent
invalidFormFields
returns aNSDictionary
instead of aNSArray
Before:
- (NSArray *)invalidFormFields;
After:
- (NSDictionary *)invalidFormFields;
- [BREAKING CHANGE] Improved
reset
, before it wasn't working as expected and it was renamed fromresetForms
- [BREAKING CHANGE] Renamed several configure blocks and update blocks to be more descriptive
Before:
@property (nonatomic, copy) FORMFieldConfigureCellBlock configureCellBlock;
@property (nonatomic, copy) FORMFieldConfigureHeaderViewBlock configureHeaderViewBlock;
@property (nonatomic, copy) FORMFieldConfigureFieldUpdatedBlock configureFieldUpdatedBlock;
@property (nonatomic, copy) FORMFieldConfigureCellForItemAtIndexPath configureCellForIndexPath;
After:
/*!
* Provides a configuration block to optionally set up subclasses of @c FORMBaseFieldCell
* the default behaviour just sets the field property to the cell.
*/
@property (nonatomic, copy) FORMConfigureCellBlock configureCellBlock;
/*!
* Provides a configuration block to optionally modify the group header view an instance of @c FORMGroupHeaderView
* the default behaviour just sets the title and the delegate.
*/
@property (nonatomic, copy) FORMConfigureHeaderViewBlock configureHeaderViewBlock;
/*!
* Provides a configuration block to optionally return a cell for a specific @c NSIndexPath
* very useful when providing custom cells.
*/
@property (nonatomic, copy) FORMConfigureCellForItemAtIndexPathBlock configureCellForItemAtIndexPathBlock;
/*!
* Provides a block that gets called every time a field gets updated
*/
@property (nonatomic, copy) FORMFieldFieldUpdatedBlock fieldUpdatedBlock;
- [BREAKING CHANGE] Removed
- (void)processTarget:(FORMTarget *)target;
Use- (void)processTargets:(NSArray *)targets;
instead - [BREAKING CHANGE] Renamed few methods to be more simple
Before:
- (NSArray *)invalidFormFields;
- (NSDictionary *)requiredFormFields;
- (BOOL)formFieldsAreValid;
- (void)resetForms;
- (void)validateForms;
- (CGSize)sizeForItemAtIndexPath:(NSIndexPath *)indexPath;
- (void)reloadItemsAtIndexPaths:(NSArray *)indexPaths;
After:
/*!
* @discussion A method to retrieve invalid fields.
* @return A dictionary of invalid fields where the key is the @c fieldID and the value the @c FORMField.
*/
- (NSDictionary *)invalidFields;
/*!
* @discussion A method to retrieve required fields.
* @return A dictionary of required fields where the key is the @c fieldID and the value the @c FORMField.
*/
- (NSDictionary *)requiredFields;
/*!
* @return @YES if all the fields are valid
*/
- (BOOL)isValid;
/*!
* Resets the values of all the fields
*/
- (void)reset;
/*!
* Runs @c validate in all the fields, if the field is invalid it will show as red
*/
- (void)validate;
/*!
* @return The size for the @c field at the given @c indexPath
*/
- (CGSize)sizeForFieldAtIndexPath:(NSIndexPath *)indexPath;
/*!
* @discussion Safely reloads the fields at the given indexPaths
* @param indexPaths A collection of indexPaths to reload
*/
- (void)reloadFieldsAtIndexPaths:(NSArray *)indexPaths;
We want to thank @matteocrippa for his contributions on this release ❤️ 💐
Note: We are going to continue to be very strict in following semantic versioning.
- Mayor releases: breaking changes
- Minor releases: backwards compatible changes or additions
- Patches: bug fixes or other improvements
Form — 2.2
- Improved tooltip behavior
Adding
message
to aFORMField
now will display a tooltip when the field it's activated (becomes first responder). We refactored the tooltip so it works better, faster and stronger.
- Added
resetDynamicSectionsWithDictionary
toFORMDataSource
This is useful when you need to reset the state of dynamic sections