Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

chore(release): cut version 4.0.0 #430

Merged
merged 166 commits into from
Nov 25, 2019
Merged

chore(release): cut version 4.0.0 #430

merged 166 commits into from
Nov 25, 2019

Conversation

varl
Copy link
Contributor

@varl varl commented Sep 17, 2019

4.0.0 (dhis2/ui@v3.12.0...v4.0.0) (2019-11-20)

Bug Fixes

chore

Code Refactoring

Documentation

Features

BREAKING CHANGES

  • modal: Removed the aside element wrapper
  • select,input: InputField renamed to Input
    SelectField renamed to Select
  • chore: trigger netlify
  • input,textarea: Input and TextArea now requires the input width
    override to be passed in as a string.
  • Now requires React >= 16.8.
  • fileinput: onChange is called with two parameters:
    First parameter an object with properties for checked, name, and
    value.
    The second is the React event object.
  • textarea: onChange is called with two parameters:
    First parameter an object with properties for checked, name, and
    value.
    The second is the React event object.
  • input: onChange is called with two parameters:
    First parameter an object with properties for checked, name, and
    value.
    The second is the React event object.
  • checkbox: onChange is called with two parameters:
    First parameter an object with properties for checked, name, and
    value.
    The second is the React event object.
  • radio: onChange is called with two parameters:
    First parameter an object with properties for checked, name, and
    value.
    The second is the React event object.
  • switch: onChange is called with two parameters:
    First parameter an object with properties for checked, name, and
    value.
    The second is the React event object.
  • tabbar: This replaces the need to nest a TabBar in a ScrollBar,
    and instead allows TabBar.propTypes.scrollable to toggle if a TabBar
    is scrollable.
  • tabbar: This deprecates external use of ScrollBar.
  • modal: This deprecated use of Modal.Actions. Instead, use
    ModalActions.
  • modal: This deprecated use of Modal.Content. Instead, use
    ModalContent.
  • modal: This deprecated use of Modal.Title. Instead, use
    ModalTitle.
  • tab-bar: TabBar will now only accept Tab instances
  • modal: Removing the "open" prop from the Modal.
  • select: SelectField deprecated in favor of SingleSelectField,
    see the docs for the API.
  • select: The new Select components do not accept a standard HTML option
    element, instead they require use of SingleSelectOption, MultiSelectOption,
    or a component with a matching API.
  • select: The Select's onChange no longer returns a standard Event.target,
    instead returns the selected Object with properties: label and
    string, or an array of those for the MultiSelects
  • select: The Selects all require a selected prop, instead of a value.
    Where selected is an object with a label and a value string, or an array of
    those for the MultiSelect.
  • select: Since the Selects do not use a native input element, the name
    prop has been dropped from the Select components.
  • The icon and required props have been removed from
    the Checkbox and Switch. For Switch, the label prop has become
    required.
  • RadioGroup has a new implementation and drops the
    following props: label, inline, options, and helpText.
  • The icon and required props have been removed from the Radio component and the value and label props have become required.
  • help: Removes indent prop from Help. Use className to
    override if necessary.
  • Remove the Filled field style for SelectField and
    InputField.
  • MenuItem value prop is more strict, requires String
    instead of any.
  • formcontrol: Renames FormControl to Field.
  • splitbutton: remove the compact prop from buttonstrip
  • toggle-group: Renames ToggleGroup to FieldSet to match intended
    usage.
  • select: Select deprecated in favor of the SingleSelect, refer
    to the docs for the API.

@netlify
Copy link

netlify bot commented Sep 17, 2019

Deploy preview for dhis2-ui-core ready!

Built with commit 61099e2

https://deploy-preview-430--dhis2-ui-core.netlify.com

@Mohammer5

This comment has been minimized.

@varl

This comment has been minimized.

@varl

This comment has been minimized.

@varl varl changed the title next chore(release): cut version 4.0.0 Oct 14, 2019
@varl varl added the next label Oct 14, 2019
@Mohammer5

This comment has been minimized.

@varl varl force-pushed the next branch 6 times, most recently from 2f9d0e6 to 888ca0c Compare November 7, 2019 13:05
src/DropMenu.js Outdated Show resolved Hide resolved
src/Help.js Show resolved Hide resolved
src/MenuItem.js Show resolved Hide resolved
src/Tab.js Show resolved Hide resolved
@HendrikThePendric
Copy link
Contributor

I've compared the props in the storybook-prop-table@master with the-docs@next. Got down to RadioGroup and left a few comments. I'm not sure how we should describe the breaking changes in Menu, because I didn't take time to look into it. There a comment to flag up the breaking changes though...

@varl
Copy link
Contributor Author

varl commented Nov 8, 2019

I have gone over all the comments noted, and scanned the APIs to make them more consistent. I found that in some places we say that onChange functions are required, and in other places they are optional.

I have applied a strict definition that isRequired indicates that the component will crash if the property is not passed in, for example the name property is assumed to exist in the code. If it is not supplied, the component will throw an error, so that's a required prop.

For the onChange we always check if we have an onChange function before calling it, so that's not a strictly required property and as such I have loosened it so that all on handlers are optional. This makes the components easier to use in a prototype situation.

Naturally, the component won't work properly without an onChange handler, but I think that should be documented in the user docs instead of enforcing it with props.

Mohammer5 and others added 24 commits November 25, 2019 11:17
BREAKING CHANGE: Removed the aside element wrapper
@varl
Copy link
Contributor Author

varl commented Nov 25, 2019

Let's fly. 🚀

@varl varl merged commit 868b92c into master Nov 25, 2019
@varl varl deleted the next branch November 25, 2019 15:12
@varl varl mentioned this pull request May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants