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

Ignites can't be broken into two blocks on the same day #6543

Closed
bridgetkromhout opened this issue Sep 6, 2018 · 6 comments · Fixed by #9881
Closed

Ignites can't be broken into two blocks on the same day #6543

bridgetkromhout opened this issue Sep 6, 2018 · 6 comments · Fixed by #9881

Comments

@bridgetkromhout
Copy link
Collaborator

I noticed when fixing #5338 that we didn't seem to be able to break the Ignite talks for one day up into two different blocks. We probably want to support this.

@mattstratton
Copy link
Member

Oof. This could be tricksy.

@bridgetkromhout
Copy link
Collaborator Author

I think the key to this is going to be supporting different "talk" types, not just "talk". Right now we support talk, ignite, and workshop, but not everywhere (which has led to confusion).

@mattstratton
Copy link
Member

Ignites are just a special case, because they are a group of talks that takes up one space in the program.

To do this, we'd have to add some capability of having "multi-items in one slot, called whatever you want" - so sorta like a rename-able section of the YAML where we just have ignite right now. So it's a list of talks that are grouped into a named list, and then in the program, for that part you put the name of the list instead of the name of the talk, so to speak.

Backwards compat will be super tough.

@mattstratton
Copy link
Member

I am looking at this again...I think that it would work pretty okay if it was something like this:

program:
  - title: "Ignites Round 1"
    type: ignite
    ignite-id: 1
    date: 2019-08-27
    start_time: "13:00"
    end_time: "13:30"
  - title: "Ignites Round 2"
    type: ignite
    ignite-id: 2
    date: 2019-08-27
    start_time: "16:00"
    end_time: "16:30"

ignites:
  - title: "veronica-hanus"
    date: 2019-08-27
    ignite-id: 1
  - title: "jay-gordon"
    date: 2019-08-27
    ignite-id: 1
  - title: "adam-shake"
    date: 2019-08-27
    ignite-id: 1
  - title: "j-paul-reed"
    date: 2019-08-27
    ignite-id: 2
  - title: "michael-stahnke"
    date: 2019-08-27
    ignite-id: 2
  - title: "jason-yee"
    date: 2019-08-27
    ignite-id: 2

so when it is drawing ignites, there's a slightly different query; if the ignite program element has ignite-id set, then it queries for both the date AND the ignite-id; if not, it queries for ignites that do NOT have it set (that will handle the backwards compat).

@mattstratton
Copy link
Member

Looking at the old code, this won't be too hard. This is the thing that draws the ignite block:

                              {{- else if eq .type "ignite" -}}
                              {{ .title }}
                              <!-- do ignite stuff here -->
                                {{- with $e -}}
                                  {{- if .ignites -}}
                                    {{- $ignites := (where $e.ignites "date" ($.Scratch.Get "date")) -}}
                                    {{- $ignites_len := (len $ignites) -}}
                                    {{- if ge $ignites_len 1 -}}
                                      <ul class="list-unstyled">
                                        {{- range where $e.ignites "date" ($.Scratch.Get "date") -}}
                                          <li>
                                          {{- if and ($.Scratch.Get .title) (.custom_url) -}}
                                            <a href="{{ .custom_url | safeURL }}">{{ $.Scratch.Get (printf "%s-speaker" .title) }} - {{ $.Scratch.Get .title }}</a>
                                          {{- else if ($.Scratch.Get .title) -}}
                                            <a href="/events/{{ $e.name }}/program/{{ .title }}">{{ $.Scratch.Get (printf "%s-speaker" .title) }} - {{ $.Scratch.Get .title }}</a>
                                          {{- else -}}
                                            {{ .title }}
                                          {{- end -}}
                                          {{- if eq  ($.Scratch.Get "icons")  "TRUE" -}}
                                            {{- with ($.Scratch.Get (printf "%s-video_link" .title)) -}}&nbsp;<a href="{{ . }}"><i class="fa fa-video-camera" aria-hidden="true"></i></a>&nbsp;{{- end -}}
                                            {{- with ($.Scratch.Get (printf "%s-slides_link" .title)) -}}&nbsp;<a href="{{ . }}"><i class="fa fa-file-text-o" aria-hidden="true"></i></a>&nbsp;{{- end -}}  
                                          {{- end -}}
                                          </li>
                                        {{- end -}}<!-- rang ignites-->
                                      </ul>
                                      {{- end -}} <!-- if ge $ignites_len 1 -->
                                  {{- end -}}
                                {{- end -}}
                              <!-- end ignite stuff here -->

So I think what we do is something like this:

{{- else if eq .type "ignite" -}}
	{{ .title }}
	{{- with .ignite-id -}}
		{{- $.Scratch.Set "ignite-id" . -}}
	{{- end -}}
	{{- with $e -}}
		{{- if .ignites -}}
			{{- with ($.Scratch.Get "ignite-id" -}}
				{{- $ignites := where (where $e.ignites "date" ($.Scratch.Get "date")) "ignite-id" . -}} 
			{{- else -}}
				{{- $ignites := (where $e.ignites "date" ($.Scratch.Get "date")) -}}
			{{- end -}}
// range through $ignites and do the things, etc...	

@mattstratton
Copy link
Member

I fixed this I theme 2.0 - you can dig into the details here - #9839 (comment)

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

Successfully merging a pull request may close this issue.

2 participants