Skip to content

Commit

Permalink
Merge branch 'master' into 6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
i-like-robots committed Apr 29, 2020
2 parents fc17cd0 + be1270e commit d7bd15e
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 3 deletions.
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: i-like-robots

---

Your issue may already be reported! Please search on the [issue tracker](../) before creating one.

## Expected behaviour

A clear and concise description of what the bug is.

## Current behaviour

A clear and concise description of what you expected to happen.

## Steps to Reproduce

Steps to reproduce the problem:

1.
2.
3.
4.

## Example and screenshots

Please add a link to a minimal reproducible example of the bug if you have created one.

## Screenshots

If applicable, add screenshots to help explain your problem.

## Your environment

- OS: [e.g. Windows 10]
- Browser: [e.g. chrome 76, safari 12]
- Version of the component: [e.g. 5.11.2]
- React version: [e.g. 16.12]

## Additional context

Add any other useful context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

## Describe the solution you'd like

A clear and concise description of what you want to happen.

## Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

## Additional context

Add any other context or screenshots about the feature request here.
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.git/
.github/
.nyc_output/
coverage/
example/
lib/
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Added ES6 package and `"module"` entry point
- Added `id` option to configure the component ID
- Added `removeButtonText` option to configure the selected tag remove button title attribute
- Refactored `ariaLabel` option to `ariaLabelText` to match other text options
- Refactored `placeholder` option to `placeholderText` to match other text options
- Refactored keyboard event handlers to use `KeyboardEvent.key`
- Refactored event handlers and callbacks to use `on` prefixes
Expand All @@ -20,6 +21,10 @@
- Removed `delimiterChars` option
- Updated React dependency to 16.5+

## 5.13.0

- Added `ariaLabel` option ([Herdismaria](https://github.com/Herdismaria))

## 5.12.1

- Fixed an issue where the `componentDidUpdate()` callback of the input component can be called too many times
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ ReactDOM.render(<App />, document.getElementById('app'))
- [`suggestions`](#suggestions-optional)
- [`suggestionsFilter`](#suggestionsfilter-optional)
- [`placeholderText`](#placeholdertext-optional)
- [`ariaLabelText`](#arialabeltext-optional)
- [`removeButtonText`](#removeButtontext-optional)
- [`noSuggestionsText`](#noSuggestionsText-optional)
- [`autoresize`](#autoresize-optional)
Expand Down Expand Up @@ -139,6 +140,10 @@ If no function is supplied the default filter is applied. Defaults to `null`.

The placeholder string shown for the input. Defaults to `'Add new tag'`.

#### ariaLabelText (optional)

The aria-label string for the input. Defaults to placeholder string.

#### removeButtonText (optional)

The title text to add to the remove selected tag button. Default `'Click to remove tag'`.
Expand Down
4 changes: 2 additions & 2 deletions lib/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Input extends React.Component {
}

render () {
const { id, query, placeholderText, expanded, classNames, inputAttributes, inputEventHandlers, index } = this.props
const { id, query, ariaLabelText, placeholderText, expanded, classNames, inputAttributes, inputEventHandlers, index } = this.props

return (
<div className={classNames.searchWrapper}>
Expand All @@ -76,7 +76,7 @@ class Input extends React.Component {
className={classNames.searchInput}
role='combobox'
aria-autocomplete='list'
aria-label={placeholderText}
aria-label={ariaLabelText || placeholderText}
aria-owns={id}
aria-activedescendant={index > -1 ? `${id}-${index}` : null}
aria-expanded={expanded}
Expand Down
2 changes: 2 additions & 0 deletions lib/ReactTags.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ class ReactTags extends React.Component {
autoresize={this.props.autoresize}
expanded={expanded}
placeholderText={this.props.placeholderText}
ariaLabelText={this.props.ariaLabelText}
/>
<Suggestions
{...this.state}
Expand Down Expand Up @@ -285,6 +286,7 @@ ReactTags.propTypes = {
id: PropTypes.string,
tags: PropTypes.arrayOf(PropTypes.object),
placeholderText: PropTypes.string,
ariaLabelText: PropTypes.string,
removeButtonText: PropTypes.string,
noSuggestionsText: PropTypes.string,
suggestions: PropTypes.arrayOf(PropTypes.object),
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"Andrew Pillsbury",
"Axel Niklasson",
"Serhiy Yefremenko",
"Paul Shannon"
"Paul Shannon",
"Herdis Maria"
],
"license": "MIT",
"repository": "https://github.com/i-like-robots/react-tags",
Expand Down

0 comments on commit d7bd15e

Please sign in to comment.