ualbertalib / can-link

Front end react app for CanLink project
1 stars 0 forks source link

Breadcrumbs #49

Closed sfarnel closed 3 years ago

sfarnel commented 3 years ago

Add breadcrumb function

jchartrand commented 3 years ago

@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 commented 3 years ago

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

johnhuck commented 3 years ago

I think that would be a great piece of functionality.

jchartrand commented 3 years ago

@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 commented 3 years ago

@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 commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

@sfarnel yes, should all be possible.

On Dec 16, 2020, at 9:14 AM, Sharon Farnel notifications@github.com wrote:

@jchartrand https://github.com/jchartrand a few more details (if possible) re:

add LinkedIn?

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

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ualbertalib/can-link/issues/49#issuecomment-746352879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFSXOLTFCSYIIKALQTC43SVC6CZANCNFSM4SAY4LTA.

jchartrand commented 3 years ago

@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 commented 3 years ago

I've put up a new build with:

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

sfarnel commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

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