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

Link to search modal #20

Closed
wants to merge 5 commits into from
Closed

Link to search modal #20

wants to merge 5 commits into from

Conversation

dojutsu-user
Copy link
Member

@dojutsu-user dojutsu-user commented Jun 30, 2019

Demo:

If the url params contains rtd_search, then the modal will open and search for its value.

Peek 2019-07-01 12-58

The demo is not according to the PR #19
But I tried it with #19 and it worked great.

@dojutsu-user dojutsu-user added Needed: documentation Documentation is required Needed: tests Tests are required labels Jun 30, 2019
@dojutsu-user dojutsu-user added PR: work in progress Pull request is not ready for full review and removed Needed: documentation Documentation is required Needed: tests Tests are required labels Jun 30, 2019
@dojutsu-user dojutsu-user removed the PR: work in progress Pull request is not ready for full review label Jul 1, 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.

I don't think this is the right approach for sharing. We should simply update the rtd_search query param as the user types, and then they can just share the URL as they would normally.

urlToBeCopied += "?" + urlParam;
}

copyToClipBoard(urlToBeCopied);
Copy link
Member

Choose a reason for hiding this comment

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

I don't quite follow what this is doing. We should just update the browser's URL when the user types with the proper data, we don't need a custom way to copy a link.

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 is generating the url to the search ui and then copying it to the clipboard.

vars[key] = value;
}
);
return vars;
Copy link
Member

Choose a reason for hiding this comment

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

Is this really not in jQuery already? I feel like we're reinventing a lot of wheels.

Copy link
Member Author

Choose a reason for hiding this comment

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

No.
I checked on the internet. There is no direct utility from the jquery or javascript to get the url parameters.

textarea.select();
document.execCommand("copy");
document.body.removeChild(textarea);
};
Copy link
Member

Choose a reason for hiding this comment

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

Same here, is this really not a standard thing?

Copy link
Member Author

Choose a reason for hiding this comment

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

No.
here also -- no utility of jquery or javascript is there which dirctly copies the text.

@dojutsu-user
Copy link
Member Author

I don't think this is the right approach for sharing. We should simply update the rtd_search query param as the user types, and then they can just share the URL as they would normally.

I have some different thoughts here -- I think it would be better to give user the choice to share the link to his/her search. Just like the sections in the docs.
What are your thoughts on this? @ericholscher

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

Closing in favor of #25

@dojutsu-user dojutsu-user deleted the link-to-search-modal branch July 11, 2019 07:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR: work in progress Pull request is not ready for full review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants