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

Breadcrumbs #49

Closed
sfarnel opened this issue Oct 1, 2020 · 13 comments
Closed

Breadcrumbs #49

sfarnel opened this issue Oct 1, 2020 · 13 comments
Labels

Comments

@sfarnel
Copy link
Member

sfarnel commented Oct 1, 2020

Add breadcrumb function

@jchartrand
Copy link
Collaborator

@sfarnel @johnhuck

I'm not completely sure what is meant to be done here, but maybe one possibility is to make any result set linkable. In other words, if I'm using the search page, and I've set a few filters and gotten a specific set of results, I might then want to share those results (i.e, that query) with someone else, or might want to save the query for my own later use.

So, I could change the search page so that any query automatically puts the filter values into the URL to allow bookmarking a specific query, and to also allow sharing the URL. And we could also put a button like 'Share this query' that would copy the url for pasting elsewhere.

wdyt?

@sfarnel
Copy link
Member Author

sfarnel commented Nov 30, 2020

Thanks @jchartrand I very much like that approach; let's try it!

@johnhuck
Copy link

I think that would be a great piece of functionality.

@jchartrand
Copy link
Collaborator

jchartrand commented Dec 10, 2020

@sfarnel @johnhuck

Well okay, that was more difficult than expected, but I've got the urls working so you can bookmark them, like so:

An example saved search

Although that example doesn't show it, the paging also gets saved, so if you copy the link while viewing page 2, then page 2 of the results will open when you go back to the url (or when someone else opens the link).

The visualizations won't be restored to whatever you were looking at, but I could do that too if needed.

I've also added an option to email the search (to make it easier to share a search link.) The package I used for that actually includes support for a whole whack of social media services. I added Facebook and Twitter, just so you can get a sense of how it works, and then decide if you'd like to keep them, or add others. The twitter one works, the Facebook one doesn't, but I didn't want to spend too much time fixing it if it turned out to be something you don't want.

You can see the full list of possible social media services here:

react-share

I put the social media icons just above the search results, but you may well want them some where else, or might want a title to go with them, etc. I can vary their size too, or make the icons square (rather than circles).

Oh, and the titles and subjects that are used for the email, Facebook, and Twitter are just things I made up. If you do want to keep these social media options, just let me know what titles, hash links, etc. should be included by default.

Finally, I could also add an option to copy the current url into the clipboard to make it easier for someone to save the url somewhere (or text-message it or whatever). Let me know if you'd like that, and also where it should appear on the page.

@jchartrand
Copy link
Collaborator

@sfarnel

Just extracting the questions from above:

  1. When loading a page from a saved url, all the search fields, and the result page number, are restored. Should I also restore which visualization was visible when the url was saved?

  2. Should the social media icons remain?

  3. Should I add any other social media icons (from the list linked above)

  4. Should I move the social media icons somewhere else on the page (right now they are just above the search results)

  5. Should I add an option to copy the current url to the clipboard (to paste into a text message, etc.). If so, where on the page should it appear?

  6. What title/subject/hashlink should be used for the social media links?

  7. should I change the size of the social media icons? Make them square rather than circles?

@sfarnel
Copy link
Member Author

sfarnel commented Dec 15, 2020

Thanks @jchartrand

  1. When loading a page from a saved url, all the search fields, and the result page number, are restored. Should I also restore which visualization was visible when the url was saved? -- yes if it is easy enough to do

  2. Should the social media icons remain? - yes

  3. Should I add any other social media icons (from the list linked above) - let's stick with these for now

  4. Should I move the social media icons somewhere else on the page (right now they are just above the search results) - placement is ok

  5. Should I add an option to copy the current url to the clipboard (to paste into a text message, etc.). If so, where on the page should it appear? - Possible to add copy to clipboard icon next to the social media ones? (since all are really about sharing)

  6. What title/subject/hashlink should be used for the social media links? - #canlink

  7. should I change the size of the social media icons? Make them square rather than circles? - size is ok, style is ok; would it be possible to have some hover over text (like 'Share on Facebook', 'Share on Twitter', 'Send in an email', Copy to Clipboard')?

@sfarnel
Copy link
Member Author

sfarnel commented Dec 16, 2020

@jchartrand a few more details (if possible) re:

  1. add LinkedIn?

  2. current slug text is "Check out my Can-Link query!"; could we change to "Check out my CanLink thesis finder query!"

  3. possible to turn parts of the query into hashtags? (e.g., keyword, or subjects, or both)?

@jchartrand
Copy link
Collaborator

jchartrand commented Dec 16, 2020 via email

@jchartrand
Copy link
Collaborator

@sfarnel

For 5 above, i.e., "possible to turn parts of the query into hashtags? (e.g., keyword, or subjects, or both)?"

what should the hashtags look like? With this record, for example:

http://206.167.181.124/record/c29fcf69a1e5175e9f7e3c0dd2c87a01

the subjects are:

genotypevisual acuityphenotypenatural historychmrep-1rab escort protein 1microperimetryvisual fieldchoroideremiafull-field stimulus threshold

should I just add a hash (#) to the beginning of each subject and add them all to the post? Some might not make sense, like in the above example: #escort

And same for any query terms that might have been used? If someone searched for say: 'sushi is delicious' would the hashtags be #sushi #is #delicious or maybe #sushi-is-delicious ?

Should I also include years, degree, author, institution?

@jchartrand
Copy link
Collaborator

I've put up a new build with:

  • the selected visualization built into the url so a bookmarked url will re-open to that visualization
  • a 'copy to clipboard' icon
  • a LinkedIn share icon
  • mouseovers on the social media icons to tell you what they do
  • updated slug text to "Check out my CanLink thesis finder query!"

Just let me know if anything (e.g., text, placement, sizing, etc.) should be changed.

@sfarnel
Copy link
Member Author

sfarnel commented Dec 21, 2020

Thanks @jchartrand this is fantastic!

Re: should I just add a hash (#) to the beginning of each subject and add them all to the post? - yes, let's do this for now even if some may not make as much sense

Re: And same for any query terms that might have been used? If someone searched for say: 'sushi is delicious' would the hashtags be #sushi #is #delicious or maybe #sushi-is-delicious ? - for a query let's go with something like #sushi-is-delicious

Re: Should I also include years, degree, author, institution? - if possible let's go for it

@jchartrand
Copy link
Collaborator

@sfarnel

I've added hashtags for all the query terms. Confessing my ignorance here of social media platforms, but it only seemed like I could add multiple hash tags to the Twitter post. Facebook only allowed a single hashtag (which I made 'canlink'), and linkedIn didn't seem to have any. Is that how it should be?

I could also add the hashtags to the body of the email if that makes sense?

@sfarnel
Copy link
Member Author

sfarnel commented Dec 29, 2020

Thanks @jchartrand This is great. We can leave like this and make tweaks down the line if/as needed. Closing issue

@sfarnel sfarnel closed this as completed Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants