Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: optionally disable popping on backspace #551

Merged
merged 9 commits into from
Mar 7, 2022

Conversation

r-zane-spalding
Copy link
Contributor

What does it do?

Adds disablePoppingOnBackspace prop to allow for optionally disabling the popping of nodes from the tree when the 'backspace' key is pressed in an empty search bar.

Fixes #550

Please mention in the format "Fixes #issueNumber" or "Closes #issueNumber".
This is important for semantic-release to correctly generate release tags and update issues.

Type of change

Please delete options that are not relevant.

  • [x ] New feature (non-breaking change which adds functionality)
  • [ x] This change requires a documentation update

Checklist:

  • [ x] I have performed a self-review of my own code
  • [ x] I have commented my code, particularly in hard-to-understand areas
  • [ x] Updated documentation (if applicable)
  • [ x] Added tests that prove my fix is effective or that my feature works
  • [ x] New and existing unit tests pass locally with my changes
  • [ x] My changes generate no new warnings

@r-zane-spalding r-zane-spalding changed the title Feature: optionally disable popping on backspace feat: optionally disable popping on backspace Mar 7, 2022
Comment on lines 158 to 160
t.deepEqual(wrapper.state().tags.length, 2)
triggerOnKeyboardKeyDown(wrapper, 'Backspace')
t.deepEqual(wrapper.state().tags.length, 2)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, why the double test?

Copy link
Contributor Author

@r-zane-spalding r-zane-spalding Mar 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, was following the pattern of the previous test but isn't really needed. Want me to change it on the branch and make a new PR?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there's no real purpose, then let's get rid of it. You should be able to push the updates on your branch and this PR should reflect those changes.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IOW, you don't have to create a new branch or PR everytime you make an edit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, change made.

@codeclimate
Copy link

codeclimate bot commented Mar 7, 2022

Code Climate has analyzed commit 4098fc9 and detected 0 issues on this pull request.

View more on Code Climate.

@mrchief
Copy link
Collaborator

mrchief commented Mar 7, 2022

@allcontributors[bot] Let's add @moonjy1993 for code

@allcontributors
Copy link
Contributor

@mrchief

@moonjy1993 already contributed before to code

@mrchief
Copy link
Collaborator

mrchief commented Mar 7, 2022

@allcontributors Let's add @r-zane-spalding for code

@allcontributors
Copy link
Contributor

@mrchief

I've put up a pull request to add @r-zane-spalding! 🎉

@mrchief mrchief merged commit e6ba367 into dowjones:develop Mar 7, 2022
@github-actions
Copy link

github-actions bot commented Mar 7, 2022

🎉 This PR is included in version 2.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@r-zane-spalding r-zane-spalding deleted the develop branch March 8, 2022 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Optionally disable popping of items on backspace keydown
2 participants