Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Adds Filter Exclusion Name character limit & related UI #13155

Merged
merged 8 commits into from
Mar 7, 2017
Merged

Adds Filter Exclusion Name character limit & related UI #13155

merged 8 commits into from
Mar 7, 2017

Conversation

bomanimc
Copy link
Contributor

@bomanimc bomanimc commented Mar 7, 2017

This PR address issue #13140 by doing the following:

  1. Truncates exclusion names over 20 characters.
  2. Adds text underneath the input bar to note the remaining characters.

screen shot 2017-03-06 at 8 09 04 pm

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:

  1. Add a unit test in FileFilters-test.js
  2. Reload Brackets
  3. Test the FileFilters unit test section.

remainingCharacters
));

if (remainingCharacters < 0) {
Copy link
Contributor

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?

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);
Copy link
Contributor

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

bomanimc added 2 commits March 7, 2017 08:00
…is exceeded, rather than truncating characters from exclusion name automatically
@zaggino
Copy link
Contributor

zaggino commented Mar 7, 2017

Travis says:

bomanimc has NOT submitted the contributor license agreement. See http://dev.brackets.io/brackets-contributor-license-agreement.html

Please sign the agreement before I can merge the code.

@bomanimc
Copy link
Contributor Author

bomanimc commented Mar 7, 2017

@zaggino Just signed the form! My bad on that.

Copy link
Contributor

@zaggino zaggino left a comment

Choose a reason for hiding this comment

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

Tested, LGTM

@zaggino
Copy link
Contributor

zaggino commented Mar 7, 2017

Thanks for the PR @bomanimc , nice work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants