Skip to content
This repository has been archived by the owner on Jul 21, 2019. It is now read-only.

Change the setting in sample new event #265

Closed
wants to merge 1 commit into from

Conversation

mattstratton
Copy link
Member

This allows for use of the default square image as an override. Open to bikeshedding as if it should be defaulting to "true" on a new event.

This allows for use of the default square image as an override. Open to bikeshedding as if it should be defaulting to "true" on a new event.
@mattstratton mattstratton added this to the v1.0 Release milestone Feb 20, 2017
@bridgetkromhout
Copy link
Contributor

Can we put the logic elsewhere? Make the config file have the setting start out empty. If not set, then use default. Prompt for the file when creating event but if it's not set, leave empty and use default.

I don't think it's helpful for us to be adding settings that are basically that logic flow?

@mattstratton
Copy link
Member Author

Oh, that makes a lot of sense. If it's not set, just show the default. I honestly think that's what the code does right now anyway.

Yep. Just checked. That's what it does:

                    {{- if .event_logo_square }}
                      {{- if ne .event_logo_square "" }}
                        <img src = "/events/{{ .name }}/{{ .event_logo_square }}" class="img-fluid" alt="DevOpsDays {{ .city }}"/>

                      {{- end -}}
                      {{- else -}}
                        <img src="/img/event-logo-default.png" class="img-fluid" alt="DevOpsDays {{ .city }}"/>
                    {{- end -}}

I suppose it already works as designed, then. There's no need for a setting; you just HAVE to name the file that.

@mattstratton
Copy link
Member Author

Hmm. We just need to tell them that not only do they need to add that setting, but the file has to be called logo-square.jpg.

It seems like a weird setting to make be the filename, since that implies it can be something non-boolean.

@mattstratton
Copy link
Member Author

We can also go back to the "check if there is a logo-square.jpg in the event's directory" logic, which is starting to seem like what we should do.

@bridgetkromhout
Copy link
Contributor

We can also go back to the "check if there is a logo-square.jpg in the event's directory" logic, which is starting to seem like what we should do.

Fine by me. Point being, if it's not actually configurable, making it a configuration setting seems off to me.

@bridgetkromhout
Copy link
Contributor

If I recall correctly, checking in the yaml was easier than inspecting the filesystem. I'm fine with either.

@mattstratton
Copy link
Member Author

It's configureable, just not configurable as to what it is. It's default/custom :)

@mattstratton
Copy link
Member Author

Closing and moving the 🚲 🏠 to #255

@mattstratton mattstratton deleted the change-datafile-sample branch February 22, 2017 04:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants