Skip to content

Releases: bsidelinger912/shiitake

Version 3.0

11 Dec 06:17
Compare
Choose a tag to compare

The primary change with v3 is that we drop support for React versions lower than 16.8. This allows Shiitake to be written with hooks. In the re-write I was able to fix several bugs that were hard to deal identify and reason about in a Class Component. I was also able to make some performance improvements, specifically around resize handling and a better debouncing hook. These things could have been done without hooks, but I find hooks make it easy to reason about things and identify opportunities for improvements and flawed logic.

The other big difference is the new "attributes" prop. This allows you to pass any valid JSX attributes (props) into the outer rendered element. This is the same element that is defined by the "tagName" prop. This way you can have more control over the rendered result. We also added classes for some of the inner spans which you can target in css for further control. In this change we dropped support for passing event handlers like "onClick" at the top level Shiitake props, but you can pass them now in attributes. This means any event supported by the tagName of your choice is now supported in addition to other attributes like "title", "href" etc. The top level "className" prop is deprecated in favor of passing className inside of "attributes", but is still supported until the next major version when it will be removed.

Detect truncation

30 Nov 04:30
Compare
Choose a tag to compare

Adds a onTruncationChange prop which is called whenever the text gets trimmed or stops being trimmed. Its useful for setting state based on whether the text has been truncated or not.

Add aria-hidden for accessibility

28 Jan 05:17
Compare
Choose a tag to compare

This adds the aria-hidden="true" attribute for the hidden elements for better accessibility.

Add typings for Shiitake

12 Dec 07:29
Compare
Choose a tag to compare

This adds typings for usage in typescript.

Handle non-string values in children

12 Dec 06:58
Compare
Choose a tag to compare

This change makes Shiitake less brittle by gracefully degrading when non string children are passed.

Add React 16 as peer dep

20 Oct 06:07
Compare
Choose a tag to compare

Small update to package.json to add React 16 as a valid peer dependency.

Update README.md

29 Jun 07:13
Compare
Choose a tag to compare

Updates README.md to document new "overflowNode" prop.

Overflow character choice

29 Jun 07:11
Compare
Choose a tag to compare

Adds option to pass "overflowNode" prop which can be any string or jsx, allowing users to create links etc.

Demo update

27 Apr 04:13
Compare
Choose a tag to compare

This is a small update to remove the demo sub project and update the read me to use the demo page I do my development with. This dev implementation is always up to date with the latest features as opposed to the demo project which frequently got out of date.

Upgrade to new prop-types library

27 Apr 04:17
Compare
Choose a tag to compare

The major initiative here was to switch over to using the new prop-types library. This upgrades the peer dependency of React to 15.5.4. I've also upgrade several other dev packages, notably switching to webpack 2, which won't bother you unless you have a fork.