Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Link To Search UI #25

Merged
merged 11 commits into from
Jul 16, 2019
Merged

Link To Search UI #25

merged 11 commits into from
Jul 16, 2019

Conversation

dojutsu-user
Copy link
Member

@dojutsu-user dojutsu-user commented Jul 11, 2019

No description provided.

@dojutsu-user
Copy link
Member Author

I wrote wrong commit msg.
#19 is merged as the first commit

@dojutsu-user dojutsu-user mentioned this pull request Jul 11, 2019
@dojutsu-user dojutsu-user added the PR: work in progress Pull request is not ready for full review label Jul 11, 2019
@ericholscher
Copy link
Member

@dojutsu-user this is now conflicting with the recent merge.

@dojutsu-user dojutsu-user removed the PR: work in progress Pull request is not ready for full review label Jul 16, 2019
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

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

The search keeps existing GET arguments in the URL ?foo=bar, but it loses page-level extension data (#link-to-section). I don't know if this is a big issue, but worth noting.

let path = window.location.pathname;
let url_params = $.getQueryParameters();

if (_is_string(SEARCH_QUERY)) {
Copy link
Member

Choose a reason for hiding this comment

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

This could probably use a comment. When will it not be a string?

Copy link
Member Author

Choose a reason for hiding this comment

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

This will always be a string. It will become false if SEARCH_QUERY becomes empty string.
_is_string func checks two things:

  • The type of the data
  • if the type is 'string', then it should be of length >= 1

search_outer_wrapper.is_displayed() is True
), 'search modal should displayed when the page loads'
assert (
search_result_box.text == 'Error Occurred. Please try again.'
Copy link
Member

Choose a reason for hiding this comment

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

Why does this show an error?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason we're testing for an error when we're just trying to see if it shows up?

Copy link
Member

Choose a reason for hiding this comment

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

I guess we have to test for something :)

Copy link
Member Author

Choose a reason for hiding this comment

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

There's no particual reason -- I just wanted to test that modal shouldn't be empty after page is loaded and modal is shown.
It also proves that a jquery ajax request was there.

@dojutsu-user
Copy link
Member Author

The search keeps existing GET arguments in the URL ?foo=bar, but it loses page-level extension data (#link-to-section).

Ohh.. I think we should preserve that also.

@dojutsu-user
Copy link
Member Author

@ericholscher
It is now also preserving the hash location of the url.

Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

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

This looks good to me. 👍

@ericholscher ericholscher merged commit 166d5ae into master Jul 16, 2019
@dojutsu-user dojutsu-user deleted the link-to-full-page branch July 16, 2019 16:28
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