This repository was archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Adds Filter Exclusion Name character limit & related UI #13155
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zaggino
reviewed
Mar 7, 2017
src/search/FileFilters.js
Outdated
remainingCharacters | ||
)); | ||
|
||
if (remainingCharacters < 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unless i'm at lets say 3/4 of FILTER_NAME_CHARACTER_MAX
, $remainingField could be hidden?
zaggino
reviewed
Mar 7, 2017
src/search/FileFilters.js
Outdated
dialog.done(function (buttonId) { | ||
if (buttonId === Dialogs.DIALOG_BTN_OK) { | ||
// Update saved filter preference | ||
setActiveFilter({ name: $nameField.val(), patterns: getValue() }, index); | ||
setActiveFilter({ name: $nameField.val().substr(0, FILTER_NAME_CHARACTER_MAX), patterns: getValue() }, index); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not do this, OK
button should be disabled if $nameField.val()
is more than FILTER_NAME_CHARACTER_MAX
…that 75% of the max characters allowed
…is exceeded, rather than truncating characters from exclusion name automatically
Travis says:
Please sign the agreement before I can merge the code. |
@zaggino Just signed the form! My bad on that. |
zaggino
approved these changes
Mar 7, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, LGTM
Thanks for the PR @bomanimc , nice work. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR address issue #13140 by doing the following:
Note: This has one string (for the "characters remaining" text) that is externalized in nls/root.
Questions:
I'm having trouble unit testing this, which I've left out of this PR for now. This is my first time working on the project, and I believe I'm making a mistake causing my unit tests to not be considered when I try to run them from the testing interface. None of the
console.log
statements I've added to my unit test pass through. My process has been: