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

Enable special characters and encode search string #119

Merged
merged 2 commits into from
Apr 23, 2018
Merged

Enable special characters and encode search string #119

merged 2 commits into from
Apr 23, 2018

Conversation

alfarok
Copy link
Contributor

@alfarok alfarok commented Apr 19, 2018

QNTM-4042

Supplemental Dynamo PR

This PR enables all characters and spaces in search and encodes the string passed from librarie.js to Dynamo where the string is decoded and run through search. Previously, spaces were replaced in searches because the results were not accurately returned due to the string formatting. In a later PR all characters that were not a-z 0-9 were removed from the query string to prevent special characters from crashing librarie. This PR should evade those issues. This PR also fixes test failures that were introduced prior.

Looking forward we may want to consider modifying the search timeout logic to improve response fluidity.

Reviewers

@mjkkirschner

FYI

@Racel @jnealb @smangarole

@mjkkirschner
Copy link
Member

@alfarok have you run the tests and made sure all are passing?

@alfarok
Copy link
Contributor Author

alfarok commented Apr 19, 2018

@mjkkirschner some tests were actually failing prior to this PR... so those same tests are still failing but no new failures. Either way, looking into what's going on in there now.

<div
className="LibraryItemText"
>
DynamoText
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mjkkirschner These dependencies are referenced in the RawTypeData.json file and will cause the comparison to fail if they are not included here. I am not 100% what changed recently that would make this a new requirement, @ramramps do you have any ideas? As far as I can tell these packages have been in the RawTypeData.json file for a while.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not quite sure about the comparison tests.. last time, it failed on my system. I think I made it to work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Everything passes if I include Clockwork and DynamoText in the snap. I wonder if changes with any of the element types made this a requirement at some point. It's hard to tell exactly when these tests broke without pulling old code and running them until everything passes

Copy link
Contributor Author

@alfarok alfarok Apr 20, 2018

Choose a reason for hiding this comment

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

I think they first start failing at #113 where tests were added around Add-ons. I think the above is requried after adding this section

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah ok..

@@ -112,7 +123,6 @@ exports[`LibraryContainer Test UI rendering of Library Item and child components
"RefreshLibraryViewRequestName": "refreshLibraryView",
"SearchTextUpdatedEventName": "searchTextUpdated",
"SectionIconClickedEventName": "sectionIconClicked",
"FilterCategoryEventName": "filterCategoryChange",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ramramps I noticed this was also a recent addition in #116. Tests also fail for me if these are not in this order, appears to be alphabetical

Copy link
Collaborator

Choose a reason for hiding this comment

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

is there an issue right now? this was added for instrumentation...

Copy link
Contributor Author

@alfarok alfarok Apr 20, 2018

Choose a reason for hiding this comment

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

No it should be present but the order in which the objects are listed appears to influence the test results.

@alfarok alfarok merged commit c29f30c into DynamoDS:master Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants