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

List of talks on a speaker page shouldn't show at all if there is no talk #9827

Open
mattstratton opened this issue Jun 26, 2020 · 7 comments

Comments

@mattstratton
Copy link
Member

mattstratton commented Jun 26, 2020

On individual speaker pages, there is a section that lists the talk(s) they are giving at the event.

Sometimes, a speaker doesn't (yet) have a talk page. In that case, currently, it looks kind of odd.

image

We should check for associated talks prior to displaying "Speaker name at EVENT" header section, and not show it at all if there isn't a talk.

@mattstratton
Copy link
Member Author

This is easier to do slightly efficiently in the newer code - example, this is the range statement that gets all the talks for that speaker at the event:

{{- range where (where $.Site.Pages "Type" "new-talk") ".File.Dir" "=" (printf "new-events/%s/%s/program/" $event_year $event_city) -}}

So I think we could do an easy index type thing against that type of query and if it is true, move on with things, etc.

@mattstratton
Copy link
Member Author

Eh. It's actually not that simple; because of how we have to find out if the speaker is in the talk.

if you could do something in the query like this (pseudocode)

where ".Params.speakers" "in" $speaker_slug

so I think the query would look like this:

where (where (where $.Site.Pages "Type" "new-talk") ".File.Dir" "=" (printf "new-events/%s/%s/program/" $event_year $event_city)) $speaker_slug "in" ".Params.speakers"

(note that the parens/order might not be quite right;

@bridgetkromhout
Copy link
Collaborator

I agree that the current situation is non-ideal. I also suspect that we may not want to encourage "this person is a speaker for our event but we aren't going to list their talk", so I'm unsure how high-priority this may be?

@mattstratton
Copy link
Member Author

It solves a problem I personally currently have, and it’s relatively easy to fix in the code I’m already working on.

This isn’t a documented feature by any means. More just like a way to make the site look better if this condition happens.

@mattstratton
Copy link
Member Author

FWIW the condition is “Bridget is a speaker but we don’t have her talk title/abstract yet”

@bridgetkromhout
Copy link
Collaborator

(nods) I don't object to the fix. I'm noting that I can see it being used in ways we wouldn't encourage.

@mattstratton
Copy link
Member Author

Yeah, I mean people can do this now, it just creates a weird look on the page.

People are already doing this. I think it also goes back to that this isn't adding a feature or even anything we would advertise :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ready
Development

No branches or pull requests

3 participants